An open API service indexing awesome lists of open source software.

https://github.com/pragatisharma21/backend

This is a backend API built using Node.js and Express.js for handling user authentication, data management, and secure API interactions. The project follows MVC architecture and uses MongoDB as the database.
https://github.com/pragatisharma21/backend

cron-jobs docker dotenv expressjs mongodb nodejs nodemon pm2

Last synced: 2 months ago
JSON representation

This is a backend API built using Node.js and Express.js for handling user authentication, data management, and secure API interactions. The project follows MVC architecture and uses MongoDB as the database.

Awesome Lists containing this project

README

          

πŸ“Œ Backend Project - Setup Guide
πŸš€ Prerequisites
Before running this project, ensure you have the following installed:

Node.js (v16 or later) - Download
npm or yarn (Package Manager)
MongoDB (If using MongoDB locally, ensure it’s running)
Postman (For API testing - optional)
πŸ›  Installation & Setup
1️⃣ Clone the repository:

sh
Copy
Edit
git clone
cd
2️⃣ Install dependencies:

sh
Copy
Edit
npm install
3️⃣ Set up environment variables:
Create a .env file in the root directory and configure:

sh
Copy
Edit
PORT=5000
MONGO_URI=
JWT_SECRET=
4️⃣ Run the server:

sh
Copy
Edit
npm run dev
(Default port is 5000, change in .env if needed)

πŸ“Œ Project Structure
bash
Copy
Edit
πŸ“‚ backend-project
┣ πŸ“‚ src
┃ ┣ πŸ“‚ config # Database & other configurations
┃ ┣ πŸ“‚ controllers # Business logic for APIs
┃ ┣ πŸ“‚ middleware # Authentication & other middlewares
┃ ┣ πŸ“‚ models # Mongoose/Database models
┃ ┣ πŸ“‚ routes # API routes
┃ β”— πŸ“‚ utils # Helper functions
┣ πŸ“„ .env # Environment variables
┣ πŸ“„ server.js # Entry point
┣ πŸ“„ package.json # Dependencies & scripts
β”— πŸ“„ README.md # Project documentation
πŸ”₯ API Endpoints
Method Route Description Auth Required
POST /auth/signup Register new user ❌
POST /auth/login User login & JWT token ❌
GET /users Get all users βœ…
POST /data Add new data entry βœ…
(For full API details, refer to routes folder)

✨ Technologies Used
Node.js + Express.js
MongoDB + Mongoose
JWT Authentication
Bcrypt for Password Hashing
dotenv for Environment Variables