Skip to content
프로젝트

소개

Full-stack vacation-rental marketplace built with Next.js 13 and Prisma: search listings by category, map area and date range, save favorites, book and manage reservations, and list your own properties with image uploads.

디자인 및 미디어

이 수치를 측정하는 방법

What you can do

  • Authentication with NextAuth (JWT strategy)
  • GitHub and Google OAuth login
  • Credential-based email/password registration and login
  • Create, view, and delete property listings

측정된 스타 증가

in 24h
+1
in 7 days
기록 수집 중
in 15 days
기록 수집 중
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

demo status deploy test

Airbnb Clone with Next.js

Next.js TypeScript Tailwind CSS React Next-Auth Prisma MongoDB Axios React Icons Zustand React Hook Form React Leaflet Cloudinary Vercel

An Airbnb clone for vacation rentals, built with Next.js 13, TypeScript, Tailwind CSS, Prisma, MongoDB and NextAuth. Filter listings by location, date range, guests and rooms, explore them on an interactive Leaflet map, reserve stays on a calendar, upload your own properties, and track trips and favorites.

Demo · Report issue · Suggest something

Table of Contents

Features

  • Authentication with NextAuth (JWT strategy)
  • GitHub and Google OAuth login
  • Credential-based email/password registration and login
  • Create, view, and delete property listings
  • Image upload via Cloudinary
  • Property search with filters (location, date range, guests, rooms, bathrooms)
  • Interactive map with React Leaflet
  • Reservation system with date range calendar
  • Add and remove listings from favorites
  • View trips, reservations, properties, and favorite listings
  • Responsive design with Tailwind CSS
  • Database with Prisma and MongoDB
  • State management with Zustand
  • Deployed on Vercel

Tech Stack

Getting Started

Prerequisites

  • Node.js 18+
  • npm
  • A MongoDB Atlas account (for database)
  • GitHub and Google OAuth credentials (for authentication)
  • A Cloudinary account (for image uploads)

Installation

git clone https://github.com/wrujel/airbnb-clone.git
cd airbnb-clone
npm install

Running locally

npm run dev

Open http://localhost:3000 with your browser to see the result.

Build

npm run build

Environment Variables

To run this project, you will need to add the following environment variables to your .env file.

Variable Description Required
DATABASE_URL MongoDB connection string Yes
NEXTAUTH_SECRET Secret for NextAuth.js session encryption Yes
GITHUB_CLIENT_ID GitHub OAuth app client ID Yes
GITHUB_CLIENT_SECRET GitHub OAuth app client secret Yes
GOOGLE_CLIENT_ID Google OAuth client ID Yes
GOOGLE_CLIENT_SECRET Google OAuth client secret Yes
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME Cloudinary cloud name for image uploads Yes

Project Structure

/
├── app/
│   ├── actions/          # Server actions (getCurrentUser, getListings, etc.)
│   ├── api/              # API routes
│   │   ├── favorites/    # Add/remove favorites
│   │   ├── listings/     # Create/delete listings
│   │   ├── register/     # User registration
│   │   └── reservations/ # Create/delete reservations
│   ├── components/       # React components
│   │   ├── Inputs/       # Form input components
│   │   ├── listings/     # Listing display components
│   │   ├── modals/       # Modal dialogs
│   │   └── navbar/       # Navigation components
│   ├── favorites/        # Favorites page
│   ├── hooks/            # Custom React hooks
│   ├── libs/             # Utility libraries (Prisma client)
│   ├── listings/         # Listing detail page
│   ├── properties/       # Properties management page
│   ├── reservations/     # Reservations management page
│   └── trips/            # Trips page
├── pages/
│   └── api/auth/         # NextAuth configuration
├── prisma/
│   └── schema.prisma     # Database schema
├── public/
│   └── images/           # Static images
├── package.json
├── tailwind.config.js
└── tsconfig.json

Demo

You can check out the demo:

Demo

API Reference

Method Endpoint Description Auth Required
POST /api/register Register a new user No
POST /api/listings Create a new listing Yes
DELETE /api/listings/:listingId Delete a listing Yes
POST /api/reservations Create a reservation Yes
DELETE /api/reservations/:reservationId Cancel a reservation Yes
POST /api/favorites/:listingId Add listing to favorites Yes
DELETE /api/favorites/:listingId Remove listing from favorites Yes

Contributing

Contributions are welcome! If you have suggestions or find bugs, please open an issue or submit a pull request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License.


관련 프로젝트 살펴보기

불러오는 중…