A beautiful, modern hotel booking website built with Next.js 14, featuring luxury cabin rentals in the heart of the Italian Dolomites.
The Wild Oasis is a full-featured hotel booking website that allows guests to discover and reserve luxury cabins. This family-run retreat has been operating since 1962, offering guests an immersive experience in nature's beauty with modern comfort and convenience.
- Browse luxury cabin listings with detailed information
- Filter cabins by capacity (all, 1-3 guests, 4-7 guests, 8-12 guests)
- View cabin images, pricing, and amenities
- Individual cabin detail pages with comprehensive information
- Interactive date picker for booking cabins
- Real-time availability checking
- Dynamic pricing calculation with discounts
- Guest capacity selection
- Special requirements and observations form
- Booking confirmation and management
- Secure authentication via NextAuth.js (Auth.js)
- Multiple OAuth providers (Google & GitHub)
- Automatic guest profile creation
- Protected account routes
- Session management with user profiles
- Personal dashboard for logged-in guests
- View and manage reservations
- Update profile information
- Reservation history tracking
- Profile picture integration from OAuth providers
- Responsive design with Tailwind CSS
- Custom color scheme with primary and accent colors
- Smooth animations and transitions
- Loading states and error handling
- Optimized images with Next.js Image component
- Beautiful typography with Josefin Sans font
- Next.js 14 App Router architecture
- Server-side rendering (SSR)
- Static site generation (SSG) where appropriate
- Incremental Static Regeneration (ISR)
- Optimized image loading with blur placeholders
- SEO-friendly metadata and structured data
- Next.js 14 - React framework with App Router
- React 18 - UI library with latest features
- Tailwind CSS - Utility-first CSS framework
- Heroicons - Beautiful SVG icons
- date-fns - Modern JavaScript date utility library
- react-day-picker - Flexible date picker component
- Supabase - Backend-as-a-Service with PostgreSQL
- NextAuth.js v5 - Complete authentication solution
- Server Actions - Next.js server-side form handling
- ESLint - Code linting and formatting
- PostCSS - CSS processing
- webpack-bundle-analyzer - Bundle size analysis
Make sure you have the following installed:
- Node.js 18+
- npm, yarn, pnpm, or bun
- A Supabase account
- OAuth app credentials (Google and/or GitHub)
-
Clone the repository
git clone <repository-url> cd wild-oasis-website
-
Install dependencies
npm install # or yarn install # or pnpm install # or bun install
-
Set up environment variables
Create a
.env.localfile in the root directory:# Supabase Configuration SUPABASE_URL=your_supabase_project_url SUPABASE_KEY=your_supabase_anon_key # NextAuth Configuration NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your_nextauth_secret # Google OAuth AUTH_GOOGLE_ID=your_google_client_id AUTH_GOOGLE_SECRET=your_google_client_secret # GitHub OAuth AUTH_GITHUB_ID=your_github_client_id AUTH_GITHUB_SECRET=your_github_client_secret
-
Set up Supabase Database
Create the following tables in your Supabase database:
cabins- Store cabin informationguest- Store guest profilesbookings- Store reservation datasettings- Store application settings
-
Run the development server
npm run dev # or yarn dev # or pnpm dev # or bun dev
-
Open your browser
Navigate to http://localhost:3000 to see the application.
wild-oasis-website/
βββ app/ # Next.js 14 App Router
β βββ _components/ # Reusable React components
β β βββ Header.jsx # Main navigation header
β β βββ CabinLists.jsx # Cabin listing component
β β βββ ReservationForm.jsx # Booking form component
β β βββ ...
β βββ _contexts/ # React Context providers
β β βββ ReservationProvider.jsx
β βββ _hooks/ # Custom React hooks
β β βββ useReservation.js
β βββ _libs/ # Utility libraries
β β βββ auth.js # NextAuth configuration
β β βββ supabase.js # Supabase client
β β βββ data-service.js # Data fetching functions
β β βββ actions.js # Server actions
β βββ _styles/ # Global styles
β β βββ globals.css
β βββ about/ # About page
β βββ account/ # User account pages
β β βββ profile/ # User profile management
β β βββ reservations/ # User reservations
β βββ cabins/ # Cabin listing and details
β β βββ [cabinId]/ # Dynamic cabin detail pages
β βββ layout.jsx # Root layout component
β βββ page.jsx # Home page
βββ public/ # Static assets
β βββ logo.png
β βββ bg.png
β βββ ...
βββ middleware.js # Next.js middleware for route protection
βββ next.config.mjs # Next.js configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ package.json # Dependencies and scripts
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
# Utility scripts
npm run clean # Clean build cache
npm run prod # Build and start production
npm run analyze # Analyze bundle sizeThe application requires several environment variables to function properly:
| Variable | Description | Required |
|---|---|---|
SUPABASE_URL |
Your Supabase project URL | β |
SUPABASE_KEY |
Your Supabase anonymous key | β |
NEXTAUTH_URL |
Your application URL | β |
NEXTAUTH_SECRET |
Secret for NextAuth.js | β |
AUTH_GOOGLE_ID |
Google OAuth client ID | β |
AUTH_GOOGLE_SECRET |
Google OAuth client secret | β |
AUTH_GITHUB_ID |
GitHub OAuth client ID | β |
AUTH_GITHUB_SECRET |
GitHub OAuth client secret | β |
The application uses Supabase PostgreSQL with the following main tables:
id- Primary keyname- Cabin namemaxCapacity- Maximum number of guestsregularPrice- Base price per nightdiscount- Discount amountimage- Cabin image URLdescription- Detailed description
id- Primary keyfullName- Guest full nameemail- Guest email (unique)created_at- Registration timestamp
id- Primary keystartDate- Check-in dateendDate- Check-out datenumNights- Number of nightsnumGuests- Number of gueststotalPrice- Total booking costguestId- Foreign key to guestcabinId- Foreign key to cabinstatus- Booking statusobservations- Special requirements
- Connect your repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy - Vercel will automatically build and deploy
The app can be deployed to any platform that supports Next.js:
- Netlify
- AWS Amplify
- Railway
- Render
- DigitalOcean App Platform
- Users click "Sign In" to access OAuth options
- After successful authentication, guest profile is created automatically
- Users gain access to protected routes (
/account) - Session persists across browser sessions
- Browse available cabins with filtering options
- Select a specific cabin to view details
- Choose dates using the interactive calendar
- Fill out reservation form with guest details
- Submit reservation (requires authentication)
- View confirmation and manage bookings in account
- Cabin management through Supabase dashboard
- Booking oversight and management
- Guest information access
- Settings configuration
We welcome contributions to The Wild Oasis project! Here's how to get started:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Commit your changes
git commit -m 'Add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow the existing code style and patterns
- Write meaningful commit messages
- Test your changes thoroughly
- Update documentation as needed
- Ensure responsive design works on all devices
This project is licensed under the MIT License. See the LICENSE file for details.
- Next.js team for the amazing React framework
- Supabase for the excellent backend-as-a-service
- Tailwind CSS for the utility-first CSS framework
- NextAuth.js for authentication made simple
- Heroicons for beautiful icons
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
Built with β€οΈ for luxury travel experiences
The Wild Oasis - Where nature's beauty and comfortable living blend seamlessly since 1962.