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.
- 🚖 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
- Server: Express.js
- Promise Library: Bluebird
- Request Parsing: BodyParser
- Password Encryption: Bcrypt
- Input Validation: Joi
- Authorization: JSON Web Tokens
- Real-time alerts: Socket.io
- Date/Time: Node-DateTime
- Error Handling: Boom
- API Documentation: Swagger-UI
- Primary database to store all information related to admins, bookings, customers and fleets: MySQL
- Server Cache: Redis
- Server logs: MongoDB
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 |
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 Code | Description |
---|---|
200 | OK |
400 | BAD REQUEST |
404 | NOT FOUND |
500 | INTERNAL SERVER ERROR |