Skip to content

shprashantkr01/Task-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—‚ 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:

http://localhost:4000

🎨 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:

http://localhost:3000

πŸ§ͺ 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

About

Full-stack Task Management System using Node.js, Next.js, TypeScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors