A full-stack Airbnb-like web application built with Node.js, Express, MongoDB, and EJS.
- User authentication (signup/login/logout)
- Guest and host user roles
- Browse and search homes
- Book a home as a guest
- View and manage your bookings (cancel bookings)
- Add/remove homes to favourites
- Host can add homes (extendable)
- House rules download
- Responsive UI with EJS templates and Tailwind CSS
- Node.js
- Express.js
- MongoDB & Mongoose
- EJS (Embedded JavaScript templates)
- Tailwind CSS
- Node.js (v16+ recommended)
- MongoDB (local or Atlas)
- Clone the repository:
git clone https://github.com/yourusername/airbnb-clone.git cd airbnb-clone - Install dependencies:
npm install
- Set up your MongoDB connection in your environment (e.g., via
.envor directly in your code). - Start the development server:
npm run dev
- Visit
http://localhost:3000in your browser.
controllers/ # Route handlers
models/ # Mongoose schemas
public/ # Static assets (CSS, images)
routes/ # Express route definitions
utils/ # Utility modules
views/ # EJS templates
uploads/ # Uploaded images
rules/ # House rules PDFs
app.js # Main app entry point
package.json # Project metadata
- Sign up as a guest or host
- Browse homes and view details
- Book a home (guests only)
- View/cancel your bookings
- Add/remove homes to your favourites
This project is for educational/demo purposes only.