Getting Started
Get the Booking Management System running locally in a few minutes.
Prerequisites
| Requirement | Notes |
|---|---|
| Bun ≥ 1.x (recommended) or Node.js ≥ 18 | Bun is used as the default runtime & package manager |
| Firebase / Firestore project | Service-account JSON key required |
| Upstash Redis instance | Free tier works for development |
| Brevo (Sendinblue) SMTP (optional) | For transactional emails — can be skipped initially |
| Git | To clone the monorepo |
1. Clone the Monorepo
bash
git clone https://github.com/your-org/booking-management.git
cd booking-managementThe repository contains three main directories:
booking-management/
├── booking-management-backend/ # Express 5.1 API (Bun)
├── booking-management-frontend/ # Next.js 15 App Router
└── booking-management-docs/ # VitePress documentation (this site)2. Backend Setup
bash
cd booking-management-backend
bun install # or: npm installCreate a .env file (or copy from .env.example if available):
env
# ── Firebase ──────────────────────────────
FIREBASE_SERVICE_ACCOUNT={"type":"service_account","project_id":"..."}
# You can also point to a JSON file path instead of inline JSON
# ── Upstash Redis ─────────────────────────
REDIS_URL=rediss://default:xxxxx@us1-xxxxx.upstash.io:6379
REDIS_TOKEN=your_upstash_rest_token
# ── Auth ──────────────────────────────────
JWT_SECRET=super-secret-change-me
PASETO_SECRET=another-secret-for-paseto-v4
# ── Server ────────────────────────────────
PORT=5000
NODE_ENV=development
CORS_ORIGIN=http://localhost:3000
# ── Brevo SMTP (optional) ────────────────
BREVO_SMTP_HOST=smtp-relay.brevo.com
BREVO_SMTP_PORT=587
BREVO_SMTP_USER=your_brevo_login
BREVO_SMTP_PASS=your_brevo_smtp_key
BREVO_SENDER_EMAIL=noreply@yourdomain.com
BREVO_SENDER_NAME=Booking System
# ── Google Sheets sync (optional) ────────
GSHEET_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\n...
GSHEET_CLIENT_EMAIL=sheets@project.iam.gserviceaccount.com
# ── Azure Blob (optional) ────────────────
AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=https;...Start the API server:
bash
bun run app.js # or: node app.js
# ⇢ API listening on http://localhost:50003. Frontend Setup
bash
cd ../booking-management-frontend
bun install # or: npm installCreate .env.local:
env
NEXT_PUBLIC_API_URL=http://localhost:5000Start the Next.js dev server:
bash
bun run dev # or: npm run dev
# ⇢ App running on http://localhost:30004. Docker Setup (Alternative)
If you prefer containers, a docker-compose.yml is provided in the backend directory:
bash
cd booking-management-backend
# Build & start all services
docker-compose up -d --build
# View logs
docker-compose logs -fMake sure to set the required environment variables in a .env file or pass them via docker-compose.override.yml.
5. First Steps
Once both servers are running:
- Create an Organization — Sign up and create your first property/hotel org.
- Invite Users — Send email invitations and assign roles (Admin, Manager, Staff).
- Add Room Categories & Rooms — Define room types, rates, and individual rooms.
- Create a Booking — Test the full flow: search availability → book → generate invoice → record payment.
- Explore the Dashboard — Check occupancy, revenue charts, and recent activity.
Next Steps
- User Guide — Detailed feature walk-throughs
- Architecture — System design & data-flow diagrams
- API Reference — Full endpoint documentation
- Admin Panel — Super-admin operations & audit logs