website refactor

This commit is contained in:
2026-01-12 19:24:59 +01:00
parent 1f0c4f7fa6
commit 5ea95eaf51
54 changed files with 2894 additions and 2342 deletions

View File

@@ -16,6 +16,7 @@ It renders truth from the API and forwards user intent to the API.
## 2) Read flow
### Server Components (RSC)
```text
RSC page.tsx
@@ -25,19 +26,30 @@ API client (infra)
API Transport DTO
Page DTO
Presenter (client)
ViewModel (optional)
Presenter (client)
ViewData Builder (lib/builders/view-data/)
ViewData
Template
```
### Client Components
```text
Client Component
API client (useEffect)
API Transport DTO
ViewModel Builder (lib/builders/view-models/)
ViewModel (lib/view-models/)
Client State (useState)
Template
```
## 3) Write flow
All writes enter through **Server Actions**.
@@ -60,6 +72,8 @@ RSC reload
1. Templates accept ViewData only.
2. Page Queries do not format.
3. Presenters do not call the API.
4. Client state is UI-only.
3. ViewData Builders transform API DTO → ViewData (RSC).
4. ViewModel Builders transform API DTO → ViewModel (Client).
5. Builders do not call the API.
6. Client state is UI-only.