The Concert Reservation System is a web application designed to facilitate the booking of concert tickets. The system supports user authentication, concert management by administrators, and a seat reservation system for users. This project leverages modern technologies such as Node.js, Express, PostgreSQL, and JWT for secure user authentication.
- User Authentication: Users can sign up and log in.
- Browse Concerts: Users can view available concerts and their showtimes.
- Seat Reservation: Users can select seats for a concert and make reservations.
- Manage Reservations: Users can view and cancel their reservations.
- Manage Concerts: Admins can create, update, or delete concerts.
- Manage Showtimes: Admins can define showtimes for concerts.
- View Reports: Admins can access data on reservations, including the number of tickets sold and total revenue.
- Backend: Node.js with Express
- Database: PostgreSQL
- ORM: Drizzle
- Authentication: JSON Web Tokens (JWT)
- Validation: Zod
- Node.js
- PostgreSQL
-
Clone the repository:
git clone https://github.com/shaikahmadnawaz/bookit-api.git cd bookit-api -
Install dependencies:
npm install
-
Set up the environment variables: Create a
.envfile in the root directory with the following content:PORT= DATABASE_HOST=127.0.0.1 DATABASE_PORT=5432 DATABASE_USER= DATABASE_PASSWORD= DATABASE_NAME= -
Initialize the database: Run the necessary migrations using Drizzle to set up your database schema.
-
Start the db using docker-compose:
docker-compose up
-
Start the development server:
npm run dev
POST /auth/signup- User registrationPOST /auth/login- User login
POST /concerts- Create a new concertGET /concerts- Get list of all concertsPUT /concerts/:id- Update concert detailsDELETE /concerts/:id- Delete a concert
POST /concerts/:id/showtimes- Create showtime for a concertGET /concerts/:id/showtimes- Get showtimes for a concertPUT /showtimes/:id- Update showtime detailsDELETE /showtimes/:id- Delete a showtime
GET /concerts/:id/showtimes/:showtimeId/seats- Get available seats for a showtimePOST /concerts/:id/showtimes/:showtimeId/reserve- Reserve seatsGET /users/:id/reservations- View user reservationsDELETE /reservations/:id- Cancel reservation
GET /admin/reports/reservations- Get all reservations, capacity, and revenue
- Implement real-time notifications for users regarding reservation status.
- Enhance user interface for better user experience.
- Integrate payment processing for ticket purchases.