diff --git a/CLAUDE.md b/CLAUDE.md index 8db5c549..edd8f63e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -59,9 +59,14 @@ how it gets built. Concretely: `downloads/`, `youtube/` (shared by routes + scheduler + worker) → flat core (`auth`, `quota`, `sysconfig`, `state`, `audit`, `notifications`, `userscope`, `realtime`, `ratelimit`, `progress`, `security`) → `models/db/config`. **Dependency direction is one-way: core never imports routes.** -Frontend: `main.tsx` provider tree → `App.tsx` shell → `moduleRegistry` route-chunks → components; data -via react-query (`qk` factory), per-account `localStorage`, and server prefs; API through `lib/api/*` -slices over `core.req`. +Frontend: `main.tsx` provider tree → `App.tsx` shell → `moduleRegistry` route-chunks → module +components → the **platform layer `components/ui/`** (domain-free primitives: the popover engine and +its menus, `Modal`/`Overlay`, `Button`/`form`, `DataTable`/`VirtualGrid`, `QueryState`, …). That +boundary is one-way and **lint-enforced**, not just described: a platform component may not import a +feature component or a domain API slice (`no-restricted-imports` in `eslint.config.js`, with its own +test). A new generic component goes in `ui/`; see [`frontend/src/components/ui/README.md`](frontend/src/components/ui/README.md). +Data via react-query (`qk` factory), per-account `localStorage`, and server prefs; API through +`lib/api/*` slices over `core.req`. **Not wanted** (reviewed and rejected as over-engineering for this size): microservices, event bus, CQRS, a repository/DI framework, a router library, a generic CRUD-router factory or base serializer. @@ -82,6 +87,9 @@ CQRS, a repository/DI framework, a router library, a generic CRUD-router factory | Job status word | the `downloads/status.py` StrEnum | loose `"canceled"`/`"cancelled"` literals | | Current time | inline `datetime.now(timezone.utc)` | new `now_utc`/`_now` helpers | | FE per-account state | `usePref` | raw `readAccount`/`writeAccount` or bespoke hooks | +| FE action button | `ui/Button` — pick a `SIZES` rung | a hand-rolled `