Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rakibul58/dentist-fantastic-server
https://github.com/rakibul58/dentist-fantastic-server
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rakibul58/dentist-fantastic-server
- Owner: rakibul58
- Created: 2022-11-29T12:54:27.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-27T14:04:38.000Z (about 1 month ago)
- Last Synced: 2024-11-27T15:21:19.113Z (about 1 month ago)
- Language: JavaScript
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Dentist Fantastic
[Live Site](https://dentist-fantastic-server.vercel.app/)
### 📖 Project Description
The **Dentist Fantastic** server is a Node.js and Express-based backend application that powers the Dentist Fantastic platform. It provides secure APIs for managing services and user reviews, with data stored in MongoDB. JWT is used for securing private routes.---
### 🚀 Features and Functionalities
- **Service Management**
- Fetch all services or a limited number of services.
- Add a new service to the system.
- Fetch individual service details.- **Review System**
- Fetch all reviews or reviews for a specific service.
- Post, update, or delete reviews.- **Authentication**
- Issue JWT tokens for secure access.
- Protect sensitive routes with JWT middleware.---
### 🛠️ Technologies Used
- **Backend**: Node.js with Express.js
- **Database**: MongoDB with MongoDB Atlas
- **Authentication**: JSON Web Tokens (JWT)
- **Environment Management**: dotenv
- **CORS**: Cross-Origin Resource Sharing---
### ⚙️ Installation and Setup
1. Clone the repository:
```bash
git clone https://github.com/rakibul58/dentist-fantastic-server.git
```2. Navigate to the project directory:
```bash
cd dentist-fantastic-server
```3. Install dependencies:
```bash
npm install
```4. Create a `.env` file in the root directory and add the following variables:
```plaintext
PORT=5000
DB_USER=your-mongodb-username
DB_PASSWORD=your-mongodb-password
ACCESS_TOKEN_SECRET=your-jwt-secret
```5. Start the server:
```bash
npm start
```The server will run locally at [http://localhost:5000](http://localhost:5000).
---
### 📂 API Endpoints
#### Public Endpoints
- **GET** `/services`
Fetch all or a limited number of services.- **GET** `/services/:id`
Fetch details of a specific service by ID.- **POST** `/services`
Add a new service to the database.#### Protected Endpoints
- **POST** `/jwt`
Generate a JWT token for secure access.- **GET** `/comments`
Fetch all user comments (requires JWT).- **GET** `/comments/:id`
Fetch comments for a specific service.- **POST** `/comments`
Add a new comment.- **PATCH** `/comments/:id`
Update an existing comment.- **DELETE** `/comments/:id`
Delete a comment by ID.---
### 📜 License
This project is open-source and available under the ISC License.
---