A collaborative real-time notepad application built with Next.js, Supabase, and ReactQuill. The application allows users to create, edit and share notepads in real-time.
- π Real-time collaboration
- π Rich text editing
- π Dark/Light mode
- π Shareable notepad links
- π± Responsive design
- π Basic API authentication
- π List all notepads
- β Delete notepads
-
Frontend:
- Next.js 14
- React 18
- TailwindCSS
- shadcn/ui components
- React Quill for rich text editing
-
Backend:
- Supabase (PostgreSQL + Real-time subscriptions)
-
Additional Tools:
- TypeScript
- next-themes for dark mode
- react-hot-toast for notifications
- Lodash for debouncing
- Node.js 18+
- npm/yarn/pnpm
- Supabase account
- Clone the repository:
git clone https://github.com/yourusername/realtime-notepad.git
cd realtime-notepad
- Install dependencies:
npm install
- Set up environment variables:
Create a
.env.local
file in the root directory with:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
API_KEY=your_api_key
API_SECRET=your_api_secret
AUTH_COOKIE=your_cookie_value
- Set up Supabase:
- Create a new Supabase project
- Run the following SQL in Supabase SQL editor:
create table notepad (
id text primary key,
content text,
created_at timestamp with time zone default timezone('utc'::text, now()) not null,
updated_at timestamp with time zone default timezone('utc'::text, now()) not null
);
- Run the development server:
npm run dev
βββ app/
β βββ all-notepads/ # All notepads listing page
β βββ components/ # Shared components
β β βββ AuthDialogBox.tsx
β β βββ Editor.tsx
β β βββ ui/ # UI components
β βββ notepad/ # Individual notepad page
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Homepage
βββ lib/
β βββ supabase.ts # Supabase client
βββ types/ # TypeScript types
βββ utils/ # Utility functions
βββ package.json
- Multiple users can edit the same notepad simultaneously
- Changes are synced in real-time using Supabase subscriptions
- Debounced saves to prevent excessive database updates
- Full WYSIWYG editing experience
- Support for formatting, lists, and code blocks
- Image upload functionality
- Keyboard shortcuts
- Admin access control via API key authentication
- Secure cookie-based session management
- Protected routes and operations
- Lists all notepads
- Requires authentication
- Creates a new notepad
- Body:
{ content: string }
- Updates notepad content
- Body:
{ content: string }
- Deletes a notepad
- Requires authentication
# Install dependencies
npm install
# Run development server
npm run dev
# Run tests
npm test
# Build for production
npm run build
- Push your code to GitHub
- Import your repository to Vercel
- Configure environment variables
- Deploy!
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please:
- Open an issue on GitHub
- Join our Discord community
- Check the documentation
- User authentication and accounts
- Collaborative cursors
- File attachments
- Version history
- Custom themes
-
Text Enhancement Features
- Grammar and spell checking
- Style suggestions
- Text summarization
- Readability scoring
-
Content Generation
- AI-powered content suggestions
- Auto-completion for sentences
- Title generation from content
- Keywords extraction
-
Language Support
- Real-time translation
- Multi-language support
- Language detection
- Tone adjustment
-
Smart Features
- Content categorization
- Topic extraction
- Related content suggestions
- Smart search with semantic understanding
-
Collaboration Tools
- AI-powered conflict resolution
- Smart merging of concurrent edits
- Content quality scoring
-
Code Enhancement
- Code syntax highlighting
- Code explanation
- Code review suggestions
- Code completion
-
Document Analysis
- Sentiment analysis
- Content structure suggestions
- Plagiarism detection
- Citation generation