vmanav / bespeak

Zomentum Hiring Assignment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bespeak

Ticket Booking Interface

Version License: ISC

Index

About

bespeak is a REST API based movie ticket booking interface for Zomentum Hiring Challenge. It is built using Node.js and the database used is SQLite, It is a fully documented API.

Description of the Problem Statement

You have to design a REST interface for a movie theatre ticket booking system. It should support the following business cases:

  • An endpoint to book a ticket using a user’s name, phone number, and timings.

  • An endpoint to update a ticket timing.

  • An endpoint to view all the tickets for a particular time.

  • An endpoint to delete a particular ticket.

  • An endpoint to view the user’s details based on the ticket id.

  • Mark a ticket as expired if there is a diff of 8 hours between the ticket timing and current time.

  • Note: For a particular timing, a maximum of 20 tickets can be booked.

  • You should follow the REST paradigm while building your application.

  • You can use any database you like.

  • Create a proper readme for your project.

  • Plus point if you could delete all the tickets which are expired automatically.

  • Plus point if you could write the tests for all the endpoints.

  • Please attach a screenshot of your postman while testing your application.

  • Please avoid plagiarism.

Usage

Prerequisites

  • Node.js installed.

Setup

  1. Fork the repository and clone it to your local machine.
  2. cd into the directory bespeak
  3. Install Dependencies with
    npm i
  4. Start the application
    node server.js
  5. The interface will be live at http://localhost:3000.

Database Schema

Field DataType AllowNull Comments
id INTEGER NA primaryKey
name STRING false User Name
number STRING false User Contact Number
timming DATE false Show Timming
expired BOOLEAN false Validity

API Endpoints

Home Page
Home Page
Book Ticket
Book Ticket
Search Tickets
Search Tickets
Update Ticket
Update Ticket
Get Ticket Details
Get Ticket Details
Delete Ticket
Delete Ticket

Gallery

Home Page
Home Page
Book Ticket
Book Ticket
Search Tickets
Search Tickets
8 Hours  Validity, Cron job Deletion
8 Hours Expiration
Update Ticket
Update Ticket
Get Ticket Details
Get Ticket Details
Delete Ticket
Delete Ticket

Author

👤 Manav Verma

Show your support

Give a ⭐️ if this project helped you!

About

Zomentum Hiring Assignment


Languages

Language:JavaScript 100.0%