Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tariqul420/service-orbit-server
This is the backend server for the Service Orbit application, a service-sharing platform that connects service providers with customers. This server handles authentication, service management, and other backend functionalities using Node.js, Express.js, MongoDB, and JWT.
https://github.com/tariqul420/service-orbit-server
cookieparser cors dotenv expressjs jwt mongodb nodejs
Last synced: about 7 hours ago
JSON representation
This is the backend server for the Service Orbit application, a service-sharing platform that connects service providers with customers. This server handles authentication, service management, and other backend functionalities using Node.js, Express.js, MongoDB, and JWT.
- Host: GitHub
- URL: https://github.com/tariqul420/service-orbit-server
- Owner: tariqul420
- Created: 2025-01-09T08:17:23.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-02-11T06:14:51.000Z (1 day ago)
- Last Synced: 2025-02-11T07:23:53.518Z (1 day ago)
- Topics: cookieparser, cors, dotenv, expressjs, jwt, mongodb, nodejs
- Language: JavaScript
- Homepage: https://service-orbit.web.app
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Service Orbit Backend
This is the backend server for the **Service Orbit** application, a service-sharing platform that connects service providers with customers. This server handles authentication, service management, and other backend functionalities using Node.js, Express.js, MongoDB, and JWT.
## 🚀 Project Overview
- **Framework**: Node.js
- **Database**: MongoDB
- **Authentication**: JWT with cookies
- **Environment Variables**: Managed using `.env` file---
## 📜 Features
### 🔐 Authentication
- JWT-based authentication.
- Secure cookie storage for tokens.
- Login and logout endpoints.### 📦 Services Management
- Add, update, delete, and fetch services.
- Search services by name.
- Fetch popular services and banner data.### 📑 Bookings Management
- Add and fetch booked services.
- Manage booking status.### 🔧 Middleware
- `verifyToken`: Verifies the JWT token for protected routes.
---
## 🛠 Technology Used
- **Node.js**: Backend framework.
- **Express.js**: Web server.
- **MongoDB**: Database.
- **JWT**: Authentication.
- **dotenv**: Environment variable management.
- **cors**: Cross-Origin Resource Sharing.
- **cookie-parser**: For handling cookies.---
## 🔗 Endpoints
### Public Endpoints
- `/jwt` - Generate JWT token.
- `/logout` - Clear JWT token.
- `/banner` - Fetch banner data.
- `/popular-services` - Fetch top 4 popular services.
- `/all-services` - Fetch all services with optional search query.
- `/service-details/:id` - Fetch service details by ID.### Protected Endpoints (Require JWT)
- `/add-service` - Add a new service.
- `/add-purchase` - Add a purchase request.
- `/manage-service` - Fetch all services for a specific provider.
- `/manage-service/:id` - Delete a specific service by ID.
- `/update-service/:id` - Update a service by ID.
- `/booked-service` - Fetch all booked services for a user.
- `/service-todo` - Fetch all tasks assigned to a service provider.
- `/service-todo-update-status/:id` - Update booking status.---
## 🚀 Installation
### Prerequisites
- Node.js and npm installed.
- MongoDB connection string.### Steps to Run Locally
1. Clone the client-side repository:
```bash
git clone https://github.com/tariqul420/Service-Orbit-Server.git
cd Service-Orbit-Server
```2. Install dependencies:
```bash
npm install
```3. Start the server:
```bash
node index.js
```--- OR ---
```bash
nodemon index.js
```4. Open the project in a code editor:
```bash
code .
```
5. Add the `.env` file in the root directory and include the following environment variables:
```bash
DATABASE_USERNAME=YOUR_DATABASE_USERNAME
DATABASE_PASSWORD=YOUR_DATABASE_PASSWORD
ACCESS_TOKEN_SECRET=YOUR_ACCESS_TOKEN_SECRET
```
> **Note:** Replace the `index.js` file's `your_mongo_connection_string` and the `.env` file's `YOUR_DATABASE_USERNAME`, `YOUR_DATABASE_PASSWORD`, and `YOUR_ACCESS_TOKEN_SECRET` with actual values.## 🔗 Useful Links
- **Frontend Repository:** [_github/tariqul420/client_](https://github.com/tariqul420/Service-Orbit.git)
- **Live Site:** [_Service-Orbit.com_](https://service-orbit.web.app)