System Overview
Lattice runs on Cloudflare’s edge infrastructure. A single Gateway Worker handles all routing. D1 (SQLite at the edge) is the source of truth. KV provides a read cache with 5-minute TTL. The system fits within Cloudflare’s $5/month paid tier.
┌─────────────┐ │ Gateway │ <- Routes by entity ID │ Worker │ Hono-based, all endpoints └──────┬──────┘ │ ┌────────────┼────────────┐ │ │ ┌─────┴─────┐ ┌──────┴──────┐ │ D1 │ │ KV │ │ (SQLite) │ │ (cache) │ │ │ │ TTL: 300s │ │ entities │ └─────────────┘ │ telos_* │ │ events │ │ policies │ └───────────┘Bindings
Section titled “Bindings”From wrangler.toml:
| Binding | Type | Name |
|---|---|---|
DB | D1 Database | lattice-db |
CACHE | KV Namespace | Read cache |
ENVIRONMENT | Variable | "development" |
Dependencies
Section titled “Dependencies”From package.json:
hono^4.7.0 — HTTP frameworknanoid^5.0.0 — ID generationwrangler^4.0.0 — Cloudflare dev/deploy tooling@cloudflare/workers-types— TypeScript types for Workers runtime