A comprehensive hotel management application built with React and Supabase, designed for hotel staff to manage bookings, cabins, guests, and daily operations efficiently.
- Real-time Statistics: Track total bookings, sales, check-ins, and occupancy rates
- Interactive Charts: Visualize sales trends and booking duration patterns
- Today's Activity: Monitor check-ins and check-outs happening today
- Revenue Analytics: View financial performance over different time periods
- Cabin Catalog: Complete CRUD operations for cabin management
- Image Upload: Upload and manage cabin photos with automatic storage
- Pricing & Capacity: Set regular prices, discounts, and maximum capacity
- Detailed Descriptions: Rich cabin descriptions for marketing purposes
- Booking Overview: View all bookings with filtering and sorting capabilities
- Status Management: Track booking status (unconfirmed, checked-in, checked-out)
- Guest Information: Access complete guest details and booking history
- Payment Tracking: Monitor payment status and additional services
- Guest Profiles: Maintain detailed guest information and preferences
- Booking History: View complete booking history for each guest
- Contact Information: Store and manage guest contact details
- Nationality Tracking: Track guest demographics with country flags
- Streamlined Process: Efficient check-in and check-out workflows
- Payment Processing: Handle payments and additional services during check-in
- Activity Monitoring: Real-time tracking of daily check-in/out activities
- Breakfast Services: Manage optional breakfast add-ons
- Secure Authentication: Powered by Supabase Auth
- User Profiles: Manage staff accounts and profile information
- Avatar Upload: Custom avatar support for user profiles
- Password Management: Secure password reset and update functionality
- Global Settings: Configure application-wide settings
- Pricing Rules: Set minimum and maximum nights, breakfast prices
- Business Rules: Customize operational parameters
- Dark/Light Mode: Toggle between themes for comfortable viewing
- Responsive Design: Optimized for desktop and tablet devices
- Real-time Updates: Live data synchronization across the application
- Error Handling: Comprehensive error boundaries and user feedback
- Loading States: Smooth loading experiences with skeleton screens
- React 19.1.0 - Latest React with concurrent features
- Vite 7.0.0 - Lightning-fast build tool and development server
- React Router DOM 7.6.3 - Client-side routing with data loading
- Styled Components 6.1.19 - CSS-in-JS styling solution
- React Query 5.81.5 - Powerful data synchronization and caching
- Supabase - Backend-as-a-Service with PostgreSQL database
- Supabase Auth - Authentication and user management
- Supabase Storage - File storage for images and avatars
- Row Level Security (RLS) - Database security policies
- React Hook Form 7.60.0 - Performant forms with easy validation
- React Hot Toast 2.5.2 - Beautiful toast notifications
- React Error Boundary 6.0.0 - Error handling and recovery
- Recharts 2.15.4 - Composable charting library
- React Icons 5.5.0 - Popular icon libraries
- Date-fns 4.1.0 - Modern JavaScript date utility library
- ESLint - Code linting and formatting
- React Query Devtools - Development debugging tools
- Node.js (version 16 or higher)
- npm or yarn package manager
- Supabase account
-
Clone the repository
git clone https://github.com/yourusername/wild-oasis.git cd wild-oasis -
Install dependencies
npm install
-
Environment Setup Create a
.envfile in the root directory:VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_KEY=your_supabase_anon_key
-
Supabase Configuration
Database Tables: Set up the following tables in your Supabase database:
cabins- Store cabin informationbookings- Store booking detailsguests- Store guest informationsettings- Store application settings
Storage Buckets: Create the following storage buckets:
cabin-images- For cabin photographsavatars- For user profile pictures
Row Level Security: Enable RLS policies for data protection
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
src/
βββ components/ # Reusable UI components
βββ context/ # React context providers
β βββ DarkModeContext.jsx
βββ data/ # Sample data and utilities
β βββ cabins/ # Cabin images
β βββ Uploader.jsx # Data upload utility
βββ features/ # Feature-based modules
β βββ authentication/ # Login, signup, user management
β βββ bookings/ # Booking management
β βββ cabins/ # Cabin management
β βββ check-in-out/ # Check-in/out workflows
β βββ dashboard/ # Dashboard and analytics
β βββ guests/ # Guest management
β βββ settings/ # Application settings
βββ hooks/ # Custom React hooks
βββ pages/ # Route-level page components
βββ services/ # API and external service integrations
β βββ apiAuth.js # Authentication services
β βββ apiBookings.js # Booking API calls
β βββ apiCabins.js # Cabin API calls
β βββ apiGuests.js # Guest API calls
β βββ apiSettings.js # Settings API calls
β βββ supabase.js # Supabase client configuration
βββ styles/ # Global styles and themes
βββ ui/ # UI component library
βββ utils/ # Utility functions and constants
βββ App.jsx # Main application component
βββ main.jsx # Application entry point
- Statistics Cards: Display key metrics like total bookings, sales, check-ins, and occupancy
- Sales Chart: Interactive line chart showing revenue trends over time
- Duration Chart: Pie chart analyzing stay duration patterns
- Today's Activity: Real-time list of check-ins and check-outs
- Filter Options: View data for last 7, 30, or 90 days
- Complete CRUD Operations: Create, read, update, and delete cabins
- Image Management: Upload cabin photos with automatic resizing and storage
- Duplicate Functionality: Quick cabin duplication for similar properties
- Capacity Management: Set maximum occupancy and pricing tiers
- Discount System: Apply seasonal or promotional discounts
- Booking States: Manage unconfirmed, confirmed, checked-in, and checked-out status
- Payment Integration: Track payment status and process additional charges
- Guest Services: Add breakfast and other services during booking
- Filtering & Sorting: Advanced filtering by status, date, and guest information
- Pagination: Efficient handling of large booking datasets
- Guest Verification: Confirm guest identity and booking details
- Payment Collection: Process outstanding payments and deposits
- Service Add-ons: Add breakfast or other services during check-in
- Room Assignment: Confirm cabin assignment and provide access details
- Documentation: Generate confirmation receipts and documentation
npm run dev- Start development servernpm run build- Build production bundlenpm run preview- Preview production build locallynpm run lint- Run ESLint for code quality
npm run build- Connect your repository to your deployment platform
- Set environment variables:
VITE_SUPABASE_URLVITE_SUPABASE_KEY
- Deploy from the
distfolder after running build
Make sure to configure these environment variables in your deployment:
VITE_SUPABASE_URL: Your Supabase project URLVITE_SUPABASE_KEY: Your Supabase anonymous key
- Create a new Supabase project
- Set up the database schema (tables for cabins, bookings, guests, settings)
- Configure Row Level Security (RLS) policies
- Set up storage buckets for images
- Configure authentication settings
- Themes: Modify colors and styling in
styles/GlobalStyles.js - Business Rules: Update settings in the Settings page
- Branding: Replace logos in the
publicfolder - Features: Add new features following the existing pattern in
features/
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - 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 structure and patterns
- Use feature-based organization for new functionality
- Write meaningful commit messages
- Test your changes thoroughly
- Update documentation for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React and Supabase
- Icons from React Icons
- Charts powered by Recharts
- Styled with Styled Components
If you have any questions or need help getting started:
- Check the Issues page
- Create a new issue for bugs or feature requests
- Reach out to the maintainers
Happy Hotel Management! π¨β¨