Skip to content

🌿 HavenHub– A smart hotel management system for seamless bookings, check-ins, payments, and guest tracking, with powerful analytics and an intuitive dashboard

Notifications You must be signed in to change notification settings

zacktam12/HavenHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

128 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•οΈ HavenHub - Cabin Booking Management System

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

React Next.js TypeScript Supabase


πŸ“‹ Overview

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:

  1. Admin Dashboard - A powerful React-based interface for managing cabins, bookings, guests, and analytics
  2. Customer Landing Page - A beautiful Next.js website where customers can browse and book cabins
  3. 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.


✨ Features

🎯 Admin Dashboard Features

  • πŸ” 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

🌐 Landing Page Features

  • πŸ” 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

πŸ”§ Backend Features (Supabase)

  • πŸ—„οΈ 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

πŸ› οΈ Tech Stack

Frontend (Admin Dashboard)

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

Frontend (Landing Page)

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

Backend (Supabase)

Technology Purpose
🐘 PostgreSQL Relational database
πŸ” Supabase Auth Authentication service
πŸ“¦ Supabase Storage File storage
⚑ Supabase Realtime Real-time subscriptions
πŸ”’ RLS Policies Row-level security

Development & Deployment

Technology Purpose
πŸ”¨ ESLint Code linting
🎨 Prettier Code formatting
πŸ“¦ npm Package management
πŸš€ Vercel Deployment platform
πŸ™ Git Version control

πŸ“ Project Structure

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

πŸš€ Getting Started

Prerequisites

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)

Installation

1️⃣ Clone the Repository

git clone https://github.com/zacktam12/HavenHub.git
cd HavenHub

2️⃣ Set Up Admin Dashboard

# Install dependencies
npm install

# Run development server
npm run dev

The dashboard will be available at http://localhost:5173

3️⃣ Set Up Landing Page

# Navigate to landing page directory
cd HavenHub-landing

# Install dependencies
npm install

# Run development server
npm run dev

The landing page will be available at http://localhost:3000

Environment Setup

Supabase Configuration

Both applications use Supabase for backend services. You'll need to:

  1. Create a Supabase project at supabase.com
  2. Get your project URL and anon key
  3. 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'

Database Setup

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

🌐 Deployment

Both applications are configured for Vercel deployment but can be deployed to any hosting platform.

Deploy Admin Dashboard

# Install Vercel CLI
npm install -g vercel

# Deploy to Vercel
cd HavenHub
vercel --prod

Configuration:

  • Framework: Vite
  • Build Command: npm run build
  • Output Directory: dist
  • Root Directory: ./

Deploy Landing Page

# Deploy landing page
cd HavenHub-landing
vercel --prod

Configuration:

  • Framework: Next.js
  • Build Command: npm run build
  • Root Directory: HavenHub-landing

Alternative Deployment Options

  • Netlify: Drag and drop the dist folder
  • Render: Connect your Git repository
  • Railway: One-click deployment
  • AWS Amplify: Full-stack deployment

For detailed deployment instructions, see DEPLOYMENT.md


πŸ“Έ Screenshots

Admin Dashboard

Click to view dashboard screenshots

Dashboard Overview

Dashboard

Cabin Management

Cabins

Booking Management

Bookings

Dark Mode

Dark Mode

Landing Page

Click to view landing page screenshots

Hero Section

Hero

Cabin Listings

Cabins

Booking Form

Booking

Mobile Responsive

Mobile


πŸ—οΈ Architecture

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     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       β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

  1. Authentication: Users log in through Supabase Auth
  2. Data Fetching: React Query caches and manages server state
  3. Real-time Updates: Supabase real-time subscriptions for live data
  4. File Uploads: Images stored in Supabase Storage
  5. API Calls: RESTful API calls to Supabase

πŸ§ͺ Testing

Run Tests

# Admin Dashboard
npm run test

# Landing Page
cd HavenHub-landing
npm run test

Linting

# Admin Dashboard
npm run lint

# Landing Page
cd HavenHub-landing
npm run lint

πŸ” Security

  • βœ… 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

πŸ“ˆ Performance Optimizations

  • ⚑ 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

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is private and proprietary. All rights reserved.


πŸ‘¨β€πŸ’» Author

Zekarias Tamiru

Full-Stack Developer | React | Next.js | TypeScript

GitHub LinkedIn Email


πŸ™ Acknowledgments


πŸ“ž Contact

For any inquiries or support:


⭐ Star this repository if you find it helpful!

Made with ❀️ by Zekarias Tamiru

About

🌿 HavenHub– A smart hotel management system for seamless bookings, check-ins, payments, and guest tracking, with powerful analytics and an intuitive dashboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published