Skip to content

System Operations Guide ​

Operations manual for Hereby platform deployment, database management, monitoring, and integrations.

Target Users: System Administrators, Developers, DevOps Engineers

System Architecture ​

Service Port Map ​

ServicePortProtocol
PostgreSQL5432TCP
pgAdmin5050HTTP
Redis6379TCP
API Server3000HTTP
HR System4000HTTP
Admin Panel4001HTTP
Employee App4002HTTP
Nurse Scheduler4003HTTP
Internal Approval4004HTTP
General Affairs4005HTTP
Management Dashboard4006HTTP
Inventory4007HTTP
Module Manager4010HTTP
System Admin API4100HTTP
System Admin UI4101HTTP (Vite dev server)

Guides ​

Core Operations ​

Multi-Tenancy ​

Integrations ​

Common Tasks ​

Inspect Organizations from a Configured Backend ​

bash
open http://localhost:4101
# Login with the independent local SUPER_ADMIN account
# → select a configured endpoint → read its authorized organizations

Organization provisioning and mutation routes are intentionally outside the authorized-read milestone. Use the separately reviewed provisioning workflow when that write path is enabled.

Set Up Secom for an Organization ​

bash
make provision-secom CLIENT=CLINIC01 PASSWORD='<secure>' SECOM_IP=192.168.20.101/32

Backup Database ​

bash
make db-backup
# Creates timestamped dump in ./backups/

Update to a New Version ​

bash
git pull
pnpm install
pnpm build
make db-migrate
# Restart services

Environment Variables ​

See .env.example for the complete list. Critical production variables:

VariableRequired?Notes
DB_PASSWORDYesStrong password
DB_SSLRecommendedtrue in production
JWT_SECRETYesLong random string
SYSADMIN_DB_*YesIndependent control-plane database used by the System Admin server
SYSADMIN_ENCRYPTION_KEYYesSecret used to encrypt authenticator/TOTP material outside the database
SYSADMIN_ENDPOINTSYes for SysadminInfra-owned JSON registry of backend IDs, internal origins, display names, environments, and optional CS prefixes; [] is valid when intentionally empty
SYSADMIN_ENDPOINT_IDFor each business backendMatching Infra-owned backend identity used by signed Sysadmin requests; not a database UUID
SYSADMIN_SERVICE_*For backend readsShort-lived service-token signing and the shared issuer/public-key trust; endpoint origins and membership come from SYSADMIN_ENDPOINTS
SYSADMIN_ALLOWED_IPSRecommendedComma-separated exact IPs — no CIDR support; empty falls back to localhost only
NODE_ENVYes for Sysadmindevelopment, test, staging, or production; production requires HTTPS for App backend, Native update, and Bundle download URLs, while the other modes allow HTTP or HTTPS
SYSADMIN_APP_DISCOVERY_ORIGINSFor public App APIsExact comma-separated browser/WebView origins used by backend discovery and version check; keep empty until deployed App origins are reviewed. See the discovery runbook.
SYSADMIN_APP_VERSION_UPDATE_HOSTSLegacy App version route onlyExact public update-link host allowlists keyed by platform (ios, android, web). Remove after the reviewed client cutover. See the version-management runbook.
FCM_SERVICE_ACCOUNT_KEYOptionalFor mobile push
WEB_PUSH_PUBLIC_KEY + WEB_PUSH_PRIVATE_KEYOptionalFor browser push