Skip to content

Getting Started

Get the Booking Management System running locally in a few minutes.

Prerequisites

RequirementNotes
Bun ≥ 1.x (recommended) or Node.js ≥ 18Bun is used as the default runtime & package manager
Firebase / Firestore projectService-account JSON key required
Upstash Redis instanceFree tier works for development
Brevo (Sendinblue) SMTP (optional)For transactional emails — can be skipped initially
GitTo clone the monorepo

1. Clone the Monorepo

bash
git clone https://github.com/your-org/booking-management.git
cd booking-management

The 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 install

Create 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:5000

3. Frontend Setup

bash
cd ../booking-management-frontend
bun install          # or: npm install

Create .env.local:

env
NEXT_PUBLIC_API_URL=http://localhost:5000

Start the Next.js dev server:

bash
bun run dev          # or: npm run dev
# ⇢ App running on http://localhost:3000

4. 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 -f

Make 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:

  1. Create an Organization — Sign up and create your first property/hotel org.
  2. Invite Users — Send email invitations and assign roles (Admin, Manager, Staff).
  3. Add Room Categories & Rooms — Define room types, rates, and individual rooms.
  4. Create a Booking — Test the full flow: search availability → book → generate invoice → record payment.
  5. Explore the Dashboard — Check occupancy, revenue charts, and recent activity.

Next Steps

Released under the MIT License.