π Task Management System
Full Stack Application β Track A (Node.js + Next.js + TypeScript)
This project is a full-stack Task Management System built as part of a software engineering assessment. It includes secure authentication, task CRUD functionality, and a responsive frontend dashboard.
π Tech Stack Backend
Node.js
Express.js
TypeScript
MySQL
Prisma ORM
JWT (Access & Refresh Tokens)
bcrypt
Frontend
Next.js (App Router)
TypeScript
Tailwind CSS
Fetch API
LocalStorage for token management
β¨ Features π Authentication & Authorization
User registration and login
Password hashing using bcrypt
JWT-based authentication
Access & Refresh token flow
Protected backend routes
Automatic token refresh on expiration
Logout functionality
π Task Management
Create new tasks
View all user-specific tasks
Toggle task completion status
Delete tasks
Search tasks by title
Tasks are scoped to the logged-in user only
π₯ Frontend Dashboard
Responsive UI (desktop & mobile)
Login & Registration pages
Task dashboard
Real-time updates after CRUD actions
Simple notifications (alerts)
π Project Structure task-management-system/ ββ backend/ β ββ src/ β β ββ modules/ β β β ββ auth/ β β β ββ tasks/ β β ββ config/ β β ββ app.ts β β ββ server.ts β ββ prisma/ β ββ package.json β ββ frontend/ β ββ src/ β β ββ app/ β β β ββ login/ β β β ββ register/ β β β ββ dashboard/ β β ββ lib/ β β ββ components/ β ββ package.json β ββ README.md
βοΈ Setup Instructions 1οΈβ£ Clone the Repository git clone cd task-management-system
π§ Backend Setup Install dependencies cd backend npm install
Environment Variables (backend/.env) PORT=4000 DATABASE_URL=mysql://USER:PASSWORD@localhost:3306/task_management JWT_ACCESS_SECRET=your_access_secret JWT_REFRESH_SECRET=your_refresh_secret
Run Prisma migrations npx prisma migrate dev
Start backend server npm run dev
Backend will run at:
π¨ Frontend Setup Install dependencies cd frontend npm install
Environment Variables (frontend/.env.local) NEXT_PUBLIC_API_BASE_URL=http://localhost:4000
Start frontend npm run dev
Frontend will run at:
π§ͺ Application Flow
Register a new user
Login to receive access & refresh tokens
Access the task dashboard
Create, update, toggle, delete tasks
Tokens refresh automatically when access token expires
Logout clears session
π Authentication Flow (Summary)
Access Token: Short-lived, used for API authorization
Refresh Token: Long-lived, used to get new access tokens
Frontend automatically refreshes access tokens on 401 responses
User is logged out if refresh token expires
π API Endpoints (Backend) Auth
POST /auth/register
POST /auth/login
POST /auth/refresh
Tasks (Protected)
GET /tasks
POST /tasks
PUT /tasks/:id
DELETE /tasks/:id
π± Responsiveness
Fully responsive UI
Works on desktop and mobile devices
Built using Tailwind CSS
β Assessment Coverage (Track A)
β Backend with secure authentication β JWT authorization & middleware β Task CRUD APIs β Next.js frontend (App Router) β Authentication UI β Task dashboard with filtering & search β Token refresh logic β Responsive design
π€ Author
Prashant Kumar Sharma B.Tech CSE Full Stack Developer
π Final Notes
This project was built to strictly match the assessment requirements without overengineering, focusing on:
Correct architecture
Security best practices
Clean, readable code
Functional UI