Discover, Compare, and Book Comfortable Hotels Worldwide
SpotHotel is a modern hotel booking platform that helps travelers find the perfect stay for their next trip in just a few clicks. Built with the MERN stack, it offers a seamless experience for browsing hotels, exploring rooms, and making secure bookings.
π Live Demo: https://spothotel.vercel.app
- Browse and search hotels by location
- View detailed hotel and room information
- Filter rooms by type, price, and specifications
- Secure user authentication and authorization
- Booking management system
- Payment integration with Stripe
- Responsive design for all devices
- Image upload and management with Cloudinary
- React (Vite)
- React Router
- Axios
- Tailwind CSS
- Shadcn
- Recharts
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT Authentication
- Stripe Payment Gateway
- Cloudinary for image storage
Before you begin, ensure you have the following installed:
- Node.js (v14 or higher)
- npm or yarn
- MongoDB (local or Atlas account)
- Cloudinary account
- Stripe account (for payment processing)
git clone https://github.com/asynctushar/spothotel.git
cd spothotelcd backend
npm installCreate a .env file in the /backend directory using .env.sample as reference:
PORT=5000
NODE_ENV=DEVELOPMENT
DB_URI=your_mongodb_connection_string
CLOUDINARY_NAME=your_cloudinary_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret
JWT_SECRET=your_jwt_secret_key
JWT_EXPIRE=5d
COOKIE_EXPIRE=7
STRIPE_API_KEY=your_stripe_api_key
STRIPE_SECRET_KEY=your_stripe_secret_keyStart the backend server:
npm run devThe backend will run on http://localhost:5000
Open a new terminal and navigate to the frontend directory:
cd frontend
npm installCreate a .env file in the /frontend directory using .env.sample as reference:
VITE_API_URL=http://localhost:5000Start the frontend development server:
npm run devThe frontend will run on http://localhost:5173
| Variable | Description | Required |
|---|---|---|
PORT |
Server port number | Yes |
NODE_ENV |
Environment (DEVELOPMENT/PRODUCTION) | Yes |
DB_URI |
MongoDB connection string | Yes |
CLOUDINARY_NAME |
Cloudinary cloud name | Yes |
CLOUDINARY_API_KEY |
Cloudinary API key | Yes |
CLOUDINARY_API_SECRET |
Cloudinary API secret | Yes |
JWT_SECRET |
Secret key for JWT tokens | Yes |
JWT_EXPIRE |
JWT token expiration time | Yes |
COOKIE_EXPIRE |
Cookie expiration in days | Yes |
STRIPE_API_KEY |
Stripe publishable key | Yes |
STRIPE_SECRET_KEY |
Stripe secret key | Yes |
| Variable | Description | Required |
|---|---|---|
VITE_API_URL |
Backend API URL | Yes |
spothotel/
βββ backend/
β βββ config/
β βββ controllers/
β βββ models/
β βββ routes/
β βββ middleware/
β βββ services/
β βββ utils/
β βββ .env.sample
β βββ server.js
βββ frontend/
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ lib/
β β βββ redux/
β β βββ router/
β β βββ App.jsx
β β βββ main.jsx
β βββ .env.sample
β βββ index.html
βββ README.md
We welcome contributions to SpotHotel! Here's how you can help:
If you find a bug, please open an issue with:
- A clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Fork the repository
- Create a new branch from
v3branch:git checkout v3 git checkout -b feature/your-feature-name
- Make your changes
- Commit with clear, descriptive messages
- Push to your fork
- Open a Pull Request to the
v3branch
- Follow the existing code style
- Write clear commit messages
- Test your changes thoroughly
- Update documentation as needed
- Ensure all validations match the schema requirements
Check our Issues page for current bugs and feature requests.
This project is open source and available under the MIT License.
Tushar Biswas
- GitHub: @asynctushar
- Thanks to all contributors who help improve SpotHotel
- Built with β€οΈ using the MERN stack
For support, email or open an issue in the GitHub repository.
Note: This is version 2 of SpotHotel. We're constantly working to improve the platform. Stay tuned for updates!