Skip to content

Lonekaiser04/Task-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Task Manager Pro - Full Stack Application

License: MIT Node MongoDB React


πŸ“Œ Brief Description

Task Manager Pro is a production-ready full-stack task management system built as a backend developer internship assignment. It demonstrates modern industry practices including JWT authentication, role-based access control (RBAC), and a scalable architecture. The application features a robust Node.js backend and a responsive React frontend.


✨ Features

πŸ” Authentication & Authorization

  • JWT-based authentication (7-day expiry)
  • Role-Based Access Control (User/Admin)
  • Password hashing using bcryptjs
  • Protected routes (frontend & backend)
  • Account activation/deactivation (Admin only)

πŸ› οΈ Admin Features

  • User management (activate/deactivate users)
  • View all users with pagination
  • System dashboard with statistics
  • Manage all tasks across users

πŸ‘€ User Features

  • Full CRUD operations for tasks
  • Advanced filtering (status, priority, search)
  • Task statistics dashboard
  • Priority levels (Low, Medium, High)
  • Due date tracking with overdue indicators

πŸ›‘οΈ Security Features

  • Rate limiting (API/Auth/Task creation)
  • Helmet.js security headers with CSP
  • CORS protection with whitelist
  • Input validation & sanitization
  • MongoDB injection prevention
  • XSS protection
  • Global error handling middleware

🧰 Tech Stack

Frontend Backend DevOps / Tools
React 18 Node.js Docker
Vite Express.js Docker Compose
React Router v6 MongoDB Winston Logging
Axios Mongoose ODM Swagger API Docs
react-hot-toast JWT (jsonwebtoken) Postman
date-fns bcryptjs
CSS3 express-validator

πŸ—οΈ Architecture

React Frontend
      β”‚
      β–Ό
 API Layer (Express)
      β”‚
      β–Ό
 Middleware (Auth, Validation, Rate Limiting)
      β”‚
      β–Ό
 Controllers (Auth / Task)
      β”‚
      β–Ό
 MongoDB Database (Mongoose ODM)

⚑ Quick Start

πŸ“‹ Prerequisites

  • Node.js >= 18
  • MongoDB 7.0
  • npm / yarn
  • Docker (optional)

πŸ“₯ Clone Repository

git clone <https://github.com/lonekaiser04/Task-Manager-Pro>
cd task-manager-pro

πŸ”§ Backend Setup

cd backend
npm install
cp .env.example .env
npm run seed:admin
npm start

🎨 Frontend Setup

cd frontend
npm install
cp .env.example .env
npm run dev

πŸ”‘ Default Credentials

Role Email Password
Admin adminkaiser@gmail.com admin123
User user@example.com user123

πŸ“ Project Structure

Backend

backend/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ controllers/
β”‚   β”œβ”€β”€ middleware/
β”‚   β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ routes/
β”‚   └── utils/
β”œβ”€β”€ logs/
β”œβ”€β”€ .env.example
β”œβ”€β”€ package.json
β”œβ”€β”€ server.js

Frontend

frontend/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ context/
β”‚   β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ App.jsx
β”‚   └── main.jsx
β”œβ”€β”€ .env.example
β”œβ”€β”€ package.json

πŸ“‘ API Endpoints

Method Endpoint Access Description
POST /auth/register Public Register user
POST /auth/login Public Login user
GET /auth/me Private Get profile
PUT /auth/me Private Update profile
POST /auth/change-password Private Change password
GET /auth/users Admin Get all users
GET /tasks Private Get tasks
POST /tasks Private Create task
GET /tasks/:id Private Get task
PUT /tasks/:id Private Update task
DELETE /tasks/:id Private Delete task
GET /tasks/admin/all Admin Get all tasks

πŸ§ͺ Testing

npm run test:db
npm run test:api

🐳 Docker Deployment

docker-compose up -d

Services:

  • MongoDB
  • Backend API
  • Frontend (Nginx)

βš™οΈ Environment Variables

Backend

Variable Description
MONGO_URI MongoDB connection string
JWT_SECRET Secret key for JWT
PORT Server port
NODE_ENV Environment mode

Frontend

Variable Description
VITE_API_URL Backend API URL

πŸ” Security Implementations

Feature Implementation
Rate Limiting express-rate-limit
Authentication JWT
Password Security bcryptjs hashing
Headers Security Helmet.js
Validation express-validator
Logging Winston

βœ… Assignment Requirements Checklist

Requirement Status
JWT Authentication βœ…
Password Hashing βœ…
Role-Based Access Control βœ…
CRUD Operations βœ…
API Versioning βœ…
Error Handling βœ…
API Documentation βœ…
MongoDB Schema βœ…
React Frontend βœ…
Input Sanitization βœ…
Scalable Structure βœ…
Docker Deployment βœ…
Scalability Documentation βœ…

πŸ“š Documentation Links

  • Swagger UI: /api-docs
  • Postman Collection: Task-Manager-API.postman_collection.json
  • Scalability Doc: SCALABILITY.md

πŸ“Έ Screenshots

  • Login Page UI
  • Dashboard with Task Stats
  • Admin Panel
  • Task List & Filters
  • Swagger API Docs

πŸš€ Future Enhancements

  • Email notifications for tasks
  • Real-time updates with WebSockets
  • Mobile app (React Native)
  • Dark mode UI
  • File attachments in tasks
  • OAuth (Google/GitHub login)
  • Advanced analytics dashboard
  • Multi-language support
  • AI-based task suggestions

πŸ‘¨β€πŸ’» Author


πŸ“„ License

This project is licensed under the MIT License.


πŸ™Œ Acknowledgments

  • Internship Assignment Guidelines
  • Open Source Community
  • Node.js & React Ecosystem

⭐ If you found this project useful, consider giving it a star!

About

πŸš€ Full-stack Task Manager with JWT authentication, Role-Based Access Control (RBAC), and React frontend. Built as a backend developer internship assignment demonstrating production-ready API design, security best practices, and scalable architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors