Case Study
Access Control Platform
Cloud-managed physical access control with offline-first site orchestrators and hardware reconciliation.
A commissioned access-control platform that manages card credentials, doors, and access levels across remote sites from a centralized cloud control plane. An on-premise Go orchestrator owns each site's state in SQLite and keeps the physical controllers enforcing access even when the cloud link is down; the cloud holds only a projected read model.
0
Inbound Ports At The Site
2
Transports: Durable + Live
SQLite
Site Source Of Truth
On-Prem
Enforcement Survives WAN Loss
Overview
Why access control needs an orchestrator.
Physical access control has an unforgiving constraint: the doors must keep working when the network does not. This platform manages people, credentials, doors, and access levels for vendor access controllers — embedded boards speaking a proprietary binary TCP protocol — across remote sites, from a single cloud dashboard.
The architecture follows the constraint. Each site runs a Go orchestrator that owns its state in SQLite and talks to the controllers directly on the LAN. The cloud is a control plane: a Hono API and SvelteKit dashboard over a PostgreSQL read model that is explicitly a projection, never the source of truth. Commands flow down through NATS JetStream over WireGuard; state flows back up through events and compressed batch sync.
Architecture
The system shape behind the product.
Three runtime surfaces with strict ownership boundaries: a Hono REST API and SvelteKit 5 dashboard in the cloud over a projected PostgreSQL read model, and a Go site orchestrator on-premise owning SQLite state, board connections, and sync. Protobuf contracts define the command and event shapes shared across the boundary, and workspace dependency rules keep the site runtime importable without any cloud code.
Cloud UI
Cloud UI
SvelteKit 5 dashboard with SSR auth guard
People, doors, credentials, access levels, events
Session cookie forwarded on server-side fetches
Cloud API
Cloud API
Hono REST API with JWT + RBAC middleware
Command dispatch: durable publish or live request
Batch and NATS projectors feeding the read model
Transport
Transport
NATS JetStream: durable per-site command streams
Core NATS request/reply for live door commands
MinIO inbox/outbox: JSONL+zstd entity batches
Network Boundary
Network Boundary
WireGuard tunnel per site, outbound-only
NATS and MinIO bound to the VPN interface
No inbound ports at any site
Site Orchestrator
Site Orchestrator
Go binary with SQLite source of truth
Command executor with policy compilation
Reconcile loop on startup and board reconnect
Hardware
Hardware
Vendor access controllers on the site LAN
Proprietary binary TCP protocol adapter
Card-swipe event streaming back through NATS
Next Step
Ask about the implementation
The code is private because it runs a client's physical security, but the architecture is worth a conversation: durable command dispatch, offline-first site state, and hardware reconciliation.