A modern, full-stack todo application built with Next.js 15, TypeScript, ConvexDB, and Clerk authentication. Features real-time synchronization, category organization, and a beautiful responsive UI.
- β Real-time Synchronization - Changes sync instantly across all devices
- β Secure Authentication - Powered by Clerk.js with social login support
- β Category Organization - Organize todos with customizable categories
- β Progress Tracking - Visual progress bars and completion statistics
- β Responsive Design - Works perfectly on desktop, tablet, and mobile
- β TypeScript - Full type safety throughout the application
- β Modern UI - Built with Tailwind CSS and shadcn/ui components
- β Database - Real-time database with ConvexDB
- β API - RESTful API with comprehensive documentation
- Node.js 18.0 or higher
- npm, bun, or yarn package manager
- Git
-
Clone the repository
git clone <repository-url> cd todo-app
-
Install dependencies
npm install # or bun install -
Set up environment variables
cp .env.example .env.local
Edit
.env.localwith your credentials:NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your_key CLERK_SECRET_KEY=sk_test_your_secret NEXT_PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud NEXT_PUBLIC_APP_URL=http://localhost:3000
-
Set up Clerk Authentication
- Create account at Clerk Dashboard
- Create a new application
- Copy API keys to your
.env.local
-
Set up Convex Database
npx convex dev --once npx convex deploy
-
Run the development server
npm run dev # or bun dev -
Open your browser
- Navigate to http://localhost:3000
- Sign up for a new account or sign in
- User Guide - Complete user manual with screenshots and examples
- Setup Guide - Step-by-step setup instructions for development and production
- Deployment Guide - Deploy to Vercel, Netlify, AWS, and more
- API Documentation - Complete API reference with examples
- Best Practices - Development guidelines and patterns
- Troubleshooting - Common issues and solutions
- Product Requirements - Product vision and requirements
- Research Notes - Technical research and decisions
- Calendar Sync - Calendar integration documentation
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Modern UI components
- Lucide Icons - Beautiful icon library
- ConvexDB - Real-time database
- Clerk - Authentication and user management
- Next.js API Routes - Server-side functionality
- ESLint - Code linting
- Prettier - Code formatting
- Jest - Unit testing
- Playwright - End-to-end testing
- Vitest - Fast unit testing
todo-app/
βββ app/ # Next.js app router pages
β βββ api/ # API routes
β βββ profile/ # User profile page
β βββ sign-in/ # Authentication pages
β βββ sign-up/
β βββ todos/ # Main todos page
βββ components/ # Reusable React components
β βββ ui/ # shadcn/ui components
β βββ AuthGuard.tsx # Authentication guard
βββ convex/ # ConvexDB backend
β βββ todos.ts # Todo operations
β βββ categories.ts # Category operations
β βββ schema.ts # Database schema
β βββ auth.config.js # Authentication config
βββ docs/ # Documentation
βββ lib/ # Utility functions
βββ public/ # Static assets
βββ tests/ # Test files
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
# Testing
npm test # Run unit tests
npm run test:ui # Run tests with UI
npm run test:coverage # Generate coverage report
# Database
npx convex dev # Start Convex development
npx convex deploy # Deploy Convex functions
npx convex dashboard # Open Convex dashboard
# Verification
node verify-auth-setup.js # Verify authentication setup- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on every push to main
The app uses Clerk for authentication with the following features:
- Email/Password authentication
- Social login (Google, GitHub, etc.)
- User profiles with avatars
- Session management
- Secure API access
{
_id: Id<"users">
clerkId: string
email: string
name?: string
createdAt: number
}{
_id: Id<"categories">
userId: Id<"users">
name: string
color: string
createdAt: number
}{
_id: Id<"todos">
userId: Id<"users">
categoryId?: Id<"categories">
title: string
description?: string
completed: boolean
createdAt: number
updatedAt: number
}npm testnpx playwright testnpm run test:coverage- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and add tests
- Run the test suite:
npm test - Commit your changes:
git commit -m 'Add your feature' - Push to the branch:
git push origin feature/your-feature - Open a Pull Request
- Follow the existing code style
- Write comprehensive tests
- Update documentation as needed
- Use TypeScript for all new code
- Follow conventional commit messages
- Lighthouse Score: 95+ on all metrics
- First Contentful Paint: < 1.5s
- Time to Interactive: < 3s
- Bundle Size: < 200KB gzipped
- HTTPS Only: All communications encrypted
- Secure Headers: CSP, HSTS, and other security headers
- Input Validation: All inputs validated and sanitized
- Authentication: JWT-based secure authentication
- Authorization: Row-level security with ConvexDB
- Vercel Analytics: Built-in performance monitoring
- Convex Dashboard: Database monitoring and logs
- Clerk Dashboard: Authentication monitoring
- Error Tracking: Sentry integration for error monitoring
-
Authentication not working
- Check Clerk configuration
- Verify environment variables
- Clear browser cache
-
Database connection issues
- Verify Convex URL
- Check network connectivity
- Review Convex dashboard
-
Build failures
- Check Node.js version (18+)
- Clear node_modules and reinstall
- Check for TypeScript errors
See Troubleshooting Guide for detailed solutions.
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js Team for the amazing framework
- Convex for the real-time database
- Clerk for authentication
- shadcn for the beautiful UI components
- Tailwind CSS for the styling system
- Documentation: docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Happy todo-ing! π