A modern, full-featured cabins booking and management system built with React, TypeScript, and Supabase. Manage cabins, bookings, guests, and operations with an intuitive dashboard experience.
Features β’ Screenshots β’ Tech Stack β’ Getting Started β’ Project Structure β’ API & Backend
- Real-time Statistics: View total bookings, occupied cabins, and check-in/out activities
- Advanced Charts:
- Booking trends visualization with Recharts
- Sales performance tracking
- Duration-based analytics
- Today's Activity: Live-updating activity feed showing current day's bookings
- Skeleton Loaders: Smooth loading states for better UX during data fetching
- Full CRUD Operations: Create, read, update, and delete cabin listings
- Cabin Details: Manage pricing, capacity, amenities, and descriptions
- Image Upload: Add and manage cabin photos directly
- Filtering & Sorting: Advanced filtering by capacity, price, and status
- Pagination: Efficient handling of large cabin inventories
- Booking Lifecycle:
- Create and manage reservations
- Check-in/check-out operations
- Filters:
- Filter by status (unconfirmed, checked-in, checked-out)
- Sorting Options: Sort by date, price, guests, or status
- Detailed Booking View: Comprehensive booking details with guest info, pricing, and stay details
- Delete Functionality: Remove bookings with confirmation
- Payment Status Tracking: Visual indicators for paid/unpaid bookings
- Guest Directory: Browse all registered guests
- Profile Management: Update personal information and avatar
- Avatar Upload: Change profile picture with automatic storage cleanup
- Password Management: Secure password change functionality
- Account Settings: Manage preferences and account details
- Authentication: Secure login and signup with email verification
- Dark Mode Support: Full dark/light mode toggle with system preference detection
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Accessibility: WCAG compliant with proper semantic HTML
- Modern Components: Shadcn UI components with Tailwind CSS styling
- Smooth Animations: Subtle transitions and loading states
- Toast Notifications: Real-time feedback with Sonner notifications
- Email Authentication: Secure login and signup with Supabase Auth
- Protected Routes: Role-based access control for dashboard
- Session Management: Automatic session handling and refresh
- Password Hashing: Industry-standard password security
- Avatar Storage: Automatic cleanup of old avatars when updating profile
Dashboard Skeleton Loading State

Bookings List with Filters & Pagination

