An open API service indexing awesome lists of open source software.

https://github.com/kdf25/nextjs-airbnb

Fully adaptive Airbnb-style rental platform for seamless booking and property management, ensuring convenience for hosts and guests.
https://github.com/kdf25/nextjs-airbnb

fsd html mongodb next-toploader nextauth nextjs prisma tailwindcss typescript zustand

Last synced: about 2 months ago
JSON representation

Fully adaptive Airbnb-style rental platform for seamless booking and property management, ensuring convenience for hosts and guests.

Awesome Lists containing this project

README

          

# Airbnb

Welcome to **Airbnb** – a modern and fully functional vacation rental platform built with Next.js and TypeScript.

## Features

- **Next.js** ⚑ - A powerful React framework for server-side rendering and static site generation.
- **TypeScript** πŸ›‘οΈ - Statically typed JavaScript for better code reliability.
- **Tailwind CSS** 🎨 - A utility-first CSS framework for rapid styling.
- **Prisma** πŸ—‚οΈ - ORM for database management and seamless integration.
- **React Hook Form** πŸ“‹ - Form management with validation.
- **Zustand** πŸ”§ - Lightweight state management solution.
- **Framer Motion** 🎬 - Smooth animations for enhanced user experience.
- **Leaflet & React Leaflet** πŸ—ΊοΈ - Interactive maps for location-based services.
- **React Toastify** πŸ”” - Toast notifications for user interactions.
- **NextAuth.js** πŸ”‘ - Authentication with Google, GitHub, and Facebook.
- **Cloudinary** ☁️ - Image upload and optimization.

## Authentication & Registration

- **OAuth Authentication**: Users can log in using **Google, GitHub, and Facebook** accounts.
- **Email Verification**: Users receive a confirmation email after registration.

## Database Hosting

- **PostgreSQL with Prisma**: Database management via Prisma ORM.
- **Neon** πŸš€ - Cloud-based PostgreSQL hosting for high performance and scalability.

## Installation

### Clone the repository:
```sh
git clone https://github.com/KDF25/nextjs-airbnb.git
```

### Navigate to the project folder:
```sh
cd airbnb
```

### Install dependencies:
```sh
npm install
```

### Set up environment variables:
Create a `.env` file and add the following environment variables:
```sh
DATABASE_URL=

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

FACEBOOK_ID=
FACEBOOK_SECRET=

GITHUB_ID=
GITHUB_SECRET=

NEXTAUTH_SECRET=
NEXTAUTH_URL=
NEXT_PUBLIC_API_URL=

NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=
CLOUDINARY_URL=
```

## Running the Project

### Development Mode
```sh
npm run dev
```
The application will be available at: **http://localhost:3000**

### Production Mode

#### Build the project:
```sh
npm run build
```

#### Start the production server:
```sh
npm run start
```

## Project Structure (FSD Architecture)

- `src/entities` πŸ—οΈ - Business logic entities.
- `src/features` ⚑ - Isolated business functionality modules.
- `src/shared` πŸ› οΈ - Common modules used across the app.
- `src/widgets` πŸ’‘ - Modular components for building feature-rich UI.

## Scripts

- `npm run dev` πŸš€ - Start in development mode.
- `npm run build` πŸ—οΈ - Build the application.
- `npm run start` 🌐 - Start the production server.
- `npm run lint` πŸ” - Code linting.
- `npm run format` 🧹 - Format code with Prettier.
- `npm run prisma:generate` πŸ”„ - Generate Prisma client.
- `npm run prisma:push` πŸ“₯ - Apply changes to the database.
- `npm run prisma:migrate` πŸ“œ - Create migrations.
- `npm run prisma:studio` πŸ–₯️ - Open Prisma Studio UI.
- `npm run prisma:seed` 🌱 - Seed initial database data.

## Dependencies

### Core Technologies
- **Next.js** ⚑ - React framework for SSR and static generation.
- **React** βš›οΈ - UI library for building interactive applications.
- **TypeScript** πŸ›‘οΈ - Type-safe JavaScript.

### Database Management
- **Prisma** πŸ—‚οΈ - Modern ORM for working with SQL databases.

### UI & Styling
- **Tailwind CSS** 🎨 - Utility-first CSS framework.
- **Framer Motion** 🎬 - Motion animations.
- **React Toastify** πŸ”” - Toast notifications.
- **React Select** πŸ”½ - Select dropdown component.

### Forms & Data Validation
- **React Hook Form** πŸ“‹ - Form management.
- **Zod** βœ… - Schema validation.

### State Management
- **Zustand** πŸ”§ - Lightweight state management.

### API & Integrations
- **Axios** 🌍 - HTTP client.
- **Cloudinary** ☁️ - Image storage and optimization.
- **NextAuth.js** πŸ”‘ - Authentication system.

### Other Utilities
- **Lucide React** 🎨 - Icon library.
- **Clsx** πŸ”€ - Utility for conditionally joining class names.
- **Sass** πŸ’… - CSS preprocessor.

## Deployment

You can deploy this project on **Vercel** or any other Next.js-compatible platform:

1. Go to **Vercel** and create a new project.
2. Connect your GitHub repository.
3. Set up environment variables.
4. Click **Deploy**.

---

Β© 2025 Airbnb. All rights reserved.