A full-stack, role-based Task Management System built with the PERN stack (PostgreSQL, Express, React, Node.js).
- Frontend: React (Vite), React Router, Tailwind CSS, Axios
- Backend: Node.js, Express.js
- Database: PostgreSQL
- Security: JWT (JSON Web Tokens) Authentication, bcrypt password hashing
- Secure Authentication: User registration and login using JWT.
- Role-Based Access Control: Differentiated access levels for
userandadmin. - Task Management: Full CRUD capabilities for task entities.
- Responsive UI: Modern, mobile-first design implemented with Tailwind CSS.
- Node.js (v14+)
- PostgreSQL
Create a .env file in the server directory with the following variables:
PORT=5000
DB_USER=postgres
DB_HOST=localhost
DB_NAME=task_management
DB_PASSWORD=your_postgres_password
DB_PORT=5432
JWT_SECRET=your_jwt_secretExecute the initialization script to set up the relational schemas:
psql -U postgres -d task_management -f server/database/init.sqlcd server
npm install
npm run devcd client
npm install
npm run dev| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/v1/auth/register |
Register new user account | No |
| POST | /api/v1/auth/login |
Authenticate user and return JWT | No |
| POST | /api/v1/tasks |
Create a new task | Yes |
| GET | /api/v1/tasks |
Retrieve tasks based on role permissions | Yes |
| PUT | /api/v1/tasks/:id |
Update existing task | Yes |
| DELETE | /api/v1/tasks/:id |
Remove task | Yes |