Skip to content

srmasharad/airbnb-clone-with-nextjs13

Repository files navigation

Airbnb Clone with Next.js 13, TypeScript, and MongoDB

This project is a clone of Airbnb, built with Next.js using TypeScript and MongoDB bootstrapped create-next-app. It features essential technologies and packages like MongoDB for database management, Leaflet for map functionality, Axios for handling HTTP requests, bcrypt for password hashing, Prisma as the ORM, Tailwind CSS for styling, Next-Auth for authentication, React Hook Form for form handling, Zustand for state management, and Next Cloudinary for cloud-based image storage.

Getting Started

To run the Airbnb Clone project locally, follow the steps below:

1. Clone the repository:

git clone <repository_url>
cd airbnb-clone-project

2. Install dependencies:

npm install
# or
yarn install
# or
pnpm install

3. Environment Variables:

Create a .env file in the root of the project and add the following environment variables with their respective values:

...
NEXTAUTH_SECRET=<"NEXTAUTH_SECRET">

GITHUB_ID=<YOUR_GITHUB_ID>
GITHUB_SECRET=<YOUR_GITHUB_SECRET_ID>

GOOGLE_CLIENT_ID=<YOUR_GOOGLE_CLIENT_ID>
GOOGLE_CLIENT_SECRET=<YOUR_GOOGLE_CLIENT_SECRET_ID>

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=<"YOUR_CLOUDINARY_CLOUD_NAME">

4. Database Configuration:

Set up a MongoDB database and configure the connection string in your .env file:

DATABASE_URL=<YOUR_MONGODB_DATABASE_CONNECTION_URL>
...

5. Prisma migrations:

npx prisma migrate dev

6. Start the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

7. Open your browser:

The application should be running at http://localhost:3000.