Reserve Bus is a web application that enables users to book bus tickets and manage their bookings seamlessly. This application is built using the MERN stack (MongoDB, Express.js, React.js, Node.js) and integrates with Stripe for secure payment processing.
- Visit the Reserve Bus App frontend at https://reserve-48ilk5x4r-somya-bhardwajs-projects.vercel.app/.
- Browse available bus routes and select your preferred route.
- Choose your departure date and time.
- Select the number of seats you wish to book.
- Proceed to checkout and make the payment using Stripe.
- Upon successful payment, you will receive a booking confirmation along with your ticket details.
- Client: React.js, Bootstrap
- Server: Node.js, Express
- Database: MongoDB
- Payment Gateway: Stripe
The frontend of this application utilizes the following dependencies:
- axios: A promise-based HTTP client for making requests to the backend.
- bootstrap: A popular CSS framework for creating responsive and stylish user interfaces.
- notistack: A notification library for displaying user-friendly messages.
- react-bootstrap: A library that combines React and Bootstrap components.
- react-dom: A package for rendering React components in the browser.
- react-scripts: A set of scripts and configuration for React applications.
- react-toastify: A toast notification library for React applications.
The backend of this application relies on the following dependencies:
- express: A fast and minimal web framework for Node.js.
- mongoose: An elegant MongoDB object modeling tool for Node.js.
- stripe: Stripe SDK for processing payments.
To run this project, you will need to set up the following environment variables in your .env
file:
API_KEY
: Your MongoDB cluster connection key.MONGODB_URI
: MongoDB live connection string.MONGODB_URI_LOCAL
: MongoDB local connection string (for local development).COLLECTION_NAME
: Name of the MongoDB collection.NODE_ENV
: Set todevelopment
for local development orproduction
for live deployment.APP_PORT
: Port number for the backend server.STRIPE_SECRET_KEY
: Stripe secret key for payment processing.
To run the application locally, follow these steps:
- Clone the repository.
- Navigate to the
client
directory and runnpm install
, thennpm start
. - Navigate to the
server
directory and runnpm install
, thennpm start
.
Base URL: