A full-stack web application built with React + Node.js + Express + MongoDB implementing secure authentication, protected routes, and full CRUD functionality with search & filter UI.
This project is a scalable task management dashboard featuring:
- 🔐 JWT-based Authentication (Register / Login / Logout)
- 🛡 Protected Routes
- 📦 Full CRUD Operations on Tasks (Sample Entity)
- 🔎 Search and Filter UI
- 🎨 Modern UI with TailwindCSS + Framer Motion
- 🔑 Password Hashing with bcrypt
- ⚙ Clean Modular Backend Architecture
The system is designed with scalability and maintainability in mind.
- React.js
- TailwindCSS
- Framer Motion
- Axios
- React Context API
- React Router DOM
- Node.js
- Express.js
- MongoDB (Mongoose)
- JWT Authentication
- bcrypt for password hashing
backend/
│
├── config/
│ └── db.js
│
├── controllers/
│ ├── authController.js
│ └── taskController.js
│
├── middleware/
│ ├── authMiddleware.js
│ └── errorMiddleware.js
│
├── models/
│ ├── User.js
│ └── Task.js
│
├── routes/
│ ├── authRoutes.js
│ └── taskRoutes.js
│
├── utils/
│ └── generateToken.js
│
├── .env
├── server.js
└── package.json
frontend/
│
├── public/
│
├── src/
│ │
│ ├── api/
│ │ └── axios.js
│ │
│ ├── components/
│ │ ├── Navbar.jsx
│ │ ├── TaskForm.jsx
│ │ └── TaskList.jsx
│ │
│ ├── context/
│ │ └── AuthContext.jsx
│ │
│ ├── pages/
│ │ ├── Login.jsx
│ │ ├── Register.jsx
│ │ └── Dashboard.jsx
│ │
│ ├── routes/
│ │ └── ProtectedRoute.jsx
│ │
│ ├── App.jsx
│ ├── main.jsx
│ └── index.css
│
├── .env
└── package.json
┌────────────────────┐
│ Frontend │
│ React + Tailwind │
└─────────┬──────────┘
│
│ HTTP (Axios + JWT)
▼
┌────────────────────┐
│ Backend │
│ Node + Express │
├────────────────────┤
│ Auth Middleware │
│ Controllers │
│ Error Middleware │
└─────────┬──────────┘
│
│ Mongoose ORM
▼
┌────────────────────┐
│ MongoDB │
│ User + Task Data │
└────────────────────┘
- User interacts with React frontend
- Axios sends requests with JWT token
- Express middleware validates token
- Controller handles business logic
- Mongoose interacts with MongoDB
- Response sent back to frontend
The architecture follows clear separation of concerns and is designed for scalability.
- User registers → password hashed with bcrypt
- JWT token generated on login
- Token stored in localStorage
- Axios interceptor attaches token automatically
- Protected routes validate token via middleware
Each authenticated user can:
- Create a task
- View their tasks
- Update their tasks
- Delete their tasks
- Search tasks (title/description)
- Filter by status (Pending / Completed)
Tasks are user-specific and protected by ownership validation.
POST /api/auth/register
POST /api/auth/login
GET /api/auth/profile
GET /api/tasks
POST /api/tasks
PUT /api/tasks/:id
DELETE /api/tasks/:id
- Password hashing using bcrypt
- JWT authentication
- Protected route middleware
- Token validation
- User ownership verification for tasks
- Error handling middleware
- Environment variable configuration
- Modular backend architecture
- Separation of concerns (routes/controllers/models)
- Context-based frontend auth management
- Axios interceptor for centralized API config
- Functional state updates to prevent stale data bugs
- Defensive UI handling for unexpected API shapes
This application can be deployed using:
- Render
- Vercel
Backend:
PORT
MONGO_URI
JWT_SECRET
NODE_ENV=production
Frontend:
VITE_API_BASE_URL=https://your-backend-url/api
A Postman collection is included for API testing.
- Open Postman
- Import the file:
postman_collection.json - Set environment variable:
base_url = http://localhost:5000/api || https://your-backend-url/api - Test:
- Register
- Login (copy JWT token)
- Add token in Authorization → Bearer Token
- Test all task routes
git clone https://github.com/Vivek-DK/TaskManagement.git
cd TaskManagementcd backend
npm install
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
NODE_ENV=development
node server.js
cd Frontend
npm install
npm run dev
VITE_API_BASE_URL= 'https://your-backend-url/api'
https://task-management-vivek.vercel.app/
https://taskmanagement-cgzz.onrender.com
- Refresh token rotation
- Role-based authorization
- Redis caching
- Pagination for tasks
- Docker containerization
- CI/CD pipeline
- Glassmorphism dashboard layout
- Smooth animations via Framer Motion
- Responsive design
- Clean dark theme dashboard
- Interactive task cards
- Register a new user
- Login
- Create tasks
- Edit and delete tasks
- Refresh page (session persists)
- Logout and confirm protected route restriction
This project was built as part of a Frontend Developer Internship assessment to demonstrate:
- Full-stack integration
- Secure authentication
- Clean UI/UX
- Scalable architecture
Vivek D K
Frontend Developer