A modern task management application built with TypeScript, Next.js, shadcn/ui, and Drizzle ORM with Supabase PostgreSQL.
- ✅ Create tasks with title, description, priority, and due date
- ✅ Organize tasks into categories
- ✅ Mark tasks as complete
- ✅ Filter tasks by category and status
- ✅ View overdue tasks
- ✅ Search functionality
- ✅ Beautiful UI with shadcn components
- ✅ Type-safe database operations with Drizzle ORM
- ✅ PostgreSQL with Supabase
- Frontend: Next.js 16, React 19, TypeScript
- UI Components: shadcn/ui, Tailwind CSS, Radix UI
- Database: PostgreSQL (Supabase)
- ORM: Drizzle ORM
- Icons: Lucide React
src/
├── app/ # Next.js app directory
│ ├── api/ # API routes
│ │ ├── tasks/ # Task endpoints
│ │ │ ├── route.ts # GET, POST tasks
│ │ │ └── [id]/route.ts # GET, PUT, DELETE specific task
│ │ └── categories/ # Category endpoints
│ │ ├── route.ts # GET, POST categories
│ │ └── [id]/route.ts # GET, PUT, DELETE specific category
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Main page
│
├── components/
│ └── ui/ # shadcn UI components
│ ├── button.tsx
│ ├── card.tsx
│ ├── input.tsx
│ ├── label.tsx
│ ├── badge.tsx
│ └── checkbox.tsx
│
├── db/ # Database configuration
│ ├── schema.ts # Drizzle schema definition
│ ├── db.ts # Database client
│ └── migrations/ # Migration files
│ ├── 0001_initial_schema.sql
│ └── meta/
│
└── lib/
└── utils.ts # Utility functions
id(UUID, Primary Key)email(VARCHAR, Unique)name(VARCHAR)created_at(Timestamp)updated_at(Timestamp)
id(UUID, Primary Key)user_id(UUID, Foreign Key → users.id)name(VARCHAR)description(TEXT)color(VARCHAR)created_at(Timestamp)updated_at(Timestamp)
id(UUID, Primary Key)user_id(UUID, Foreign Key → users.id)category_id(UUID, Foreign Key → categories.id)title(VARCHAR)description(TEXT)priority(VARCHAR) - low, medium, high, urgentstatus(VARCHAR) - pending, in_progress, completeddue_date(Timestamp)completed_at(Timestamp)created_at(Timestamp)updated_at(Timestamp)
- Node.js 18+ and npm
- Supabase account with PostgreSQL database
- Environment variables configured
git clone <repository>
cd db-case
npm installCreate a .env.local file with your Supabase credentials:
DATABASE_URL=postgresql://[user]:[password]@[host]:[port]/[database]
NEXT_PUBLIC_SUPABASE_URL=https://[project-id].supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_keynpm run db:generate
npm run db:migratenpm run devOpen http://localhost:3000 to view the application.
GET /api/tasks- Get all tasks with filtering optionsPOST /api/tasks- Create a new taskGET /api/tasks/[id]- Get a specific taskPUT /api/tasks/[id]- Update a taskDELETE /api/tasks/[id]- Delete a task
Query Parameters for GET /api/tasks:
userId(required) - User IDcategoryId(optional) - Filter by categorystatus(optional) - Filter by status (pending, in_progress, completed)priority(optional) - Filter by priority (low, medium, high, urgent)search(optional) - Search by titleshowOverdue(optional) - Show only overdue tasks
GET /api/categories- Get all categories for a userPOST /api/categories- Create a new categoryGET /api/categories/[id]- Get a specific categoryPUT /api/categories/[id]- Update a categoryDELETE /api/categories/[id]- Delete a category
- ✅ Create tasks with title, description, priority, and due date
- ✅ Organize tasks into categories
- ✅ Mark tasks as complete
- ✅ Filter tasks by category and status
- ✅ See overdue tasks
- ✅ Drizzle ORM with 3+ tables (users, categories, tasks)
- ✅ Schema with users, categories, and tasks tables
- ✅ Foreign key relationships between tables
- ✅ Migrations folder with proper structure
- ✅ Database client properly initialized
- ✅ Supabase PostgreSQL integration
- ✅ Clean and well-organized code structure
- ✅ Proper TypeScript types throughout
- ✅ No unused imports or variables
- ✅ Consistent naming conventions
- ✅ Proper error handling in routes
- ✅ Request validation in place
npm run build
npm startnpm run db:studionpm run db:generatenpm run db:migrate- Authentication and user management
- Real-time updates with WebSockets
- Task reminders and notifications
- Recurring tasks
- Task attachments
- Collaborative task sharing
- Mobile app with React Native
- Dark mode theme
- Export tasks to CSV/PDF
MIT