Docs carry the shape of the system, not its status
MIZAN.md's phase-numbered implementation order, PRODUCT_ARCHITECTURE's "Deferred until Render revenue funds it" and "Shipped in", PSR_VS_EDGE's current-state section, and the READMEs' passing-test counts were all reporting where the work stood rather than what the system is. OWED_SURFACE keeps its subject — surface that is specified but unbuilt — stated as the shape each unit owes. The channel sections follow the renamed slots: Params / ClientMessage / ServerMessage, and Channel as the base class on both backends. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,60 +1,59 @@
|
||||
# Product Architecture
|
||||
|
||||
*Revised April 2026.*
|
||||
Mizan's surface splits into a free framework and two paid products.
|
||||
The split is drawn along one line: what runs on the developer's own
|
||||
infrastructure versus what Mizan operates for them.
|
||||
|
||||
## Launch product: Mizan Render
|
||||
## Mizan Render — paid
|
||||
|
||||
**$20/seat/month.**
|
||||
|
||||
Protocol-aware Edge caching + PSR delivery via Cloudflare + render
|
||||
Workers + TS backend hosting via Workers for Platforms.
|
||||
|
||||
Developer's stack = their backend + database. Cloudflare handles
|
||||
read traffic, rendering, and caching.
|
||||
The developer's stack is their backend + database. Cloudflare handles
|
||||
read traffic, rendering, and caching. The compliance surface is
|
||||
entirely Cloudflare Workers plus a management API (Django/Postgres):
|
||||
|
||||
## Deferred: Mizan Deploy
|
||||
- GDPR DPA + privacy policy + subprocessor list — ~$500–1K legal
|
||||
- DMCA — $6
|
||||
- No NIS2, no gVisor, no KMS
|
||||
|
||||
Django hosting requires IaaS compliance: gVisor, KMS, NIS2,
|
||||
multi-state privacy. ~$5–8K legal costs.
|
||||
## Mizan Deploy — paid, IaaS-shaped
|
||||
|
||||
**Deferred until Render revenue funds it.**
|
||||
Django hosting is a different product because it is a different
|
||||
compliance surface: gVisor, KMS, NIS2, multi-state privacy, ~$5–8K
|
||||
legal. Hosting a customer's Python process is IaaS; serving cached
|
||||
HTML from a CDN is not.
|
||||
|
||||
TS "Deploy" exists via Workers for Platforms at no additional
|
||||
compliance cost.
|
||||
TS "Deploy" is the Workers-for-Platforms case, which carries no
|
||||
additional compliance cost — it falls inside Render's surface rather
|
||||
than Deploy's.
|
||||
|
||||
## Free framework: origin-side cache (`mizan.cache`)
|
||||
## Origin-side cache (`mizan.cache`) — free
|
||||
|
||||
Shipped in `mizan_core.cache` (re-exported as `mizan.cache` from the
|
||||
Django adapter) implementing the **full cache protocol locally** —
|
||||
same HMAC key derivation and purge semantics as Edge.
|
||||
`mizan_core.cache` (re-exported as `mizan.cache` from the Django
|
||||
adapter) implements the **full cache protocol locally** — the same
|
||||
HMAC key derivation and purge semantics as Edge.
|
||||
|
||||
Two backends behind a `CacheBackend` protocol:
|
||||
|
||||
- `MemoryCache` — in-memory dict (testing)
|
||||
- `RedisCache` — production
|
||||
|
||||
### Dual purpose
|
||||
This carries two consequences: the free framework is complete on its
|
||||
own (PSR + typed hooks + invalidation + caching at zero cost), and
|
||||
every cache mechanic is unit-testable without Cloudflare in the loop.
|
||||
|
||||
1. Makes the free framework genuinely powerful (PSR + typed hooks +
|
||||
invalidation + caching with zero cost).
|
||||
2. Provides a unit-testable surface for all cache mechanics without
|
||||
Cloudflare.
|
||||
|
||||
## Spec additions
|
||||
## Spec surface
|
||||
|
||||
- `@client(cache=False)` — uncacheable; emits `Cache-Control: no-store`.
|
||||
- Cache ABI (`mizan.cache`): `cache_get(secret, backend, context, params)`,
|
||||
`cache_put(...)`, `cache_purge(backend, context, params=…, secret=…)`.
|
||||
|
||||
## Launch compliance (Render only)
|
||||
|
||||
Entirely Cloudflare Workers + management API (Django/Postgres):
|
||||
|
||||
- GDPR DPA + privacy policy + subprocessor list — ~$500–1K legal
|
||||
- DMCA — $6
|
||||
- No NIS2, no gVisor, no KMS
|
||||
|
||||
## Invariant
|
||||
|
||||
All architecture decisions target the Render-only launch posture.
|
||||
Don't build Deploy infrastructure prematurely.
|
||||
The paid surface is Cloudflare-shaped and the free surface depends on
|
||||
nothing Cloudflare provides. The origin cache implements the protocol
|
||||
in full locally, so Edge is an accelerator over a complete framework,
|
||||
never a missing piece of one.
|
||||
|
||||
Reference in New Issue
Block a user