Nexus¶
Go Connect server (platform/nexus). It owns the Postgres data model for
gateways, organizations and relays, and sits between the portal, the gateway
agent, the realtime Worker, the relay daemons, authz and Zitadel.
One HTTP/1.1 listener (PORT, else NEXUS_LISTEN_ADDR; :4001 in local dev)
carries every service, GET /healthz and CORS.
- Connect surface — services per caller, authentication, authorization, configuration.
- Realtime integration — pushes to connected gateways and the DO's calls back.
- Database — the tables nexus owns and how migrations run.
- Relay fleet — relay records, allocation, draining, reaping.
Packages¶
| Package | Role |
|---|---|
internal/app |
Wiring: stores, interceptors, service mounts, housekeeping loop |
internal/gwconnect |
Handlers for gateway.v1 and portal.v1, the interceptors, and the authorization gates |
internal/relayconnect |
Handlers for relay.v1 |
internal/relay |
Relay allocation, failover, peers/routes, reaping |
internal/authz |
Wrapper over authz/pkg/authzclient; role and action constants; RoleSeeds() |
internal/gwconfig |
Config model and the partner segment filters |
internal/store/pgstore |
Bun stores and the embedded SQL migrations |
internal/push |
RealtimePushService client |
internal/gwcert, internal/gwdns |
ACME certificates and Cloudflare DNS for gateway and relay names |
internal/zitadel |
Management API client (user lookup, invite, search) |
internal/mrwifi |
Client for the Monsieur Wifi claim flow used by PortalSessionService.Enroll |