Skip to content

Backend Developer Assignment for only click Internship. This project is a Node.js & Express.js API with MongoDB for user authentication and task management. It includes JWT-based authentication, secure CRUD operations, and rate limiting for security.

Notifications You must be signed in to change notification settings

KhushiRajurkar/backend_assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend Assignment

Description

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.

Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB (Mongoose ODM)
  • Authentication: JSON Web Token (JWT)
  • Security Features: Rate Limiting, Middleware-based Authorization

Features

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

API Endpoints

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)

How to Run Locally

1️⃣ Clone the repository

git clone https://github.com/KhushiRajurkar/backend_assignment.git
cd backend_assignment

2️⃣ Install dependencies

npm install

3️⃣ Create a .env file and add:

PORT=5000
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_secret_key

4️⃣ Start the server

node src/server.js

The API will run on http://localhost:5000/ 🚀

Screenshots

✅ User Signup in Postman

Screenshot 2025-03-15 114249

✅ User Login & Token Generation

Screenshot 2025-03-15 114334

✅ Creating a Task (Authenticated)

Screenshot 2025-03-15 114537

✅ Retrieving Tasks (Authenticated)

Screenshot 2025-03-15 114644

📜 License

This project is for educational purposes and is not intended for production use.


💡 Created by Khushi Rajurkar

About

Backend Developer Assignment for only click Internship. This project is a Node.js & Express.js API with MongoDB for user authentication and task management. It includes JWT-based authentication, secure CRUD operations, and rate limiting for security.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published