Skip to content

The app operates in a single coach with 80 seats arranged in rows. Each row has 7 seats except the last row, which has 3 seats. Users can reserve up to 7 seats in a single booking. The system prioritizes booking seats in a complete row. If that's not possible, it allocates adjacent seats.

Notifications You must be signed in to change notification settings

mukulsomukesh/seat-booking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Seat Booking

Deployed App

https://golden-babka-110096.netlify.app/

Video Walkthrough of the project

https://drive.google.com/file/d/15luU-P7s7FcdXVQ7C4QRtrZY8P7HWuDW/view?usp=sharing

Problem Description:

  • There are 80 seats in a coach of a train with only 7 seats in a row and last row of only 3 seats. For simplicity, there is only one coach in this train.
  • One person can reserve up to 7 seats at a time.
  • If a person is reserving seats, the priority will be to book them in one row.
  • If seats are not available in one row then the booking should be done in such a way that the nearby seats are booked.
  • User can book as many tickets as s/he wants until the coach is full.
  • You don’t have to create login functionality for this application

Tech Stack

  • React js
  • Node js
  • Express js
  • MongoDB

Screenshot

Backend Installation

  • clone repo
  • cd backend
  • npm install
  • node index.js

Frontend Installation

  • clone repo
  • cd frontend
  • npm install
  • npm start

API Endpoints

About

The app operates in a single coach with 80 seats arranged in rows. Each row has 7 seats except the last row, which has 3 seats. Users can reserve up to 7 seats in a single booking. The system prioritizes booking seats in a complete row. If that's not possible, it allocates adjacent seats.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published