Coder Social home page Coder Social logo

mahamshahid18 / valet-app-v2-backend Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 95 KB

This is the backend implementation (REST API) for an application which aims to automate the general flow of valet parking systems by handling the ticket generation, payment, and verification of payment digitally.

License: MIT License

JavaScript 100.00%
nodejs express rest-api rest api middleware backend ticketing-system jwt authentication

valet-app-v2-backend's Introduction

Valet Ticketing Application πŸš™πŸ…ΏπŸŽ«

You can view details about this application here. This document only discusses the backend implementation for the application.

Backend Implementation πŸ‘©β€πŸ’»

I decided to make the backend as a REST API, implemented using Node.js and Express. The database that I used in the first version was MySQL but I switched to MongoDB in this version due to its flexibility - which was suitable for this case. For the ticket propagation, I decided to use Twilio SMS API.

App Structure πŸ“‚

The backend app has been split into various logically related parts, to practice separation of concerns. The express application uses middleware for related endpoints. The app contains the following parts/modules:

  • auth: contains an AuthController which acts as middleware for authentication related endpoints. There is also a TokenCheck module available which is for validating tokens sent by the client (authorization)
  • db: contains a module which deals with database connection
  • error: contains a module which acts as a generic error handler. It is used as error handling middleware in the whole application
  • qrcode: contains the QrCodeController which groups together endpoints for generating qrcode for ticket verification
  • ticket: contains a module which groups together the endpoint for generating a valet ticket, as well as the functionality for sending out text messages
  • user: contains a User file which defines the structure for a user object (to be stored in the db), i.e it defines a schema for usage with mongooge. There is also a UserController which acts as middleware for all endpoints related to the user actions
  • valet: contains a Valet file which defines the structure for a valet object (to be stored in the db), i.e it defines a schema for usage with mongooge. There is also a ValetController which acts as middleware for all endpoints related to the valet

REST API Testing 🌧️

Endpoints exposed in the REST API were tested using Postman Client.

Backend Deployment ☁️

The backend is deployed on Heroku cloud.

valet-app-v2-backend's People

Contributors

mahamshahid18 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.