Skip to content

Server built with Node's Express.js, MySQL, and MongoDB to store data and logs and simulate a complete basic backend of a cab booking application.

License

Notifications You must be signed in to change notification settings

nischaldutt/cab-booking-web-app-backend

Repository files navigation

Server built with Node's Express.js, along with MySQL and MongoDB to store data and logs and simulates complete basic backend of a cab booking application.


Build Status GNU Licence

Features

  • 🚖 Complete backend including basic API's of customer, driver(fleet) and admin.
  • 🏗️ Developed and implemented REST web services in MVC friendly codebase structure.
  • 📊 The application is fully capable of manipulating all input data, process it, and then store it in relational database server.
  • 📍 Designed location services for the application by utilizing MySQL’s geo-spatial queries.
  • 🔑 Authorized requests
  • 🔐 Password encryption
  • ✔️ User input validation
  • ⚠️ Error handling
  • 📄 API Documentation

Swagger Dashboard

Swagger dashboard

Database Schema

Database Schema

Sample Request in swagger

Sample Request

Sample response from request in swagger

Sample Response

Packages Used

Databases

  • Primary database to store all information related to admins, bookings, customers and fleets: MySQL
  • Server Cache: Redis
  • Server logs: MongoDB

API Reference

Endpoint Type Description
/customer/register POST Register a new customer
/customer/login POST Sign in the customer account
/customer/create-booking POST Customer creates a new booking
/customer/view-booking GET Get information of created booking
/driver/register POST Register a new driver
/driver/login POST Sign in the driver account
/driver/complete-booking PUT Driver completes the ongoing booking
/admin/login POST Sign in the admin account
/admin/assign-booking PUT Admin assigns a booking manually
/admin/get-all-bookings GET Get all bookings

Responses

API endpoints return the JSON representation of the resources created or edited.

{
  "message" : string,
  "status"  : number,
  "data"    : string
}

The message attribute contains a message commonly used to indicate errors or, in the case of deleting a resource, success that the resource was properly deleted.

The status attribute describes if the transaction was successful or not.

The data attribute contains any other metadata associated with the response. This will be an escaped string containing JSON data.

Status Codes

Status Code Description
200 OK
400 BAD REQUEST
404 NOT FOUND
500 INTERNAL SERVER ERROR

About

Server built with Node's Express.js, MySQL, and MongoDB to store data and logs and simulate a complete basic backend of a cab booking application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published