├── .eslintrc.json ├── app ├── favicon.ico ├── api │ └── auth │ │ ├── [kindeAuth] │ │ └── route.ts │ │ └── creation │ │ └── route.ts ├── create │ └── [id] │ │ ├── layout.tsx │ │ ├── structure │ │ └── page.tsx │ │ ├── address │ │ └── page.tsx │ │ └── description │ │ └── page.tsx ├── lib │ ├── supabase.ts │ ├── db.ts │ ├── getCountries.ts │ └── categoryItems.ts ├── components │ ├── HomeMap.tsx │ ├── SkeletonCard.tsx │ ├── CreationBottomBar.tsx │ ├── CategoryShowcase.tsx │ ├── NoItem.tsx │ ├── Navbar.tsx │ ├── Counter.tsx │ ├── Map.tsx │ ├── SelectedCategory.tsx │ ├── SelectCalender.tsx │ ├── MapFilterItems.tsx │ ├── SubmitButtons.tsx │ ├── ListingCard.tsx │ ├── UserNav.tsx │ └── SearchComponent.tsx ├── home │ └── [id] │ │ ├── loading.tsx │ │ └── page.tsx ├── layout.tsx ├── my-homes │ ├── loading.tsx │ └── page.tsx ├── favorites │ ├── loading.tsx │ └── page.tsx ├── reservations │ ├── loading.tsx │ └── page.tsx ├── globals.css ├── page.tsx └── actions.ts ├── public ├── airbnb-desktop.png ├── airbnb-mobile.webp ├── vercel.svg └── next.svg ├── postcss.config.js ├── lib └── utils.ts ├── components └── ui │ ├── skeleton.tsx │ ├── label.tsx │ ├── textarea.tsx │ ├── separator.tsx │ ├── input.tsx │ ├── button.tsx │ ├── card.tsx │ ├── dialog.tsx │ ├── select.tsx │ └── dropdown-menu.tsx ├── components.json ├── next.config.mjs ├── .gitignore ├── tsconfig.json ├── package.json ├── prisma └── schema.prisma ├── tailwind.config.ts └── README.md /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ski043/airbnb-yt/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /public/airbnb-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ski043/airbnb-yt/HEAD/public/airbnb-desktop.png -------------------------------------------------------------------------------- /public/airbnb-mobile.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ski043/airbnb-yt/HEAD/public/airbnb-mobile.webp -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /app/api/auth/[kindeAuth]/route.ts: -------------------------------------------------------------------------------- 1 | import { handleAuth } from "@kinde-oss/kinde-auth-nextjs/server"; 2 | 3 | export const GET = handleAuth(); 4 | -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /app/create/[id]/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from "react"; 2 | 3 | export default function LayoutCreation({ children }: { children: ReactNode }) { 4 | return
{children}
; 5 | } 6 | -------------------------------------------------------------------------------- /app/lib/supabase.ts: -------------------------------------------------------------------------------- 1 | import { createClient } from "@supabase/supabase-js"; 2 | 3 | // Create a single supabase client for interacting with your database 4 | export const supabase = createClient( 5 | process.env.SUPABASE_URL as string, 6 | process.env.SUPABASE_ANON_KEY as string 7 | ); 8 | -------------------------------------------------------------------------------- /components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } -------------------------------------------------------------------------------- /app/components/HomeMap.tsx: -------------------------------------------------------------------------------- 1 | import { Skeleton } from "@/components/ui/skeleton"; 2 | import dynamic from "next/dynamic"; 3 | 4 | export function HomeMap({ locationValue }: { locationValue: string }) { 5 | const LazyMap = dynamic(() => import("@/app/components/Map"), { 6 | ssr: false, 7 | loading: () => , 8 | }); 9 | 10 | return ; 11 | } 12 | -------------------------------------------------------------------------------- /app/lib/db.ts: -------------------------------------------------------------------------------- 1 | import { PrismaClient } from "@prisma/client"; 2 | 3 | const prismaClientSingleton = () => { 4 | return new PrismaClient(); 5 | }; 6 | 7 | declare global { 8 | var prisma: undefined | ReturnType; 9 | } 10 | 11 | const prisma = globalThis.prisma ?? prismaClientSingleton(); 12 | 13 | export default prisma; 14 | 15 | if (process.env.NODE_ENV !== "production") globalThis.prisma = prisma; 16 | -------------------------------------------------------------------------------- /next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | images: { 4 | remotePatterns: [ 5 | { 6 | hostname: "a0.muscache.com", 7 | protocol: "https", 8 | port: "", 9 | }, 10 | { 11 | hostname: "glvmmupiqwlmhicmggqp.supabase.co", 12 | protocol: "https", 13 | port: "", 14 | }, 15 | ], 16 | }, 17 | }; 18 | 19 | export default nextConfig; 20 | -------------------------------------------------------------------------------- /app/components/SkeletonCard.tsx: -------------------------------------------------------------------------------- 1 | import { Skeleton } from "@/components/ui/skeleton"; 2 | 3 | export function SkeltonCard() { 4 | return ( 5 |
6 | 7 |
8 | 9 | 10 | 11 |
12 |
13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | .env 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | -------------------------------------------------------------------------------- /app/components/CreationBottomBar.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from "@/components/ui/button"; 2 | import Link from "next/link"; 3 | import { CreationSubmit } from "./SubmitButtons"; 4 | 5 | export function CreatioBottomBar() { 6 | return ( 7 |
8 |
9 | 12 | 13 |
14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /app/lib/getCountries.ts: -------------------------------------------------------------------------------- 1 | import countries from "world-countries"; 2 | 3 | const countriesFormatted = countries.map((item) => ({ 4 | value: item.cca2, 5 | label: item.name.common, 6 | flag: item.flag, 7 | latLang: item.latlng, 8 | region: item.region, 9 | })); 10 | 11 | export const useCountries = () => { 12 | const getAllCountries = () => countriesFormatted; 13 | 14 | const getCountryByValue = (value: string) => { 15 | return countriesFormatted.find((item) => item.value === value); 16 | }; 17 | 18 | return { 19 | getAllCountries, 20 | getCountryByValue, 21 | }; 22 | }; 23 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/home/[id]/loading.tsx: -------------------------------------------------------------------------------- 1 | import { Skeleton } from "@/components/ui/skeleton"; 2 | 3 | export default function Homepageloading() { 4 | return ( 5 |
6 | 7 | 8 | 9 |
10 |
11 | 12 | 13 |
14 |
15 | 16 |
17 |
18 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import { Inter } from "next/font/google"; 3 | import "./globals.css"; 4 | import { Navbar } from "./components/Navbar"; 5 | 6 | const inter = Inter({ subsets: ["latin"] }); 7 | 8 | export const metadata: Metadata = { 9 | title: "Create Next App", 10 | description: "Generated by create next app", 11 | }; 12 | 13 | export default function RootLayout({ 14 | children, 15 | }: Readonly<{ 16 | children: React.ReactNode; 17 | }>) { 18 | return ( 19 | 20 | 21 | 22 | {children} 23 | 24 | 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /app/components/CategoryShowcase.tsx: -------------------------------------------------------------------------------- 1 | import Image from "next/image"; 2 | import { categoryItems } from "../lib/categoryItems"; 3 | 4 | export function CaegoryShowcase({ categoryName }: { categoryName: string }) { 5 | const category = categoryItems.find((item) => item.name === categoryName); 6 | 7 | return ( 8 |
9 | Caegory image 15 | 16 |
17 |

{category?.title}

18 |

{category?.description}

19 |
20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /app/components/NoItem.tsx: -------------------------------------------------------------------------------- 1 | import { File, FileQuestion } from "lucide-react"; 2 | 3 | interface IappProps { 4 | title: string; 5 | description: string; 6 | } 7 | 8 | export function NoItems({ description, title }: IappProps) { 9 | return ( 10 |
11 |
12 | 13 |
14 |

{title}

15 |

16 | {description} 17 |

18 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /app/create/[id]/structure/page.tsx: -------------------------------------------------------------------------------- 1 | import { createCategoryPage } from "@/app/actions"; 2 | import { CreatioBottomBar } from "@/app/components/CreationBottomBar"; 3 | import { SelctetCategory } from "@/app/components/SelectedCategory"; 4 | 5 | export default function StrucutreRoute({ params }: { params: { id: string } }) { 6 | return ( 7 | <> 8 |
9 |

10 | Which of these best describe your Home? 11 |

12 |
13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /app/my-homes/loading.tsx: -------------------------------------------------------------------------------- 1 | import { SkeltonCard } from "../components/SkeletonCard"; 2 | 3 | export default function MyHomesLoading() { 4 | return ( 5 |
6 |

Your Homes

7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | import { cva, type VariantProps } from "class-variance-authority" 6 | 7 | import { cn } from "@/lib/utils" 8 | 9 | const labelVariants = cva( 10 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 11 | ) 12 | 13 | const Label = React.forwardRef< 14 | React.ElementRef, 15 | React.ComponentPropsWithoutRef & 16 | VariantProps 17 | >(({ className, ...props }, ref) => ( 18 | 23 | )) 24 | Label.displayName = LabelPrimitive.Root.displayName 25 | 26 | export { Label } 27 | -------------------------------------------------------------------------------- /app/favorites/loading.tsx: -------------------------------------------------------------------------------- 1 | import { SkeltonCard } from "../components/SkeletonCard"; 2 | 3 | export default function Favoritesloading() { 4 | return ( 5 |
6 |

Your Favorites

7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 |
25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /app/reservations/loading.tsx: -------------------------------------------------------------------------------- 1 | import { SkeltonCard } from "../components/SkeletonCard"; 2 | 3 | export default function Favoritesloading() { 4 | return ( 5 |
6 |

7 | Your Reservations 8 |

9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |