Update documentation to align terminology, clarify project stages, and improve consistency; add RECOMMENDATIONS.md for project-specific guidance.
This commit is contained in:
@@ -25,8 +25,8 @@
|
||||
```
|
||||
src/
|
||||
app/ # routes/layouts
|
||||
features/ # flows: onboarding, transactions, approvals, reports, billing
|
||||
entities/ # domain: tenant, user, transaction, rule, report, event
|
||||
features/ # flows: onboarding, records, approvals, reports, billing
|
||||
entities/ # domain: tenant, user, record, rule, report, event
|
||||
shared/ # ui kit, hooks, api client, utils
|
||||
widgets/ # composed UI blocks
|
||||
i18n/ # translations (if added)
|
||||
@@ -37,11 +37,11 @@ Principles: co-locate tests/types; avoid cross-feature coupling; keep shared min
|
||||
- Single typed HTTP client; attach auth tokens; handle 401/403 centrally.
|
||||
- Cache with React Query/SWR; use optimistic/paused states carefully for approvals and rule edits.
|
||||
- Prefer RSC for data loading; mark interactive leaf nodes with `"use client"`.
|
||||
- Pagination/filtering for transaction-heavy views; background refetch for webhook-driven updates.
|
||||
- Pagination/filtering for record-heavy views; background refetch for webhook-driven updates.
|
||||
|
||||
## 4. Payments & Billing UI
|
||||
- Backend initiates Stripe sessions/portal links; frontend renders statuses only.
|
||||
- After return from Stripe, fetch status from backend (webhook-driven source of truth); show success/fail/pending and recovery options.
|
||||
- Backend initiates payment-provider sessions/portal links; frontend renders statuses only.
|
||||
- After return from payment provider, fetch status from backend (webhook-driven source of truth); show success/fail/pending and recovery options.
|
||||
- Never collect raw card data; no custom card forms.
|
||||
|
||||
## 5. LLM & Explainability Surfacing
|
||||
@@ -54,5 +54,5 @@ Principles: co-locate tests/types; avoid cross-feature coupling; keep shared min
|
||||
|
||||
## 7. Testing
|
||||
- Unit: utility/helpers.
|
||||
- Component: critical UI (transactions list, approval drawer, rule editor, billing modal).
|
||||
- Component: critical UI (records list, approval drawer, rule editor, billing modal).
|
||||
- E2E: onboarding, ingestion health check, categorize + approve, billing change, report export.
|
||||
|
||||
Reference in New Issue
Block a user