A full-stack cabin booking management platform with a customer-facing landing page and an admin dashboard
Features β’ Tech Stack β’ Project Structure β’ Getting Started β’ Deployment β’ Screenshots β’ Contact
HavenHub is a modern, full-featured cabin booking management system designed to provide a seamless experience for both administrators and customers. The project consists of three main components:
- Admin Dashboard - A powerful React-based interface for managing cabins, bookings, guests, and analytics
- Customer Landing Page - A beautiful Next.js website where customers can browse and book cabins
- Backend Infrastructure - Supabase-powered backend providing authentication, database, and storage
Built with modern web technologies, HavenHub demonstrates best practices in full-stack development, including state management, authentication, responsive design, and deployment strategies.
- π Authentication & Authorization - Secure login system with role-based access
- π Cabin Management - Full CRUD operations for cabins with image uploads
- π Booking Management - Track and manage all bookings with status updates
- π₯ Guest Management - Manage guest information and booking history
- β Check-in/Check-out System - Streamlined check-in and check-out process
- π Dashboard Analytics - Real-time statistics and data visualizations with Recharts
- βοΈ Settings Configuration - Customizable application settings
- π Dark Mode - Eye-friendly dark theme support
- π± Responsive Design - Works seamlessly on all devices
- π Cabin Browsing - Beautiful grid layout showcasing all available cabins
- π‘ Cabin Details - Detailed cabin information with image galleries
- π Booking System - Intuitive booking form with date selection
- π Search & Filtering - Advanced search and filter capabilities
- β€οΈ Favorites System - Save favorite cabins for later
- π± Mobile Responsive - Perfect experience on mobile devices
- π Dark Mode - Consistent dark theme across the site
- π¨ Modern UI/UX - Built with shadcn/ui and Tailwind CSS
- β‘ Fast Performance - Optimized with Next.js 15 and Server Components
- ποΈ PostgreSQL Database - Robust relational database
- π Authentication - Built-in auth with JWT tokens
- π¦ Storage - Image storage and management
- π Row Level Security - Secure data access policies
- β‘ Real-time - Real-time data synchronization
- π API - Auto-generated REST and GraphQL APIs
| Technology | Purpose |
|---|---|
| βοΈ React 18 | UI library for building interactive interfaces |
| β‘ Vite | Fast build tool and dev server |
| π React Query | Server state management and caching |
| π§ React Router | Client-side routing |
| π Styled Components | CSS-in-JS styling solution |
| π Recharts | Charts and data visualization |
| π React Hook Form | Form state management |
| π React Hot Toast | Toast notifications |
| π¨ React Icons | Icon library |
| Technology | Purpose |
|---|---|
| β‘ Next.js 15 | React framework with SSR and RSC |
| π TypeScript | Type-safe JavaScript |
| π¨ Tailwind CSS | Utility-first CSS framework |
| π§© shadcn/ui | Beautiful component library |
| π Radix UI | Unstyled, accessible components |
| β¨ Framer Motion | Animation library |
| π React Hook Form | Form management |
| β Zod | Schema validation |
| π date-fns | Date utilities |
| π Sonner | Toast notifications |
| Technology | Purpose |
|---|---|
| π PostgreSQL | Relational database |
| π Supabase Auth | Authentication service |
| π¦ Supabase Storage | File storage |
| β‘ Supabase Realtime | Real-time subscriptions |
| π RLS Policies | Row-level security |
| Technology | Purpose |
|---|---|
| π¨ ESLint | Code linting |
| π¨ Prettier | Code formatting |
| π¦ npm | Package management |
| π Vercel | Deployment platform |
| π Git | Version control |
HavenHub/
βββ π src/ # Admin Dashboard Source
β βββ π pages/ # Page components
β β βββ Dashboard.jsx # Main dashboard with analytics
β β βββ Cabins.jsx # Cabin management
β β βββ Bookings.jsx # Booking management
β β βββ Guests.jsx # Guest management
β β βββ Settings.jsx # Application settings
β β βββ Account.jsx # User account
β β βββ Login.jsx # Authentication
β βββ π features/ # Feature-based modules
β βββ π services/ # API services
β β βββ apiAuth.js # Authentication API
β β βββ apiBookings.js # Bookings API
β β βββ apiCabins.js # Cabins API
β β βββ supabase.js # Supabase client
β βββ π ui/ # Reusable UI components
β βββ π context/ # React context providers
β βββ π hooks/ # Custom React hooks
β βββ π utils/ # Utility functions
β βββ π styles/ # Global styles
βββ π HavenHub-landing/ # Customer Landing Page
β βββ π app/ # Next.js app directory
β β βββ page.tsx # Home page
β β βββ favorites/ # Favorites page
β β βββ layout.tsx # Root layout
β βββ π components/ # React components
β β βββ π landing/ # Landing page sections
β β β βββ HeroSection.tsx # Hero section
β β β βββ CabinCard.tsx # Cabin card component
β β β βββ BookingForm.tsx # Booking form
β β β βββ FeaturesSection.tsx # Features showcase
β β β βββ TestimonialsSection.tsx
β β βββ π ui/ # shadcn/ui components
β βββ π lib/ # Utility libraries
β β βββ supabase.ts # Supabase client
β β βββ api.ts # API functions
β β βββ utils.ts # Helper functions
β βββ π hooks/ # Custom hooks
β βββ π context/ # Context providers
β βββ π types/ # TypeScript types
βββ π public/ # Static assets
βββ π package.json # Dashboard dependencies
βββ π vite.config.js # Vite configuration
βββ π vercel.json # Vercel deployment config
βββ π DEPLOYMENT.md # Deployment guide
βββ π README.md # This file
Before you begin, ensure you have the following installed:
- Node.js (v18.0 or higher)
- npm or yarn or pnpm
- Git
- Supabase Account (free at supabase.com)
git clone https://github.com/zacktam12/HavenHub.git
cd HavenHub# Install dependencies
npm install
# Run development server
npm run devThe dashboard will be available at http://localhost:5173
# Navigate to landing page directory
cd HavenHub-landing
# Install dependencies
npm install
# Run development server
npm run devThe landing page will be available at http://localhost:3000
Both applications use Supabase for backend services. You'll need to:
- Create a Supabase project at supabase.com
- Get your project URL and anon key
- Update the Supabase configuration in:
src/services/supabase.js(Admin Dashboard)HavenHub-landing/lib/supabase.ts(Landing Page)
// Example configuration
const supabaseUrl = 'YOUR_SUPABASE_URL'
const supabaseKey = 'YOUR_SUPABASE_ANON_KEY'Run the Supabase SQL migrations to set up your database schema:
- Create tables for: cabins, bookings, guests, settings
- Set up Row Level Security (RLS) policies
- Configure storage buckets for cabin images
Both applications are configured for Vercel deployment but can be deployed to any hosting platform.
# Install Vercel CLI
npm install -g vercel
# Deploy to Vercel
cd HavenHub
vercel --prodConfiguration:
- Framework: Vite
- Build Command:
npm run build - Output Directory:
dist - Root Directory:
./
# Deploy landing page
cd HavenHub-landing
vercel --prodConfiguration:
- Framework: Next.js
- Build Command:
npm run build - Root Directory:
HavenHub-landing
- Netlify: Drag and drop the
distfolder - Render: Connect your Git repository
- Railway: One-click deployment
- AWS Amplify: Full-stack deployment
For detailed deployment instructions, see DEPLOYMENT.md
Click to view dashboard screenshots
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Client Layer β
ββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ€
β Admin Dashboard β Customer Landing Page β
β (React + Vite) β (Next.js + TypeScript) β
β Port: 5173 β Port: 3000 β
ββββββββββββ¬ββββββββββββ΄βββββββββββββββ¬ββββββββββββββββββββ
β β
β βββββββββββββββββββββββ
β β
βΌ βΌ
ββββββββββββββββββββ
β Supabase β
β (Backend) β
ββββββββββββββββββββ€
β β’ PostgreSQL DB β
β β’ Authentication β
β β’ Storage β
β β’ Real-time β
β β’ REST API β
ββββββββββββββββββββ
- Authentication: Users log in through Supabase Auth
- Data Fetching: React Query caches and manages server state
- Real-time Updates: Supabase real-time subscriptions for live data
- File Uploads: Images stored in Supabase Storage
- API Calls: RESTful API calls to Supabase
# Admin Dashboard
npm run test
# Landing Page
cd HavenHub-landing
npm run test# Admin Dashboard
npm run lint
# Landing Page
cd HavenHub-landing
npm run lint- β Row Level Security (RLS) policies in Supabase
- β JWT-based authentication
- β Protected routes and API endpoints
- β Input validation and sanitization
- β Secure environment variable handling
- β HTTPS-only in production
- β‘ Code splitting with React.lazy
- π¦ Optimized bundle size
- πΌοΈ Image optimization
- πΎ Efficient caching with React Query
- π― Memoization of expensive computations
- π Next.js Server Components for faster page loads
- π Lazy loading of components
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is private and proprietary. All rights reserved.
- React - UI library
- Next.js - React framework
- Supabase - Backend platform
- Tailwind CSS - CSS framework
- shadcn/ui - Component library
- Vercel - Deployment platform
For any inquiries or support:
- Email: [email protected]
- LinkedIn: linkedin.com/in/zekariastamiru
- GitHub: @zacktam12