A task management web application built as part of the Hairdrama Tech Internship assessment. Users authenticate via Google OAuth, create and assign tasks, track work through a review workflow, and receive email notifications for task lifecycle events.
Live URL: https://kairos-task-management-platfrom-pf9.vercel.app API: https://kuldipsinhjadeja478.pythonanywhere.com/api
| Layer | Technology |
|---|---|
| Frontend | Next.js 16 + TypeScript |
| Backend | Flask (Python) |
| Database | Supabase PostgreSQL |
| Auth | Google OAuth 2.0 |
| Gmail SMTP | |
| Styling | Tailwind CSS |
| Animations | Framer Motion |
| Charts | Recharts |
| Drag & Drop | @dnd-kit |
| Icons | Lucide React |
βββββββββββββββββββββββββββ
β Vercel (Next.js) β
β - SSR pages β
β - Client components β
βββββββββββ¬ββββββββββββββββ
β HTTP / JSON
βββββββββββΌββββββββββββββββ
β Render (Flask) β
β - REST API endpoints β
β - JWT auth middleware β
β - Email service β
βββββββββββ¬ββββββββββββββββ
β SQL queries
βββββββββββΌββββββββββββββββ
β Supabase (PostgreSQL) β
β - users, tasks β
β - labels, comments β
β - task_history β
βββββββββββββββββββββββββββ
- Single bounded context β all domain logic (auth, tasks, notifications) lives in one Flask application
- JWT with database lookup β tokens contain only user ID; fresh user data fetched on each request for data consistency
- Client-side filtering β tasks fetched with visibility filter, then filtered/sorted/paginated in Python (appropriate for this scale)
- Async email β SMTP sends run in a daemon thread to avoid blocking API responses
- No hard delete β tasks are business records; cancellation is the only closure path
- Google OAuth sign-in
- JWT-based session management
- Protected routes (redirect to login)
- Create tasks with title, description, priority, labels, visibility
- Assign, reassign (with reason), unassign
- Claim public unassigned tasks
- Change visibility (private / public)
- 5 statuses: Pending β In Progress β Ready For Review β Completed
- Cancelled / Reopen
- Completion notes, review feedback, cancellation reasons stored as comments
- Completed tasks are terminal β cannot be modified
- 9 metric cards with animated count-up
- Weekly task completion bar chart
- Recent activity timeline
- Filters: status, priority, labels, visibility, assignee relationship
- Search (title + description, debounced)
- Sort: newest, oldest, priority
- Pagination with page numbers
- List / Board view toggle
- 4 columns with drag-and-drop
- Valid transition enforcement
- Completion note / review feedback modals on drop
- Inline title editing
- Inline description editing with character counter
- Label editing
- Comments (CRUD) with creator moderation
- Task history timeline
- Workflow action buttons (role + status dependent)
- Task assigned / reassigned / unassigned
- Task claimed
- Ready For Review / Changes Requested
- Task approved / cancelled / reopened
- Self-suppression rules (no email when creator == assignee)
- 7 seeded labels: Frontend, Backend, Bug, Feature, Research, Documentation, Urgent
- Python 3.12+
- Node.js 20+
- Supabase account
- Google Cloud Console project
git clone https://github.com/your-repo/kairos-task-management.git
cd kairos-task-managementcd backend
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
pip install -r requirements.txtCreate backend/.env:
FLASK_ENV=development
FLASK_DEBUG=1
SECRET_KEY=your-secret-key
SUPABASE_URL=your-supabase-url
SUPABASE_KEY=your-supabase-key
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
JWT_SECRET=your-jwt-secret
JWT_EXPIRATION_HOURS=24
SMTP_EMAIL=your-gmail
SMTP_PASSWORD=your-gmail-app-password
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
FRONTEND_ORIGIN=http://localhost:3000- Go to Supabase Dashboard β SQL Editor
- Run
backend/migrations/001_initial_schema.sql - This creates all 6 tables and seeds 7 labels
cd frontend
npm installCreate frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:5000/api
NEXT_PUBLIC_GOOGLE_CLIENT_ID=your-google-client-id# Terminal 1 β Backend
cd backend
venv\Scripts\activate
python app.py
# Terminal 2 β Frontend
cd frontend
npm run devβββ backend/
β βββ app.py # Flask application factory
β βββ config.py # Environment configuration
β βββ requirements.txt # Python dependencies
β βββ migrations/
β β βββ 001_initial_schema.sql # Database schema + seed data
β βββ routes/
β β βββ auth.py # Google OAuth, JWT endpoints
β β βββ users.py # User list / detail
β β βββ tasks.py # Task CRUD, status, assignment
β β βββ labels.py # Labels list
β β βββ comments.py # Comment CRUD
β β βββ dashboard.py # Metrics, weekly chart, activity
β βββ services/
β β βββ auth_service.py # Google token verification, user upsert
β β βββ task_service.py # Task CRUD, visibility, history
β β βββ status_service.py # Status transition validation
β β βββ assignment_service.py # Assign, reassign, claim
β β βββ comment_service.py # Comment CRUD with permissions
β β βββ labels_service.py # Label validation
β β βββ dashboard_service.py # Metrics, chart data
β β βββ email_service.py # SMTP sending, HTML templates
β β βββ notifications.py # Notification triggers + suppression
β βββ utils/
β βββ jwt_utils.py # JWT generation / verification
β βββ decorators.py # @require_auth decorator
β βββ supabase_client.py # Supabase singleton
β
βββ frontend/
β βββ src/
β β βββ app/
β β β βββ page.tsx # Redirect to login / dashboard
β β β βββ layout.tsx # Root layout with providers
β β β βββ login/page.tsx # Google OAuth login page
β β β βββ dashboard/page.tsx # Dashboard with metrics + chart
β β β βββ tasks/page.tsx # Task list with filters
β β β βββ tasks/[id]/page.tsx # Task detail
β β β βββ tasks/[id]/edit/page.tsx # Edit task
β β β βββ tasks/new/page.tsx # Create task
β β β βββ board/page.tsx # Kanban board
β β β βββ profile/page.tsx # User profile
β β βββ components/
β β β βββ ui/ # 24 shared components (Button, Modal, etc.)
β β β βββ Layout.tsx # App layout shell
β β β βββ Sidebar.tsx # Navigation sidebar
β β β βββ Header.tsx # Top bar with avatar
β β β βββ ProtectedRoute.tsx # Auth guard
β β β βββ TaskFilters.tsx # Filter bar
β β β βββ TaskCard.tsx # List view card
β β β βββ RecentActivity.tsx # Activity timeline
β β βββ hooks/ # 10 data hooks
β β βββ contexts/
β β β βββ AuthContext.tsx # Auth state management
β β βββ lib/
β β βββ api.ts # Fetch wrapper with JWT
β βββ package.json
β
βββ .env.example
βββ .gitignore
βββ README.md
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/google |
Google OAuth login |
| GET | /api/auth/me |
Current user |
| POST | /api/auth/logout |
Logout |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/tasks |
List tasks (filtered, sorted, paginated) |
| POST | /api/tasks |
Create task |
| GET | /api/tasks/:id |
Get task |
| PUT | /api/tasks/:id |
Update task |
| PATCH | /api/tasks/:id/status |
Change status |
| PATCH | /api/tasks/:id/assign |
Assign |
| PATCH | /api/tasks/:id/reassign |
Reassign |
| PATCH | /api/tasks/:id/unassign |
Unassign |
| PATCH | /api/tasks/:id/claim |
Claim |
| PATCH | /api/tasks/:id/visibility |
Change visibility |
| Method | Endpoint | Description |
|---|---|---|
| GET/POST | /api/tasks/:id/comments |
List / create comments |
| PUT/DELETE | /api/comments/:id |
Edit / delete comment |
| GET | /api/labels |
List all labels |
| GET | /api/dashboard/metrics |
Metric counts |
| GET | /api/dashboard/recent-activity |
Activity feed |
| GET | /api/dashboard/weekly-chart |
Weekly chart data |
| GET | /api/tasks/:id/history |
Task history |
6 tables: users, tasks, labels, task_labels, comments, task_history
Full schema in backend/migrations/001_initial_schema.sql
- Create Web Service from GitHub repo
- Root:
backend - Build:
pip install -r requirements.txt - Start:
gunicorn app:app - Add env vars from
.env - Use Starter plan ($7/mo) to prevent cold start
- Create Project from GitHub repo
- Root:
frontend - Env:
NEXT_PUBLIC_API_URL,NEXT_PUBLIC_GOOGLE_CLIENT_ID - Deploy
- Add frontend URL to Authorized JavaScript origins in Google Cloud Console
A loom video explaining the code and features will be recorded after deployment.