A scalable Full Stack Task Management App built using React.js, Node.js, Express, and MongoDB with JWT Authentication and Role-Based Access Control.
- User Registration & Login
- Password hashing using bcrypt
- JWT-based authentication
- Admin and User roles
- Admin can access all tasks
- Users can access only their own tasks
- Create Task
- Read Tasks
- Update Task
- Delete Task
- Task fields: title, description, status (pending/completed)
- Protected routes using JWT middleware
- Input validation using Joi
- Role-based authorization middleware
- React.js
- Axios
- JavaScript
- Inline CSS
- Node.js
- Express.js
- MongoDB + Mongoose
- JWT Authentication
- bcrypt.js
- Joi Validation
git clone https://github.com/Prasiddhi26/secure-auth-api.git
cd secure-auth-api
cd backend
npm install
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
npm start
cd frontend
npm install
npm start
- POST /api/auth/register
- POST /api/auth/login
- GET /api/v1/tasks
- POST /api/v1/tasks
- PUT /api/v1/tasks/:id
- DELETE /api/v1/tasks/:id
Prasiddhi Shetty