A secure and user-based Task Manager application built using Node.js, Express, MySQL, and React (Vite). Users can register, log in, and manage their personal tasks with full CRUD functionality.
- User Signup & Login
- Password hashing using bcrypt
- JWT-based authentication
- Protected routes using middleware
- Create new tasks
- View all tasks (user-specific)
- Update tasks
- Delete tasks
- Filter tasks by status (pending / completed)
- Priority levels (low, medium, high)
- Secure user-specific data handling
- Node.js
- Express.js
- MySQL
- JWT (Authentication)
- bcrypt (Security)
- React (Vite)
- Axios
- Tailwind CSS (optional for styling)
Task_Manager/
│
├── backend/
│ ├── config/
│ │ └── db.js
│ │
│ ├── controllers/
│ │ ├── authController.js
│ │ └── taskController.js
│ │
│ ├── routes/
│ │ ├── authRoutes.js
│ │ └── taskRoutes.js
│ │
│ ├── middleware/
│ │ └── authMiddleware.js
│ │
│ ├── models/ (optional - for scalable design)
│ │ └── taskModel.js
│ │
│ ├── .env
│ ├── package.json
│ └── server.js
│
├── frontend/
│ ├── public/
│ │
│ ├── src/
│ │ ├── assets/
│ │ │
│ │ ├── components/
│ │ │ ├── layout/
│ │ │ │ ├── Layout.jsx
│ │ │ │ ├── Sidebar.jsx
│ │ │ │ └── Navbar.jsx
│ │ │ │
│ │ │ ├── ui/
│ │ │ │ ├── Button.jsx
│ │ │ │ ├── Input.jsx
│ │ │ │ └── Card.jsx
│ │ │ │
│ │ │ └── common/
│ │ │ └── Loader.jsx
│ │ │
│ │ ├── pages/
│ │ │ ├── Login.jsx
│ │ │ ├── Signup.jsx
│ │ │ └── Dashboard.jsx
│ │ │
│ │ ├── context/
│ │ │ ├── AuthContext.jsx
│ │ │ └── ThemeContext.jsx
│ │ │
│ │ ├── services/
│ │ │ └── api.js
│ │ │
│ │ ├── utils/
│ │ │ └── helpers.js
│ │ │
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ └── index.css
│ │
│ ├── index.html
│ ├── package.json
│ └── vite.config.js
│
└── README.md
config/→ database connectioncontrollers/→ business logicroutes/→ API endpointsmiddleware/→ authentication (JWT)models/→ optional DB abstraction layerserver.js→ main entry point
components/→ reusable UIpages/→ main screenscontext/→ global state (auth + theme)services/→ API callsutils/→ helper functionsApp.jsx→ routing + layout
---
# ⚙️ Installation & Setup
## 🔹 Backend Setup
```bash
cd backend
npm install
Create .env file:
PORT=3000
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=task_manager
JWT_SECRET=your_secret_keyRun backend:
node server.jscd frontend
npm install
npm run devPOST /api/auth/signupPOST /api/auth/login
POST /api/tasks→ Create taskGET /api/tasks→ Get all tasksGET /api/tasks?status=pending→ Filter tasksPUT /api/tasks/:id→ Update taskDELETE /api/tasks/:id→ Delete task
- id (Primary Key)
- name
- email (Unique)
- password (Hashed)
- id
- title
- description
- dueDate
- status
- priority
- userId (Foreign Key)
Signup → Login → JWT Token Generated
↓
Token sent in headers (Authorization: Bearer <token>)
↓
Middleware verifies user
↓
Access granted to protected routes
Use Postman to test APIs:
- Signup user
- Login → copy token
- Add token in header
- Test task APIs
- REST API design
- JWT authentication
- Middleware usage
- MySQL integration
- Secure coding practices
- Full-stack architecture
- Add categories for tasks
- Add pagination
- Add notifications
- Improve UI/UX with animations
Neel Patil