Welcome to the README file for the Pioneer Backend project. This document provides essential information about the backend development tasks completed as part of the Backend Developer Intern Assessment.
This project aims to develop a backend system with various functionalities using Node.js, Express.js, and MongoDB Atlas. Below are the tasks accomplished:
-
Task 1: Implement User Authentication with JWT
- Implemented JWT authentication for user registration, login, and logout.
-
Task 2: Create API Endpoints for Data Retrieval
- Developed API endpoints to fetch data from a public API with filtering options based on categories and result limits.
-
Task 3: Implement Swagger Documentation
- Documented all API endpoints using Swagger for better understanding and usability. Swagger UI is also integrated for interactive API documentation.
-
Task 4: Secure API Endpoint for Authenticated Users Only
- Secured an API endpoint to be accessible only to authenticated users using JWT authentication middleware.
- Deployed Link: Pioneer Backend Deployment
- Swagger Documentation: Swagger API Documentation
- Node.js
- Express.js
- MongoDB Atlas
- JSON Web Tokens (JWT)
- Bcrypt (for hash the password)
- Cors
- Axios
- Dotenv
- Mongoose
- Nodemon
- swagger-jsdoc
- swagger-ui-express
- Register User:
POST /register
- Login User:
POST /login
- Logout User:
GET /logout
- Fetch Data:
GET /data
- Parameters:
category
,limit
- Parameters:
- Protected Endpoint:
GET /secure/protected
To set up the project locally, follow these steps:
- Clone the repository:
git clone <repository_url>
- Intall dependencies:
npm install
- run locally:
npm run server