Welcome to our comprehensive Booking App built using the MERN (MongoDB, Express.js, React.js, Node.js) stack! This repository contains the complete source code for a full-fledged booking application.
This project serves as a fully functional booking application developed using the MERN stack. It offers a range of features for managing hotels, user authentication, image uploads, search and filtering, online payments, and booking management.
- User Authentication: Implement secure login and registration using HTTP cookies and JWT for a seamless user experience.
- Hotel Management: Master adding, editing, and viewing hotels, covering everything from form inputs to state management.
- Image Uploads: Integrate image uploads, a crucial feature for any booking platform.
- Search, Sort, & Filter: Enhance user experience with functionalities to search, sort, and filter hotels, making it easy for users to find their perfect stay.
- Online Payments: Integrate Stripe for secure and efficient hotel booking payments.
- Booking Management: Implement the feature to view and manage bookings, essential for any booking application.
- Recent Hotels on Home Page: Display recently added hotels on the home page, keeping the content dynamic and engaging.
- UI Testing with Playwright: Utilize Playwright for UI testing to ensure the application functions correctly across different browsers and devices.
The Booking App is deployed on Render at the following link: Booking App on Render
Note: The site may be terminated or deactivated due to billing reasons.
To get started with the Booking App, follow these steps:
- Clone this repository to your local machine.
- Navigate to the project directory.
- Install dependencies for both the frontend and backend:
cd frontend npm install cd .. cd backend npm install - Set up environment variables:
- Create a
.envfile in thebackenddirectory. - Add the following variables:
PORT=3000 MONGODB_CONNECTION_URI=<your MongoDB URI> CLOUDINARY_CLOUD_NAME=<your cloudinary cloud name> CLOUDINARY_API_KEY=<your cloudinary API Key> CLOUDINARY_API_SECRET<your cloudinary API Secret> SALT=<your salt for password hashing> JWT_SECRET_KEY=<your JWT secret key> STRIPE_API_KEY=<your Stripe secret key>
- Create a
- Start the backend server:
cd backend npm start - Start the frontend development server:
cd frontend npm start - Open your browser and navigate to
http://localhost:3000to view the Booking App.
To run UI tests using Playwright, follow these steps:
- Navigate to the
testsdirectory. - Run the following command:
npx playwright test - Playwright will execute the tests and provide feedback on the UI's functionality and performance.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or support, please contact [your email or username].
Feel free to customize this readme file to fit your specific project details and preferences. Happy coding! 🚀