A modern, collaborative text editor built for the web. Create, organize, and share beautiful documents with rich media support.
- Powerful Editor: Built with TipTap and ProseMirror for a smooth writing experience
- Markdown Support: Paste markdown and it automatically converts to rich text
- Formatting Tools: Bold, italic, underline, strikethrough, code, and more
- Multiple Fonts: Choose from various font families and sizes
- Text Styling: Custom colors, highlights, alignment, line height
- Smart Organization: Create folders and organize your documents
- Full-Text Search: Quickly find any document with powerful search (βK)
- Document Tabs: Work on multiple documents simultaneously
- Auto-Save: Never lose your work with intelligent debounced saving
- Version History: Track changes and restore previous versions
- Document Starring: Mark important documents as favorites
- Images: Drag and drop images with resizing support
- Videos: Embed and play videos directly in documents
- Audio: Add audio files with built-in player
- YouTube: Embed YouTube videos
- Drawings: Create and edit drawings inline
- Link Previews: Automatic rich previews for pasted URLs
- Chat Visualizations: Import and visualize chat conversations (Instagram, Messages)
- Public Links: Share documents with anyone via public URLs
- Testament Mode: Create permanent, immutable documents
- Temporary Pads: Share documents that expire after a set time
- Export Options: Download as Markdown, HTML, TXT, or JSON
- Bulk Export: Download all your documents at once
- Multiple Auth Options: Email/password, Google OAuth
- Secure Sessions: JWT-based authentication with NextAuth
- User Profiles: Customizable avatars and settings
- Admin Panel: Comprehensive admin dashboard for moderation
- Multi-Language: Support for English, French, and Swedish
- Auto-Detection: Automatically detects user's preferred language
- Localized UI: Fully translated interface and messages
- Modern Stack: Next.js 15 App Router, React 19, TypeScript
- Serverless: Fully serverless architecture on Vercel
- Database: PostgreSQL with Drizzle ORM
- Caching: Intelligent caching with Redis
- Analytics: PostHog integration for insights
- File Storage: AWS S3 and IPFS support
- Node.js 18+
- PostgreSQL database (Neon, Supabase, or local)
- (Optional) AWS S3 or IPFS for file storage
-
Clone the repository
git clone https://github.com/yourusername/padpad.git cd padpad -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile with the following:# Database DATABASE_URL=your_postgres_connection_string POSTGRES_URL=your_postgres_connection_string # Authentication NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your_nextauth_secret # Google OAuth (optional) GOOGLE_CLIENT_ID=your_google_client_id GOOGLE_CLIENT_SECRET=your_google_client_secret # AWS S3 (optional) AWS_ACCESS_KEY_ID=your_aws_key AWS_SECRET_ACCESS_KEY=your_aws_secret AWS_REGION=your_region AWS_S3_BUCKET=your_bucket_name # IPFS (optional) IPFS_API_URL=your_ipfs_api_url IPFS_GATEWAY_URL=your_ipfs_gateway_url # Analytics (optional) NEXT_PUBLIC_POSTHOG_KEY=your_posthog_key NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com
-
Run database migrations
# Option 1: Via API endpoint npm run dev # Then POST to http://localhost:3000/api/migrate # Option 2: Via web interface # Visit http://localhost:3000/migrate
-
Start the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
- Sign in or create an account
- Click the "+" button in the header
- Start typing - your document auto-saves!
- Create folders from the Drive page
- Drag documents into folders
- Use the search (βK) to find anything
- Images: Drag and drop into the editor
- Videos: Paste video URLs or upload files
- Drawings: Use the drawing tool in the toolbar
- Links: Paste any URL for automatic preview
- Click the share button on any document
- Choose public link, testament, or temporary pad
- Copy the link and share!
- Import: Drag .md or .txt files onto the Drive page
- Export: Use the export button to download in various formats
- Frontend: Next.js 15 (App Router), React 19, TipTap, Tailwind CSS
- Backend: Next.js API Routes (Serverless Functions)
- Database: PostgreSQL (Neon) with Drizzle ORM
- Auth: NextAuth.js with multiple providers
- Storage: AWS S3 + IPFS for distributed storage
- Caching: Upstash Redis
- Analytics: PostHog
- Deployment: Vercel
users
βββ id (uuid, primary key)
βββ email (unique)
βββ name
βββ avatar_url
βββ is_admin
βββ created_at
documents
βββ id (uuid, primary key)
βββ user_id (foreign key)
βββ folder_id (foreign key, nullable)
βββ title
βββ content (jsonb)
βββ content_text (for search)
βββ is_public
βββ is_starred
βββ created_at
βββ updated_at
folders
βββ id (uuid, primary key)
βββ user_id (foreign key)
βββ name
βββ parent_id (self-referencing, nullable)
βββ created_at
βββ updated_at
document_snapshots
βββ id (uuid, primary key)
βββ document_id (foreign key)
βββ content (jsonb)
βββ content_text
βββ created_at
document_events
βββ id (uuid, primary key)
βββ document_id (foreign key)
βββ event_type
βββ event_data (jsonb)
βββ created_at
public_documents
βββ id (uuid, primary key)
βββ slug (unique)
βββ document_id (foreign key)
βββ created_at
βββ views
testament_documents
βββ id (uuid, primary key)
βββ slug (unique)
βββ document_id (foreign key)
βββ is_locked
βββ created_at
temporary_pads
βββ id (uuid, primary key)
βββ content (jsonb)
βββ expires_at
βββ created_at
PadPad uses an event-sourced architecture for document management:
- All changes are logged as immutable events
- Snapshots are created periodically for performance
- Full document history is preserved
- Easy rollback and auditing
padpad/
βββ app/ # Next.js App Router pages
β βββ (main)/ # Authenticated routes
β βββ (public)/ # Public routes
β βββ api/ # API endpoints
β βββ layout.js # Root layout
βββ components/ # React components
β βββ editor/ # Editor components
β βββ layout/ # Layout components
β βββ drive/ # Drive page components
βββ lib/ # Utilities and helpers
β βββ editor/ # TipTap extensions
β βββ db/ # Database utilities
β βββ auth/ # Authentication helpers
βββ public/ # Static assets
βββ styles/ # Global styles
# Development
npm run dev # Start dev server
npm run build # Build for production
npm run start # Start production server
# Code Quality
npm run lint # Run ESLint
npm run format # Format with Prettier
# Database
npm run migrate # Run database migrations- Create TipTap extension in
lib/editor/ - Add to extensions config in
lib/editor/extensions-config.js - Create React component if needed in
components/editor/ - Add toolbar controls in
components/editor/GoogleDocsToolbar.js
- Push your code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy!
PadPad is a standard Next.js app and can be deployed to:
- Netlify
- AWS Amplify
- Cloudflare Pages
- Railway
- Self-hosted with Docker
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- TipTap - Headless editor framework
- Next.js - React framework
- Vercel - Hosting platform
- Neon - Serverless Postgres
For questions or feedback, please open an issue on GitHub.
Made with β€οΈ by the PadPad Team