2026-05-11 13:19:30 +02:00
|
|
|
# centralcloud/portal
|
2026-05-09 19:49:01 +02:00
|
|
|
|
2026-05-11 13:19:30 +02:00
|
|
|
Elixir/Phoenix umbrella — two web surfaces from one codebase.
|
2026-05-09 19:49:01 +02:00
|
|
|
|
|
|
|
|
## Apps
|
|
|
|
|
|
|
|
|
|
| App | URL | Audience |
|
|
|
|
|
|-----|-----|----------|
|
2026-05-11 13:19:30 +02:00
|
|
|
| `centralcloud_staff` | `ops.centralcloud.com` | Staff — ops cockpit, AI chat, on-call |
|
|
|
|
|
| `centralcloud_my` | `my.centralcloud.com` | Customers — dashboard, DR, billing, support |
|
2026-05-09 19:49:01 +02:00
|
|
|
| `centralcloud_core` | (library) | Shared: HostBill client, DR API client, OIDC |
|
|
|
|
|
|
2026-05-11 13:19:30 +02:00
|
|
|
> **Note:** `centralcloud_staff` is the thin UI layer. All business logic (incidents, pager,
|
|
|
|
|
> oncall engine, AI triage) lives in `../infra/apps/centralcloud_ops` (the backend engine).
|
|
|
|
|
|
2026-05-09 19:49:01 +02:00
|
|
|
`my.centralcloud.com` will also serve `www.centralcloud.com` (marketing pages) when DNS is repointed.
|
|
|
|
|
|
|
|
|
|
## Quick start
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-05-11 13:19:30 +02:00
|
|
|
# Enter dev shell (Elixir 1.20-rc.4 + OTP 28 via Nix)
|
|
|
|
|
nix develop
|
2026-05-09 19:49:01 +02:00
|
|
|
|
2026-05-11 13:19:30 +02:00
|
|
|
# Install deps (from umbrella root)
|
2026-05-09 19:49:01 +02:00
|
|
|
mix deps.get
|
|
|
|
|
|
2026-05-11 13:19:30 +02:00
|
|
|
# Run customer portal (port 4001)
|
|
|
|
|
cd apps/centralcloud_my && mix phx.server
|
2026-05-09 19:49:01 +02:00
|
|
|
|
2026-05-11 13:19:30 +02:00
|
|
|
# Run staff portal (port 4000)
|
|
|
|
|
cd apps/centralcloud_staff && mix phx.server
|
2026-05-09 19:49:01 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Required env vars
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
MY_SECRET_KEY_BASE=... # mix phx.gen.secret
|
|
|
|
|
OPS_SECRET_KEY_BASE=...
|
|
|
|
|
HOSTBILL_API_ID=... # from HostBill admin API keys
|
|
|
|
|
HOSTBILL_API_KEY=...
|
|
|
|
|
DR_PORTAL_URL=https://dr.centralcloud.com
|
|
|
|
|
DR_PORTAL_API_KEY=...
|
|
|
|
|
OIDC_CLIENT_ID=... # Authentik application client ID
|
|
|
|
|
OIDC_CLIENT_SECRET=...
|
2026-05-11 13:19:30 +02:00
|
|
|
ROUTER_AGENT_URL=http://router-agent.router-agent.svc:8642
|
|
|
|
|
ROUTER_AGENT_API_KEY=... # from OpenBao / k8s secret
|
2026-05-09 19:49:01 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Architecture
|
|
|
|
|
|
2026-05-11 13:19:30 +02:00
|
|
|
See `../AGENTS.md` for the full codebase map and how portal, engine, and agents relate.
|