This repository is dedicated to Airstay, an Airbnb clone project. Airstay allows users to browse and book accommodations, view detailed information about each place, manage bookings, and list accommodations for rent.
- React: A JavaScript library for building user interfaces.
- React Router DOM: Declarative routing for React.
- Axios: Promise-based HTTP client for the browser and Node.js.
- Framer Motion: Convex is a Backend Application Platform that keeps you focused on building your product. Convex Functions, Database, File Storage, Scheduling, and Search fit together cohesively
- TailwindCSS: A utility-first CSS framework for streamlined web application styling.
- Lucide React: A collection of simply beautiful open-source icons.
- Express: Fast, unopinionated, minimalist web framework for Node.js.
- Mongoose: MongoDB object modeling for Node.js.
- JWT (JSON Web Tokens): Securely transmitting information between parties as a JSON object.
- bcryptjs: A library to help hash passwords.
- Multer: Middleware for handling multipart/form-data.
- Browse and Book Accommodations: Users can browse through available accommodations and book their preferred places.
- Detailed Place Information: Clicking on each place opens a detailed page with title, description, and photos.
- Booking Window: Users can select dates and provide details for booking accommodations.
- User Authentication: Users can sign in or sign up using the user button in the top right corner.
- User Dashboard: After signing in, users have access to their profile, bookings, and accommodations.
- My Bookings: Users can view all their bookings.
- My Accommodations: Users can list their accommodations for rent and manage them.
- Add/Edit Accommodations: Users can add new accommodations or edit existing ones through a form.
The project root repository consists of two main directories:
-
API: Contains the backend code built with Express, MongoDB, and related dependencies.
-
Client: Contains the frontend code built with React, along with necessary dependencies.
Before running the Airstay application locally, you'll need to set up both the backend API and the frontend client.
- Node.js installed on your system
- MongoDB installed and running
- Firebase service account key
- Your MongoDB URL
- JWT secret key
git clone https://github.com/your-username/airstay.git
cd api
yarn install
Create a .env file in the api directory and add the following environment variables:
FIREBASE_SERVICE_ACCOUNT_KEY=your-firebase-service-account-key
MONGO_URL=your-mongodb-url
JWT_SECRET=your-jwt-secret
yarn start
cd client
yarn install
Make sure to update the axios.defaults.baseURL in client/src/App.tsx file with your deployed API URL.
yarn dev
Now, you can navigate to http://localhost:3000 in your browser to access the Airstay application.
Special thanks to Coding with David for his invaluable tutorial, which served as the foundation for building this app. You can find the tutorial here.
Feel free to explore and contribute to the project!