- Main: React 19.1 with TypeScript
- Build Tool: Vite 7.1
- Styling: Tailwind CSS 4.1 + Tailwind Merge
- UI Components: Shadcn UI + Radix UI
- Form Handling: React Hook Form + Zod validation
- State Management: TanStack React Query
- Routing: React Router DOM 7.9
- Charts: Recharts 2.15 for data visualization
- Icons: Lucide React 0.544
- Theme: Next Themes for dark mode support
- HTTP Client: Built-in Fetch API with Supabase JS SDK
- Backend as a Service: Supabase
- Database: PostgreSQL (via Supabase)
- Authentication: Supabase Auth (Email/Password)
- File Storage: Supabase Storage (for avatars and images)
- Language: TypeScript 5.9
- Linting: ESLint 9.36
- Package Manager: npm
- Version Control: Git
- Code Quality: Type-safe development with strict TypeScript checking
- Node.js: v16 or higher
- npm: v7 or higher
- Supabase Account: For backend services
- Git: For cloning the repository
- Clone the repository
git clone https://github.com/ragab0/the-wild-oasis.git
cd the-wild-oasis- Install dependencies
npm install- Environment Setup
Create a
.env.localfile in the root directory:
VITE_API_URL=https://your-project.supabase.co
VITE_API_PUBLIC_KEY=your-supabase-anon-keyGet these values from your Supabase project dashboard:
- Go to Supabase Dashboard
- Select your project
- Navigate to Settings β API
- Copy the Project URL and anon/public API Key
- Start development server
npm run devThe application will be available at http://localhost:5173
- Build for production
npm run build- Preview production build
npm run previewnpm run dev # Start development server with HMR
npm run build # Build for production
npm run preview # Preview production build locally
npm run lint # Run ESLint checksthe-wild-oasis/
βββ src/
β βββ assets/ # Static assets and mock data
β β βββ mockData.ts # Development mock data
β β βββ constants.ts # App-wide constants
β β
β βββ components/ # Reusable React components
β β βββ ui/ # Shadcn UI components
β β β βββ ...
β β βββ ...
β β
β βββ hooks/ # Custom React hooks
β βββ layouts/ # Page layouts
β βββ lib/ # Utility functions and helpers
β βββ pages/ # Page components
β β βββ home/ # Dashboard
β β βββ login/ # Authentication pages
β β βββ signup/
β β βββ bookings/ # Booking management
β β βββ cabins/ # Cabin management
β β βββ guests/ # Guest management
β β βββ users/ # Users directory
β β βββ account/ # User account settings
β β βββ ...
β βββ providers/ # Context providers
β βββ services/ # API service layer
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions
β βββ validations/ # Zod validation schemas
β βββ App.tsx # Main app component
β βββ main.tsx # Entry point
β βββ index.css # Global styles
β
βββ public/ # Static files
βββ vite.config.ts # Vite configuration
βββ tsconfig.json # TypeScript configuration
βββ tailwind.config.ts # Tailwind CSS config
βββ eslint.config.js # ESLint configuration
βββ package.json # Dependencies & scripts
βββ README.md # This file
The project uses Supabase as the complete backend solution. Here's how everything is structured:
Tables:
- auth.users - Managed by Supabase Auth
- public.bookings - Resort booking records
- public.cabins - Cabin inventory and details
- public.guests - Guest information
- public.users - User profiles with extended data
- RLS (Row Level Security): Secure data access based on user roles
- Storage Buckets:
avatars- User profile picturescabin-images- Cabin photos (prepared for future use)
- User signs up with email/password
- Supabase Auth creates user record
- Custom user profile created with avatar storage
- Session token managed automatically
- Protected routes verify session on load
Booking Model:
{
id: number;
cabin_id: number;
guest_id: number;
created_at: string;
start_date: string;
end_date: string;
total_nights: number;
total_guests: number;
is_paid: boolean;
has_breakfast: boolean;
cabin_price: number;
extra_price: number;
total_price: number;
status: "unconfirmed" | "checked-in" | "checked-out";
observations: string;
guests: Guest;
cabins: Cabin;
}Cabin Model:
{
id: number;
name: string;
max_capacity: number;
regular_price: number;
discount: number;
image: string;
description: string;
created_at: string;
}Guest Model:
{
id: number;
email: string;
full_name: string;
nationality: string;
country_flag: string;
national_id: string;
created_at: string;
}All data operations go through Supabase PostgREST API:
GET /rest/v1/bookings- Fetch bookings with filtersPOST /rest/v1/bookings- Create bookingPATCH /rest/v1/bookings- Update bookingDELETE /rest/v1/bookings- Delete booking- Similar endpoints for cabins, guests, users
- Visit https://app.supabase.com
- Sign in with your account
- Select "the-wild-oasis" project
- Navigate to:
- Tables Editor: View/edit database tables
- SQL Editor: Run custom queries
- Authentication: Manage users
- Storage: Manage file uploads
- Logs: View API requests and errors
VITE_API_URL=https://your-project.supabase.co
VITE_API_KEY=your-supabase-public-anon-keyThese are safe to expose in frontend code (use anon key, not service role key).
- React Query Caching: Smart data caching to reduce API calls
- Code Splitting: Route-based code splitting with React Router
- Image Optimization: Lazy loading and responsive images
- Pagination: Large datasets paginated to reduce memory usage
- Skeleton Loaders: Perceived performance improvement
This is a portfolio project showcasing modern web development practices. While contributions aren't expected, suggestions and improvements are welcome!
This project is part of a portfolio and is available for educational purposes.











