A web application to help you discover perfect home away from home. Explore a wide variety of unique, comfortable, and affordable accommodations around the world.
- You can access the live demo via Vercel.
Here are some of the current features that CozyCribs has:
- User authentication with Next Auth
- User authorization
- Admin functionality
- Route protection
- User profile
- Property listing CRUD
- Property image upload
- Property search
- Leaflet map
- Toast notifications
- Property bookmarking - favorite properties
- Property sharing to social media
- Loading skeletons
- State management
- Responsive design (Tailwind - Shadcn/ui)
- Custom 404 page
- Next.js Actions
- Payment functionality
CozyCribs uses the following technologies:
- Next.js
- React
- Tailwind CSS
- shadcn/ui
- Supabase
- Prisma
- Zustand
- Clerk
- Stripe
- Leaflet
- React Icons
- React Share
- Node.js version 20 or higher
- Sign up and create a new project at Supabase
- Sign up and create a new application at Clerk
- Sign up and create a new store at Stripe
Note: Clerk's free tier doesn't allow us to directly access the user role. If you're using the paid version, you can directly access the admin role or like me, you can add your own ID to the environment variables for verification.
Create .env
file and fill in the following environment variables:
ADMIN_USER_ID=[INSTEAD OF THE ROLE]
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=[YOUR PUBLISHABLE KEY]
CLERK_SECRET_KEY=[YOUR SECRET KEY]
DATABASE_URL=[YOUR DATABASE URL]
DIRECT_URL=[YOUR DATABASE DIRECT URL]
SUPABASE_URL=[YOUR SUPABASE URL]
SUPABASE_KEY=[YOUR SUPABASE KEY]
NEXT_PUBLIC_WEBSITE_URL=[PRODUCTION URL FOR SHARES]
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=[YOUR PUBLIC STRIPE KEY]
STRIPE_SECRET_KEY=[YOUR SECRET STRIPE KEY]
NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL=/profile/create
NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL=/profile/create
npm install
npm run dev
Open http://localhost:3000 with your browser to see the result.
This project is licensed under the MIT License - see the LICENSE file for details