An open-source, high-performance, and unified hospitality suite designed by Archilect Studios. This system integrates front-desk hotel operations, interactive restaurant table mapping, live kitchen order tickets (KOT), real-time business intelligence, role-based access control, and a mobile self-ordering guest portal.
Visit our website at: archilect.in
# 1. Clone & install
git clone https://github.com/udai7/hotel_management.git
cd hotel_management
npm install
# 2. Configure environment
cp .env.example .env.local # fill in Supabase / Redis / Turnstile values
# 3. Apply database migrations & seed data
# Run the SQL files in supabase/migrations/ (in order) and supabase/seed.sql
# in your Supabase SQL Editor β see "Database Seeding" below.
# 4. Start the dev server
npm run devThe app runs at http://localhost:3000.
Requirements: Node.js 20+, a Supabase project, and (optionally) a Redis instance. See
.env.examplefor all configuration options.
- Real-Time Counters: Monitor guest count, active room occupancy, pending restaurant orders, and total daily revenue.
- Financial Charts: Break down revenue sources dynamically between Rooms and Restaurant streams.
- Zero-Latency Updates: Real-time operational summary widgets that keep front-desk staff informed.
- Interactive Room Grid: Visual layout displaying room numbers, types (Standard vs. Premium), and housekeeping status.
- Housekeeping States: Housekeeping tracking (Available, Occupied, Cleaning, Maintenance).
- One-Click Check-In: Link guests directly to rooms and register stay durations instantly.
- Visual Seating Layout: Interactive floor map indicating table availability (Green for Available, Red for Occupied, Yellow for Reserved).
- Capacity Indicators: Check dining capacities and seat customers accordingly.
- Direct KOT Linking: Initiate food orders directly mapped to occupied tables.
- Searchable Database: Quick lookup by name, phone number, email, or guest tax GSTIN.
- Occupancy Records: Logs guest numbers per reservation along with check-in/out timestamps.
- Dynamic Menu Creator: Add, update, or deactivate seasonal food items.
- Inventory Control: Automatically blocks order inputs when kitchen inventory for a dish drops to 0.
- Real-Time Order Ticket Queue: Automatically pushes new orders to the kitchen screen using Supabase Realtime.
- Safe Database Deduplication: Invokes thread-safe Postgres RPCs (
accept_order_safe) to safely update inventory without race conditions. - State Progressions: Track tickets as Pending β Preparing β Served.
- Unified Registry: Aggregates room stay tariffs and restaurant orders into a single check-out invoice.
- Tax Calculations: Supports custom discounts, payment modes (Cash, Card, UPI), and automatic GST/VAT calculation.
- Historical Performance: Graphs occupancy efficiency, monthly revenue patterns, and peak restaurant hours.
- Inventory Forecasting: Highlights top-selling dishes to help managers plan kitchen purchases.
- 1-Year Backup: Admins can securely store and retrieve up to 1 year of past transaction records and backup sales data.
- Compliance Ready: Immutable logs for legal audits, with quick keyword-searchable historical filters.
- Table & Room QR Codes: Customers scan localized codes to browse the menu and order without waiting for staff.
- Mobile-First Layout: Light, responsive customer ordering experience.
- Access Profiles: Assign permissions (Superadmin, Admin, Staff, Kitchen) matching database Row Level Security (RLS) rules.
- Global Configuration: Customize tax rates, receipt branding headers, and clear system cache logs.
- Frontend Framework: Next.js 16 + React 19 (App Router)
- Database & Realtime: PostgreSQL (Supabase) with custom Row Level Security (RLS)
- Caching Engine: Redis (ioredis) with domain-based cache versioning
- Styling: Structured retro-premium design tokens with pure CSS layouts
Run these queries in the Supabase SQL Editor after database migrations:
- Standard Operational Seed: Execute
supabase/seed.sqlto populate initial rooms (Standard/Premium) and food menu catalogue items. - Historical Data Seed (5,200 Bookings): Execute
supabase/seed_bookings.sqlto populate 1 year of historical transactions. This deep database seeding is highly recommended to inspect and test the Business Intelligence dashboards, sales performance charts, and archives search capabilities.
User signups default to the base admin role. To grant a user account full superadmin privileges, run this query in your Supabase SQL Editor:
UPDATE public.users SET role = 'superadmin' WHERE email = 'your-superadmin-email@domain.com';- A virtual private server (VPS) running Ubuntu 22.04 LTS or newer (minimum 1 vCPU, 1GB RAM).
- A Supabase project with initial database tables.
- A registered domain name pointing to your VPS IP.
Retrieve the SQL migrations from supabase/migrations/ (starting with 20260227135007_initial_schema.sql) and run them inside your Supabase project's SQL Editor to set up tables, triggers, and Row Level Security.
Install and secure Redis on your VPS:
sudo apt update
sudo apt install redis-server -y
sudo systemctl enable redis-server.serviceClone this repository on your VPS and configure production environment variables in .env.production:
NEXT_PUBLIC_SUPABASE_URL=https://your-supabase-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
REDIS_URL=redis://127.0.0.1:6379Build and start the application node process:
npm install
npm run build
npm run startFor production, run using a process manager like PM2:
sudo npm install pm2 -g
pm2 start npm --name "hotel-landing" -- start
pm2 save
pm2 startupInstall Nginx:
sudo apt install nginx -yConfigure /etc/nginx/sites-available/default to forward traffic to port 3000:
server {
listen 80;
server_name hotel.yourdomain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}Reload Nginx:
sudo systemctl restart nginxObtain a free SSL certificate from Let's Encrypt using Certbot:
sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d hotel.yourdomain.comTo guarantee zero-stale data in a high-concurrency environment:
- Reads fetch from Redis using domain-based key versions.
- Writes increment the specific domain version in database.
- Successive reads query the new key version immediately, avoiding the need for bulk key deletions.
- Fallback safety TTL is short (typically 60s).
A production-ready, multi-stage Dockerfile (Next.js standalone output) and a
docker-compose.yml (app + bundled Redis) are included.
# 1. Provide configuration (Supabase, Turnstile, etc.)
cp .env.example .env # edit values; REDIS_URL is set by compose
# 2. Build and start the stack (app + Redis)
docker compose up --buildThe app will be available at http://localhost:3000.
NEXT_PUBLIC_*variables are baked into the client bundle at build time, so they are passed as build args indocker-compose.yml. Server-only secrets (e.g.SUPABASE_SERVICE_ROLE_KEY) are injected at runtime via.env.
To build the image directly without Compose:
docker build -t archilect-hotel-management .
docker run --env-file .env -p 3000:3000 archilect-hotel-managementhotel_management/
βββ app/ # Next.js App Router (routes, layouts, API routes)
β βββ (admin)/ # Admin/staff-facing console
β βββ admin/
β βββ api/ # Route handlers (incl. cron cleanup)
β βββ auth/ # Authentication flows
β βββ order/ # Guest QR self-ordering portal
βββ components/ # React components (admin, dashboard, order, ui)
βββ lib/ # Server actions, cache, supabase clients, perf
β βββ actions/
β βββ cache/
β βββ supabase/
βββ supabase/ # SQL migrations + seed scripts + config
β βββ migrations/
βββ scripts/ # Benchmarks & maintenance scripts
βββ types/ # Shared TypeScript types
βββ public/ # Static assets & screenshots
βββ Dockerfile # Production container image
βββ docker-compose.yml # App + Redis stack
βββ next.config.ts # Security headers, standalone output, image config
Contributions are welcome! Please read CONTRIBUTING.md for the development workflow and coding guidelines, and our Code of Conduct before participating.
Found a vulnerability? Please follow the responsible-disclosure process in our Security Policy β do not open a public issue for security reports.
Distributed under the MIT License. See LICENSE for details.
Designed with care by Archilect Studios.