This project is a simple Bus Booking Application built with React. It allows users to select a bus, enter their details, specify the number of passengers, and confirm the booking. The total price is dynamically calculated based on the number of passengers and the bus fare per passenger.
- Displays bus details, including route, departure time, price, and available seats.
- Allows users to specify the number of passengers.
- Collects individual passenger names.
- Calculates the total fare dynamically.
- Validates user input and ensures all required fields are completed.
- Handles cases where no bus is selected gracefully.
Take the buses routes from the frontend/public folder and add them to your create a busesroutes in mongodb and import this csv into it.
git clone https://github.com/Saipradyumnagoud/Bus-booking-portal.git
cd Bus-booking-portal
cd frontend
npm install
npm start
cd ../server
npm install
npm start
Open your browser and navigate to http://localhost:3000 to view the application.
- Select a bus from the main application.
- Navigate to the booking page.
- Enter your details, including full name, email, and phone number.
- Specify the number of passengers.
- Enter the names of all passengers.
- Review the total price and confirm the booking.
Feel free to reach out via GitHub Issues if you encounter any issues or have suggestions for improvement!