5.8 KiB
Mizan Roadmap
v1 — Django + Multi-Framework (React, Vue, Svelte)
Done
@clientdecorator —context=,affects=,auth=,websocket=,private=,route=,methods=,rev=,cache=ReactContextclass — type-safe context/affects references with linting- Named contexts — functions sharing a context name grouped into one provider and one fetch
- Context bundling endpoint —
GET /api/mizan/ctx/<name>/returns all functions in one response - Server-driven invalidation (JSON body) — mutation responses carry
{"result": ..., "invalidate": [...]} X-Mizan-Invalidateheader — second invalidation transport for view-path responses (redirects, HTML)- Return-type branching — data return → RPC path;
HttpResponsereturn → view path - Scoped invalidation —
affects_paramslambda; runtime supports{context, params}form - Auth guards —
auth=True,auth='staff',auth='superuser',auth=callable - JWT + session auth — auto-detected, CSRF handled
- MWT — Mizan Web Token for Edge cache keying (separate secret from JWT/cache)
- Shapes — Pydantic + django-readers for typed query projections
- WebSocket channels — real-time bidirectional communication
- HMAC cache keying — origin-side cache with cross-language HMAC conformance (Python + TypeScript pin)
- Edge manifest —
python manage.py export_edge_manifest; both RPC and view-path functions; deterministic (sorted) output - SSR bridge — Django template backend → persistent Bun subprocess via JSON-RPC; the worker resolves components by file path (
import(file)+renderToString) mizan-basekernel — framework-agnostic imperative client primitives (data/status/error owned by kernel)- Rust codegen —
protocol/mizan-codegen, a Rust binary reading KDL IR and emitting per-target clients (react, vue, svelte, channels, stage1, python, rust), each byte-parity-tested.mizan-generateis the thin npm launcher. - React wrapper layer — codegen emits the
MizanContextroot provider,useMizanescape hatch, anduseMutation-backed hooks exposing{ mutate, isPending, error } - Additional backend adapters —
mizan-ts(TypeScript),mizan-rust-axum(Rust/Axum with three-way parity),mizan-tauri - Frontend transports —
mizan-tauri-transport,mizan-webview-transport,mizan-webview-channels
Next
- Vue / Svelte runtime packages —
frontends/mizan-vueandfrontends/mizan-svelteare unimplemented stubs. The codegen emits their clients (byte-parity-tested), but a kernel-adapter runtime package and a live-backend example are owed for each. - Svelte 5 runes — the Svelte target emits Svelte 4
readablestores; migrate to$state/$derived. - Forms codegen target — emit form clients wired to
mizanCallfrom the kernel; retire the hand-writtenmizan-react/src/forms.tsand its dependence on the pre-kernel provider. - Desktop example onto the generated provider — migrate
examples/django-react-desktop-appoff the pre-kernelMizanProvider(mizan-react/src/context.tsx) so it can be retired. - Cache hardening — purge atomicity, per-param sub-index cleanup, thundering-herd protection, RedisCache coverage (see
backends/mizan-django/src/mizan/cache/KNOWN_ISSUES.md). - Package READMEs —
mizan-base,mizan-codegen, and the other packages missing one (seeISSUES.md).
Core Consolidation — Rust Binary
Move all core functionality unrelated to language introspection into the Rust binary. Other languages invoke it through FFI (PyO3 and equivalents) rather than carrying their own copy — centralizing behavior for the whole Mizan toolchain.
Language-specific core code then exists only for actual framework mechanics — registering client functions, binding Shapes to an ORM — never for behavior the binary already owns.
SSR in the binary. Because SSR works directly from the IR's typed schemas, the binary can drive it rather than forcing each backend adapter to author SSR by hand. That also lets the binary own SSR validation, keeping it consistent across adapters instead of each backend deriving it manually and drifting apart.
Mizan Cloud (closed-source)
Mizan Edge
Cloudflare Workers for automatic edge caching.
- Reads the edge manifest to configure cache rules
- Context GETs cached at edge, keyed by context name + params
- Reads
X-Mizan-Invalidateheader from mutation responses to purge caches - Reads JSON
invalidatekey from RPC responses for the same purpose - Resolves URL patterns from manifest to purge view pages
- Zero configuration — the manifest IS the cache policy
Mizan Render
SSR at the edge via Cloudflare Workers.
- The Bun SSR bridge, running on Cloudflare instead of colocated with Django
- Context data fetched from Django (or edge cache), rendered at the edge
- HTML response streamed to the user from the nearest PoP
Mizan Deploy
One-command deployment for Django + React apps.
- Container orchestration (AWS/Azure)
- Edge + Render auto-configured
mizan deployfrom the CLI- The Vercel experience for Django
Reference
Wire protocol shapes (context fetch, mutation call, invalidation transports) are documented in CLAUDE.md. Architectural details for specific subsystems live in docs/:
docs/AFI_ARCHITECTURE.md— package architecture, kernel model, adapter strategydocs/CACHE_KEYING.md— HMAC cache key derivationdocs/MWT_SPEC.md— Mizan Web Token formatdocs/SSR_ARCHITECTURE.md— Django template backend, Bun bridgedocs/PSR_VS_EDGE.md— protocol-level rendering vs. paid Edge layerdocs/PRODUCT_ARCHITECTURE.md— product surface and pricing tiers