{"id":19793904,"url":"https://github.com/yash1hingu/airbnb","last_synced_at":"2026-04-14T10:33:15.480Z","repository":{"id":222717755,"uuid":"758148358","full_name":"Yash1Hingu/airbnb","owner":"Yash1Hingu","description":"Clone of Airbnb using MERN stack with user authentication, listing browsing, booking, and responsive design. Check out the live demo!","archived":false,"fork":false,"pushed_at":"2024-06-23T15:07:02.000Z","size":11963,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-12T13:27:08.546Z","etag":null,"topics":["axios","context-api","expressjs","git","imgbb-api","mongodb","multer","nodejs","react-hooks","react-router","reactjs"],"latest_commit_sha":null,"homepage":"https://airbnb-zeta-ten.vercel.app/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yash1Hingu.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-15T18:04:46.000Z","updated_at":"2024-06-23T15:08:40.000Z","dependencies_parsed_at":"2024-06-23T16:26:50.747Z","dependency_job_id":"d641d93f-06f1-4d65-aa47-9476ddf2918d","html_url":"https://github.com/Yash1Hingu/airbnb","commit_stats":null,"previous_names":["yash1hingu/airbnb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Yash1Hingu/airbnb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash1Hingu%2Fairbnb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash1Hingu%2Fairbnb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash1Hingu%2Fairbnb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash1Hingu%2Fairbnb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yash1Hingu","download_url":"https://codeload.github.com/Yash1Hingu/airbnb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yash1Hingu%2Fairbnb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31793215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","context-api","expressjs","git","imgbb-api","mongodb","multer","nodejs","react-hooks","react-router","reactjs"],"created_at":"2024-11-12T07:11:37.197Z","updated_at":"2026-04-14T10:33:15.466Z","avatar_url":"https://github.com/Yash1Hingu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏠 Airbnb Clone\n\nA clone of the Airbnb web application, created using the MERN stack (MongoDB, Express.js, React.js, and Node.js).\n\n## 🚀 Live Demo\n\nCheck out the live application here: [Airbnb Clone](https://airbnb-zeta-ten.vercel.app/)\n\n## ✨ Features\n\n- 🔒 User authentication (login and registration)\n- 🏡 Browse listings\n- 📝 View detailed information about listings\n- 📅 Book listings\n- 📱 Responsive design\n\n## 🛠️ Tech Stack\n\n- **Frontend:** React.js, CSS, Bootstrap, Tailwind\n- **Backend:** Node.js, Express.js\n- **Database:** MongoDB\n- **Hosting:** Vercel (Frontend), Render (Backend)\n\n## ⚙️ Installation\n\nTo run this project locally, follow these steps:\n\n### Prerequisites\n\n- Node.js and npm installed on your machine\n- MongoDB installed and running\n\n### 📥 Clone the Repository\n\n```bash\ngit clone https://github.com/Yash1Hingu/airbnb.git\ncd airbnb\n```\n\n### 📦 Install Dependencies\n\n#### For the Backend\n\n```bash\ncd backend\nnpm install\n```\n\n#### For the Frontend\n\n```bash\ncd frontend\nnpm install\n```\n\n### 🛠️ Setup Environment Variables\n\nCreate a `.env` file in the `backend` directory and add the following environment variables:\n\n```env\nMONGO_URI=your_mongodb_connection_string\nJWT_SECRET=your_jwt_secret\n```\n\n### ▶️ Start the Application\n\n#### Backend\n\n```bash\ncd backend\nnpm start\n```\n\nThe backend server will start on `http://localhost:5000`.\n\n#### Frontend\n\n```bash\ncd frontend\nnpm start\n```\n\nThe frontend application will start on `http://localhost:3000`.\n\n## Frontend Routes\n\nThe frontend routing in this application is managed using `react-router-dom`. Here's an overview of each route and its corresponding functionality:\n\n### Route: `/`\n\n- **Element:** `\u003cLayout /\u003e`\n- **Description:** The root route of the application, rendering the main layout component.\n\n  - **Child Route: `/`**\n    - **Element:** `\u003cIndexPage /\u003e`\n    - **Description:** Displays the index page of the application.\n\n  - **Child Route: `/login`**\n    - **Element:** `\u003cLoginPage /\u003e`\n    - **Description:** Renders the login page for user authentication.\n\n  - **Child Route: `/register`**\n    - **Element:** `\u003cRegisterPage /\u003e`\n    - **Description:** Displays the registration page for new users.\n\n  - **Child Route: `/account`**\n    - **Element:** `\u003cAccountLayout /\u003e`\n    - **Description:** Handles account-related pages and layouts.\n\n      - **Nested Route: `/`**\n        - **Element:** `\u003cProfilePage /\u003e`\n        - **Description:** Shows the user's profile information.\n\n      - **Nested Route: `/bookings`**\n        - **Element:** `\u003cBookingsPage /\u003e`\n        - **Description:** Lists all bookings made by the user.\n\n      - **Nested Route: `/places`**\n        - **Element:** `\u003cPlacesPage /\u003e`\n        - **Description:** Displays the user's listed places and related actions.\n\n        - **Dynamic Nested Route: `/places/:action`**\n          - **Element:** `\u003cPlacesPage /\u003e`\n          - **Description:** Handles different actions (e.g., add, edit) related to user's places.\n\n        - **Dynamic Nested Route: `/places/:action/:id`**\n          - **Element:** `\u003cPlacesPage /\u003e`\n          - **Description:** Manages actions with specific IDs for user's places.\n\n### Route: `/place/:id`\n\n- **Element:** `\u003cPlacePage /\u003e`\n- **Description:** Renders detailed information about a specific place based on its ID.\n\n### Route: `/account/bookings/:id`\n\n- **Element:** `\u003cBookingPage /\u003e`\n- **Description:** Displays detailed information about a specific booking based on its ID.\n\nFor a deeper understanding of each component's functionality, refer to the respective component files in the `src/components/pages` directory.\n\n\n## 📝 Backend Details\n\nThe backend of this application is built using Node.js and Express.js. Below are the key components and their functionalities:\n\n### Middleware and Configuration\n\n- **dotenv:** Loads environment variables from a `.env` file.\n- **express:** Web framework for Node.js.\n- **cors:** Enables Cross-Origin Resource Sharing.\n- **mongoose:** ODM for MongoDB.\n- **bcryptjs:** Library for hashing passwords.\n- **jsonwebtoken:** Library to sign and verify JSON Web Tokens.\n- **cookie-parser:** Middleware to parse cookies.\n- **image-downloader:** Utility to download images.\n- **multer:** Middleware for handling multipart/form-data (file uploads).\n- **fs (file system):** Module to work with the file system.\n- **imgbb-uploader:** Utility to upload images to ImgBB.\n\n### Models\n\n- **User:** Defines user schema and handles user data.\n- **Place:** Defines place schema and handles listing data.\n- **Booking:** Defines booking schema and handles booking data.\n\n### Routes\n\n#### User Routes\n\n- **POST /register:** Registers a new user.\n- **POST /login:** Authenticates a user and returns a JWT token.\n- **GET /profile:** Retrieves the profile information of the logged-in user.\n- **GET /logout:** Logs out the user by clearing the JWT token.\n\n#### Places Routes\n\n- **POST /places:** Creates a new place listing.\n- **GET /places:** Retrieves all places owned by the logged-in user.\n- **GET /edit/:id:** Retrieves details of a specific place for editing.\n- **PUT /places:** Updates an existing place listing.\n- **GET /indexplaces:** Retrieves a list of all places (limited to 20).\n- **GET /place/:id:** Retrieves details of a specific place by ID.\n\n#### Booking Routes\n\n- **POST /bookings:** Creates a new booking.\n- **GET /booking:** Retrieves all bookings made by the logged-in user.\n- **GET /booking/:id:** Retrieves details of a specific booking by ID.\n\n#### File Upload Routes\n\n- **POST /upload-by-link:** Uploads an image by URL.\n- **POST /upload:** Uploads images using Multer.\n\n### Helper Functions\n\n- **getUserDataFromToken:** Extracts user data from the JWT token.\n\n### Server Initialization\n\nThe server runs on port 4000, and CORS is enabled for the client URL specified in the environment variables.\n\n```javascript\napp.listen(4000, () =\u003e {\n    console.log(\"Server Running on port 4000\");\n});\n```\n\n## 🤝 Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request.\n\n## 📧 Contact\n\nIf you have any questions or feedback, feel free to contact me at yash23hingu@gmail.com.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyash1hingu%2Fairbnb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyash1hingu%2Fairbnb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyash1hingu%2Fairbnb/lists"}