This is a backend API built using Node.js, Express.js, and MongoDB for user authentication and task management. It includes JWT-based authentication, secure CRUD operations, and rate limiting for security.
- Backend: Node.js, Express.js
- Database: MongoDB (Mongoose ODM)
- Authentication: JSON Web Token (JWT)
- Security Features: Rate Limiting, Middleware-based Authorization
✅ User Authentication (Signup/Login with JWT)
✅ Task Management (CRUD API for tasks)
✅ Protected Routes (Only authenticated users can access tasks)
✅ Rate Limiting to prevent abuse
Method | Endpoint | Description |
---|---|---|
POST |
/api/auth/signup |
Register a new user |
POST |
/api/auth/login |
Login and get a JWT token |
POST |
/api/tasks |
Create a new task (Requires JWT) |
GET |
/api/tasks |
Get all tasks (Requires JWT) |
PUT |
/api/tasks/:id |
Update a task (Requires JWT) |
DELETE |
/api/tasks/:id |
Delete a task (Requires JWT) |
git clone https://github.com/KhushiRajurkar/backend_assignment.git
cd backend_assignment
npm install
PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret_key
node src/server.js
The API will run on http://localhost:5000/
🚀
This project is for educational purposes and is not intended for production use.
💡 Created by Khushi Rajurkar