https://github.com/CodeLander07/Holiday-Homes
A full-stack hotel booking website where users can browse listings, view details, and manage bookings.
https://github.com/CodeLander07/Holiday-Homes
bootstrap5 ejs full-stack-web-development javascript mern-stack nodejs npm-package
Last synced: about 1 month ago
JSON representation
A full-stack hotel booking website where users can browse listings, view details, and manage bookings.
- Host: GitHub
- URL: https://github.com/CodeLander07/Holiday-Homes
- Owner: CodeLander07
- Created: 2025-04-15T16:21:02.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-06-08T07:41:53.000Z (8 months ago)
- Last Synced: 2025-06-08T12:19:50.499Z (8 months ago)
- Topics: bootstrap5, ejs, full-stack-web-development, javascript, mern-stack, nodejs, npm-package
- Language: JavaScript
- Homepage:
- Size: 113 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TripEasy - Hotel Management App
TripEasy is a full-stack web application designed to facilitate hotel management and booking. It allows users to list properties, view details, leave reviews, and manage their bookings. The application is built using the MEN stack (MongoDB, Express.js, Node.js) and follows the MVC (Model-View-Controller) architecture.
## 🚀 Features
- **User Authentication & Authorization:**
- Secure Sign Up and Login functionality using Passport.js.
- Authorization checks to ensure only owners can edit/delete their listings.
- **CRUD Operations for Listings:**
- Users can Create, Read, Update, and Delete hotel listings.
- Upload images for listings (stored via Cloudinary).
- **Review System:**
- Users can leave ratings and comments on listings.
- Reviews can be deleted by their authors.
- **Responsive Design:**
- Built with Bootstrap for a mobile-friendly user interface.
- **Data Validation:**
- Server-side validation using Joi to ensure data integrity.
- **Session Management:**
- Persistent sessions using MongoDB (connect-mongo).
- **Flash Messages:**
- Interactive feedback messages (success/error) for user actions.
## 🛠️ Tech Stack & Dependencies
The project utilizes the following technologies and libraries:
### Backend
- **Node.js:** JavaScript runtime environment.
- **Express.js:** Web framework for Node.js.
- **Mongoose:** ODM for MongoDB.
- **Passport.js:** Authentication middleware for Node.js.
- **Joi:** Data validation library.
### Frontend
- **EJS (Embedded JavaScript):** Templating engine.
- **EJS-Mate:** Layout support for EJS.
- **Bootstrap:** CSS framework for styling.
### Utilities & Middleware
- **Cloudinary & Multer:** For handling image uploads and storage.
- **Connect-Flash:** For displaying flash messages.
- **Express-Session:** For managing user sessions.
- **Method-Override:** To support PUT and DELETE requests in HTML forms.
- **Dotenv:** For environment variable management.
## 📂 Folder Structure
```
TripEasy/
├── controllers/ # Logic for handling requests (MVC Controller)
├── init/ # Database initialization scripts
├── models/ # Mongoose schemas and models (MVC Model)
├── public/ # Static files (CSS, JS, Images)
├── Routes/ # Express routes definitions
├── utils/ # Utility functions (Error handling, wrappers)
├── views/ # EJS templates (MVC View)
├── app.js # Main application entry point
├── cloudConfig.js # Cloudinary configuration
├── middleware.js # Custom middleware (Auth, Validation)
├── schema.js # Joi validation schemas
├── .env # Environment variables (not committed)
└── package.json # Project dependencies and scripts
```
## ⚙️ Installation & Setup
1. **Clone the repository:**
```bash
git clone https://github.com/CodeLander07/Holiday-Homes.git
cd Holiday-Homes
```
2. **Install dependencies:**
```bash
npm install
```
3. **Set up Environment Variables:**
Create a `.env` file in the root directory and add the following credentials:
```env
CLOUD_NAME=your_cloudinary_cloud_name
CLOUD_API_KEY=your_cloudinary_api_key
CLOUD_API_SECRET=your_cloudinary_api_secret
MONGOURL=your_mongodb_connection_string
SESSION_SECRET=your_session_secret
```
4. **Initialize the Database (Optional):**
If you want to seed the database with initial data:
```bash
node init/index.js
```
5. **Run the Application:**
```bash
node app.js
# OR for development with nodemon
npm run dev
```
6. **Access the App:**
Open your browser and go to `http://localhost:3000`.
## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## 📄 License
This project is licensed under the ISC License.