A full-stack collaborative task management application with MongoDB, built following the SPEC-1 requirements.
- User Authentication: Email/password authentication with JWT access and refresh tokens
- Teams/Organizations: Create and join teams with role-based permissions (Owner, Admin, Member)
- Projects: Kanban-style boards with customizable columns
- Tasks: Full CRUD operations with assignees, labels, due dates, and priorities
- Comments: Add, edit, and delete comments on tasks
- File Attachments: Upload and attach files to tasks using Vercel Blob storage
- Filtering & Sorting: Filter tasks by status, assignee, due date, and priority
- Search: Full-text search across tasks
- Role-Based Permissions: Granular access control at team and project levels
- Frontend: Next.js 16, React 19, Tailwind CSS, shadcn/ui
- Backend: Next.js API Routes, Node.js
- Database: MongoDB with Mongoose-style schemas
- Storage: Vercel Blob for file attachments
- Authentication: JWT with bcrypt password hashing
- Node.js 18+
- MongoDB Atlas account (or local MongoDB instance)
- Vercel account (for Blob storage)
Create a .env.local file with the following variables:
# MongoDB
MONGODB_URI=your_mongodb_connection_string
# JWT Secrets
JWT_ACCESS_SECRET=your_access_token_secret
JWT_REFRESH_SECRET=your_refresh_token_secret
# Vercel Blob (automatically configured in Vercel deployment)
BLOB_READ_WRITE_TOKEN=your_blob_token- Install dependencies:
npm install- Initialize the database:
npm run db:init- Start the development server:
npm run dev- users: User accounts with authentication data
- teams: Organizations with member roles
- projects: Kanban boards with embedded columns
- tasks: Task cards with metadata
- comments: Task comments
- activity_logs: Audit trail (optional)
- Users:
email(unique) - Teams:
owner,members.userId - Projects:
teamId,createdBy - Tasks:
projectId,columnId,(projectId, position),assignees, text index ontitleanddescription - Comments:
taskId,author
POST /api/auth/register- Register new userPOST /api/auth/login- LoginPOST /api/auth/refresh- Refresh access tokenPOST /api/auth/logout- LogoutGET /api/auth/me- Get current user
GET /api/teams- List user's teamsPOST /api/teams- Create teamGET /api/teams/:id- Get team detailsDELETE /api/teams/:id- Delete team (owner only)POST /api/teams/:id/invite- Invite member (admin/owner)
GET /api/projects- List projectsPOST /api/projects- Create projectGET /api/projects/:id- Get project detailsPUT /api/projects/:id- Update project (admin/owner)DELETE /api/projects/:id- Delete project (admin/owner)
POST /api/projects/:projectId/columns- Create columnPUT /api/projects/:projectId/columns/:columnId- Update columnDELETE /api/projects/:projectId/columns/:columnId- Delete column (admin/owner)
GET /api/tasks- List tasks (with filters)POST /api/tasks- Create taskGET /api/tasks/:id- Get task detailsPUT /api/tasks/:id- Update taskDELETE /api/tasks/:id- Delete taskGET /api/tasks/search- Search tasks
GET /api/tasks/:taskId/comments- List commentsPOST /api/tasks/:taskId/comments- Add commentPUT /api/tasks/:taskId/comments/:commentId- Update comment (author only)DELETE /api/tasks/:taskId/comments/:commentId- Delete comment (author/admin)
POST /api/uploads- Upload filePOST /api/tasks/:taskId/attachments- Add attachment to taskDELETE /api/tasks/:taskId/attachments- Remove attachment
- Owner: Full control, can delete team
- Admin: Manage projects, invite members, manage columns
- Member: View and create tasks, add comments
| Action | Owner | Admin | Member |
|---|---|---|---|
| Delete Team | ✓ | ✗ | ✗ |
| Invite Members | ✓ | ✓ | ✗ |
| Create Projects | ✓ | ✓ | ✓ |
| Delete Projects | ✓ | ✓ | ✗ |
| Manage Columns | ✓ | ✓ | ✗ |
| Create Tasks | ✓ | ✓ | ✓ |
| Edit Tasks | ✓ | ✓ | ✓ |
| Delete Tasks | ✓ | ✓ | ✓ |
| Add Comments | ✓ | ✓ | ✓ |
| Delete Own Comments | ✓ | ✓ | ✓ |
| Delete Any Comments | ✓ | ✓ | ✗ |
- Push code to GitHub
- Import project in Vercel
- Add environment variables
- Deploy
- Build the application:
npm run build- Start production server:
npm start- Real-time collaboration with WebSockets
- Activity log and audit trail
- Email notifications for invites and mentions
- Advanced search with filters
- CSV/JSON export and import
- Analytics dashboard
- Dark mode
- Mobile app
MIT