HotelHub HMSDocs

11 — Admin Panel (Super-Admin / Vendor-Side) #

Panel untuk vendor (kita — penjual aplikasi) memantau license, tenants (SaaS), telemetry, billing, support. Ini BUKAN panel hotel staff. Hotel staff pakai User Panel (lihat 12-USER_PANEL.md).

URL convention: /admin di host vendor (e.g. admin.hotelhub.id atau host khusus untuk standalone).


1. Akses & isolasi #


2. Layout #

[Sidebar]                        [Topbar: search, notifications, profile]
─────────────────────────────────────────────────────────────────────────
🏠 Dashboard
🔑 Licenses
   ├── Active
   ├── Expired
   ├── Revoked
   └── Pairing logs
🏢 Tenants (SaaS only)
   ├── All tenants
   ├── New signups
   ├── Trials
   └── Churned
💳 Billing
   ├── Subscriptions
   ├── Invoices
   ├── Coupons
   └── Failed payments
📊 Telemetry & Health
   ├── System health (per tenant)
   ├── API call usage
   ├── Errors / alerts
   └── Database size
🤝 Support
   ├── Tickets
   ├── Knowledge base
   └── Live chat queue (P2)
🛍 Marketplace (P3)
   ├── Add-ons
   └── Affiliates
👥 Admin Users
   ├── Roles
   └── Activity log
🔧 System
   ├── Feature flags
   ├── Pricing config
   ├── Email templates
   ├── Update notifications
   └── Audit log

3. Module: Licenses #

List view #

Detail view #

Per license:

Create license (manual sale flow) #

Form: company name, contact, plan (standalone vs SaaS), feature flags, max rooms, max users, validity period, payment status. Generate key + send activation email.

Bulk operations #

Lihat detail desain di 16-LICENSE_PAIRING_DESIGN.md.


4. Module: Tenants (SaaS) #

Hanya muncul kalau APP_MODE=saas.

List #

Detail per tenant #

Tabs:

Tenant lifecycle #


5. Module: Billing #


6. Module: Telemetry & Health #

Polling endpoint dari setiap deployment (standalone & tenant) push ke central:

POST /admin/telemetry/heartbeat
{
  "license_key": "...",
  "deployment_id": "...",
  "version": "1.4.2",
  "rooms_count": 24,
  "active_bookings": 18,
  "queue_jobs_pending": 3,
  "queue_jobs_failed_24h": 0,
  "errors_24h": 12,
  "db_size_mb": 380,
  "uptime_pct_24h": 99.9
}

Heartbeat tiap 1 jam. Stored di tabel deployment_heartbeats (rolling 30 days).

Alert rules:

Dashboard chart: deployment health overview, top-error tenants, version distribution.


7. Module: Support #

Tickets #

Knowledge base #

Live chat (P2) #


8. Module: Admin Users & Roles #

admin_users
├── id, email, password (bcrypt)
├── name, phone
├── role_id
├── two_factor_secret_encrypted
├── is_active
├── last_login_at, last_login_ip
└── timestamps

admin_roles
├── id, name (super_admin|sales|support|finance|dev_ops|read_only)
├── permissions (JSON array of permission keys)
└── timestamps

Permission contoh: licenses.create, licenses.revoke, tenants.impersonate, billing.refund, system.feature_flags, audit.read, dll.

Activity log per admin user: every action (especially impersonation, refund, license revoke) logged.


9. Module: System Settings #

Feature flags #

Global toggle features yang bisa dipatok per tenant atau global:

UI: list flag + tenant override matrix.

Pricing config #

Edit plan: name, monthly/yearly price, feature set, rooms cap, user cap, AI quota baseline. Activate / deprecate plan.

Email templates #

Master template untuk:

WYSIWYG + variable insert.

Update notifications #

Push announcement to all tenants:

Tampil di user panel banner. Tenant-targeted (by plan, by region).

Audit log #

Read-only, searchable, exportable. Retention 7 tahun.


10. Module: Marketplace (P3) #

Phase 3, opsional.


11. Branding & White-label #

Kalau jualnya sebagai white-label (reseller boleh re-brand):


12. Reports yang tersedia #

Report Periode Format
MRR / ARR breakdown Monthly Dashboard + Excel
Churn rate Monthly Dashboard
New signups Daily / Weekly Dashboard
Top tenants by revenue All-time Excel
License sale (standalone) Monthly Excel
Support ticket volume Weekly Dashboard
Avg resolution time Weekly Dashboard
Deployment health summary Real-time Dashboard
AI BYOK usage (aggregated) Monthly Excel — informational only, ga bill ke tenant
Renewal pipeline (next 30d) Daily Dashboard

13. Stack #


14. Open questions #

  1. Filament vs custom Livewire untuk admin? Filament cepat tapi kurang lentur untuk custom flow license.
  2. Apakah perlu mobile admin app, atau cukup responsive web?
  3. Multi-region deployment (Asia + Europe) untuk reduce latency tenant push? Phase 3.
  4. Reseller portal di Phase 2 atau Phase 3?