Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amanmandal-m/flurn_booking_system_backend
This is Flurn Company Assignment this is for booking seats backend system .
https://github.com/amanmandal-m/flurn_booking_system_backend
cors csvtojson dotenv express-js mongoose node-js render swagger-docs swagger-ui
Last synced: about 2 months ago
JSON representation
This is Flurn Company Assignment this is for booking seats backend system .
- Host: GitHub
- URL: https://github.com/amanmandal-m/flurn_booking_system_backend
- Owner: Amanmandal-M
- Created: 2023-06-19T07:52:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-25T18:21:05.000Z (over 1 year ago)
- Last Synced: 2024-04-09T14:57:31.946Z (9 months ago)
- Topics: cors, csvtojson, dotenv, express-js, mongoose, node-js, render, swagger-docs, swagger-ui
- Language: JavaScript
- Homepage: https://flurn-booking-service.up.railway.app/
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Booking Service Backend
## About
This is Flurn Company Assignment this is for booking seats.
## Clone Repository
```
git clone https://github.com/Amanmandal-M/Flurn_Booking_System_Backend.git
```## Installation
```
npm i -g nodemon
npm install / npm i
```## Start the Backend server
```
node index.jsnodemon index.js
```Note : You can use any of them
## MVC Structure
```
├── index.js
├── configs
| └── db.js
├── models
| └── seatsModel.js
| └── seatsPricingModel.js
├── routes
| └── seatRouter.js
| └── bookingRouter.js
├──controllers
| └── dataConverterController.js
| └── seatController.js
```Note:
- Before doing anything first create `.env` file and put `PORT` , `MONGO_URI`
- `PORT` is for listening the server.
- `MONGO_URI` is for running database and store your data in database so put your mongo link.
## Swagger API documentation
## Backend Deployment Link
## Schema Design
Seats Schema
```js
{
_id: ObjectId,
id: {
type: String,
required: true
},
seat_identifier: {
type: String,
required: true
},
seat_class: {
type: String,
required: true
},
is_booked : {
type: Boolean,
required: false
}
}
```
Seats Pricing Schema
```js
{
_id: ObjectId,
id: {
type: String,
required: true,
},
seat_class: {
type: String,
required: true,
},
min_price: {
type: String,
default: null,
},
normal_price: {
type: String,
required: true,
},
max_price: {
type: String,
default: null
},
}
```## Endpoints
METHOD
ENDPOINT
DESCRIPTION
STATUS CODE
GET
/api/seats
This endpoint should allow users for retrieving all seats data.
200
GET
/api/seats/:id
This endpoint should allow users to for retrieving a single seats by ID.
200
POST
/api/seats
This endpoint is for for adding new seat data.
200
POST
/api/seatPricing
This endpoint is for for adding new seat pricing data.
200
DELETE
/api/seats/:id
This endpoint is for deleting seats data by ID.
202
DELETE
/api/seatPricing/:id
This endpoint is for deleting seats Pricing data by ID.
202