Skip to content

A train seat reservation application with user authentication, dynamic seat booking, and management features. Built using Next.js, Node.js, Express.js, and PostgreSQL, this project follows best practices in web development and provides a seamless user experience for reserving train seats.

Notifications You must be signed in to change notification settings

Omgupta12/Ticket-Booking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Train Seat Reservation System

Project Demo

About the Project

This application allows users to reserve train seats with specific constraints:

  • The train has 80 seats, arranged as 7 seats per row with the last row having 3 seats.
  • Users can reserve up to 7 seats in one booking, prioritizing booking in a single row.
  • Seats are assigned nearby if a single row is unavailable.
  • User authentication is required for seat booking.
  • Booked seats are locked and cannot be reserved by others unless canceled.

Tech Stack

Frontend

Backend

Database

Deployment

  • Frontend - Vercel
  • Backend - Render

Features

  • User Authentication: Sign Up/Login functionality.
  • Responsive Design: Optimized for various devices.
  • Dynamic Routing: Utilizes Next.js file-based routing.
  • Error Handling: Proper validation and error responses.
  • Secure Bookings: Seat locks to avoid duplicate reservations.
  • Administrative Features: Reset seat bookings.
  • Deployment-Ready: Compatible with cloud platforms.

Installation

Prerequisites

Frontend Steps

  1. Clone the repository:
    git clone https://github.com/your-username/Ticket-Booking.git
    cd Ticket-Booking
    cd frontend
  2. Install dependencies:
    npm install
  3. Start the application:
     npm run dev
    

Backend Steps

  1. Clone the repository:
    git clone https://github.com/your-username/Ticket-Booking.git
    cd Ticket-Booking
    cd backend
  2. Install dependencies:
    npm install
  3. Start the application:
    node server.js
    

Screenshots

Login Page

Login-Page

Signup Page

Booking Page

Booking Page

Booking Page

API Endpoints

Best Practices Followed

  • Validation: Input sanitization and validation.
  • Error Handling: Graceful responses for edge cases.
  • Security: Use of JWT, bcrypt, etc.
  • Code Quality: Linting and adherence to coding standards.
  • Modularity: Clean, reusable components and modules

Contact

Project Owner

About

A train seat reservation application with user authentication, dynamic seat booking, and management features. Built using Next.js, Node.js, Express.js, and PostgreSQL, this project follows best practices in web development and provides a seamless user experience for reserving train seats.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published