Cleaned dead code and updated documents
This commit is contained in:
65
ROADMAP.md
65
ROADMAP.md
@@ -4,47 +4,38 @@
|
||||
|
||||
### Done
|
||||
|
||||
- **`@client` decorator** — `context=`, `affects=`, `auth=`, `websocket=`, `private=`, `route=`, `methods=`, `rev=`, `cache=`
|
||||
- **`ReactContext` class** — 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-Invalidate` header** — second invalidation transport for view-path responses (redirects, HTML)
|
||||
- **Return-type branching** — data return → RPC path; `HttpResponse` return → view path
|
||||
- **Scoped invalidation** — `affects_params` lambda; 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
|
||||
- **SSR bridge** — Django template backend → persistent Bun subprocess via JSON-RPC
|
||||
- **`mizan-base` kernel** — framework-agnostic imperative client primitives (data/status/error owned by kernel)
|
||||
- **Two-stage codegen** — Stage 1 emits framework-agnostic protocol layer; Stage 2 emits per-framework hooks (React, Vue, Svelte)
|
||||
- **`mizan-ts`** — TypeScript backend adapter; proves the protocol is language-agnostic
|
||||
- [x] **`@client` decorator** — `context=`, `affects=`, `auth=`, `websocket=`, `private=`, `route=`, `methods=`, `rev=`, `cache=`
|
||||
- [x] **`ReactContext` class** — type-safe context/affects references with linting
|
||||
- [x] **Named contexts** — functions sharing a context name grouped into one provider and one fetch
|
||||
- [x] **Context bundling endpoint** — `GET /api/mizan/ctx/<name>/` returns all functions in one response
|
||||
- [x] **Server-driven invalidation (JSON body)** — mutation responses carry `{"result": ..., "invalidate": [...]}`
|
||||
- [x] **`X-Mizan-Invalidate` header** — second invalidation transport for view-path responses (redirects, HTML)
|
||||
- [x] **Return-type branching** — data return → RPC path; `HttpResponse` return → view path
|
||||
- [x] **Scoped invalidation** — `affects_params` lambda; runtime supports `{context, params}` form
|
||||
- [x] **Auth guards** — `auth=True`, `auth='staff'`, `auth='superuser'`, `auth=callable`
|
||||
- [x] **JWT + session auth** — auto-detected, CSRF handled
|
||||
- [x] **MWT** — Mizan Web Token for Edge cache keying (separate secret from JWT/cache)
|
||||
- [x] **Shapes** — Pydantic + django-readers for typed query projections
|
||||
- [x] **WebSocket channels** — real-time bidirectional communication
|
||||
- [x] **HMAC cache keying** — origin-side cache with cross-language HMAC conformance (Python + TypeScript pin)
|
||||
- [x] **Edge manifest** — `python manage.py export_edge_manifest`; both RPC and view-path functions; deterministic (sorted) output
|
||||
- [x] **SSR bridge** — Django template backend → persistent Bun subprocess via JSON-RPC; the worker resolves components by file path (`import(file)` + `renderToString`)
|
||||
- [x] **`mizan-base` kernel** — framework-agnostic imperative client primitives (data/status/error owned by kernel)
|
||||
- [x] **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-generate` is the thin npm launcher.
|
||||
- [x] **React wrapper layer** — codegen emits the `MizanContext` root provider, `useMizan` escape hatch, and `useMutation`-backed hooks exposing `{ mutate, isPending, error }`
|
||||
- [x] **Additional backend adapters** — `mizan-ts` (TypeScript), `mizan-rust-axum` (Rust/Axum with three-way parity), `mizan-tauri`
|
||||
- [x] **Frontend transports** — `mizan-tauri-transport`, `mizan-webview-transport`, `mizan-webview-channels`
|
||||
|
||||
---
|
||||
|
||||
### Next (in progress)
|
||||
### Next
|
||||
|
||||
- **React adapter wrapper layer** — codegen emits `MizanContext` provider, `useMizan` hook, `DjangoError` class on top of the `mizan-base` kernel. Equivalent wrapper layers for Vue and Svelte adapters. The harness in `examples/django-react-site` is blocked on this.
|
||||
- **Legacy `MizanProvider` removal (A1)** — `mizan-react/src/context.tsx` (~750 lines) replaced by codegen-emitted wrappers. Blocks v1 `mizan-react` publishing.
|
||||
- **Forms migration to kernel (A3)** — `mizan-react/src/forms.ts` (~1163 lines) currently consumes legacy `MizanProvider`. Rewrite to use `mizanCall` from the kernel. Blocks A1.
|
||||
- **Allauth extraction (A2)** — `legacy/allauth/` becomes `mizan-django-allauth` package consuming Mizan's public API.
|
||||
- **Vue/Svelte e2e validation (A4)** — example apps exercising a live backend end-to-end, like `examples/django-react-site` does for React.
|
||||
- **Test coverage gaps** — T1–T12 in `ISSUES.md` (kernel state machine, view-path purge, SSR thread safety, retry logic, cross-language HMAC pin, etc.)
|
||||
|
||||
---
|
||||
|
||||
### Quality
|
||||
|
||||
- **H5** — Mutation hooks expose no loading/error state
|
||||
- **H7** — Redis SCAN blocks request path at scale
|
||||
- **H8** — Svelte codegen uses Svelte 4 stores; should use Svelte 5 runes
|
||||
- **H9** — Svelte `destroy()` not auto-called (memory leak)
|
||||
- **H12** — Forms `triggerValidation` captures stale data
|
||||
- Medium issues (M1–M18) per developer judgment
|
||||
- [ ] **Vue / Svelte runtime packages** — `frontends/mizan-vue` and `frontends/mizan-svelte` are 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 `readable` stores; migrate to `$state`/`$derived`.
|
||||
- [ ] **Forms codegen target** — emit form clients wired to `mizanCall` from the kernel; retire the hand-written `mizan-react/src/forms.ts` and its dependence on the pre-kernel provider.
|
||||
- [ ] **Desktop example onto the generated provider** — migrate `examples/django-react-desktop-app` off the pre-kernel `MizanProvider` (`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 (see `ISSUES.md`).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user