Move business logic out of App Router into module packages, add boundary validation scripts, and keep all routes as thin re-exports without changing URLs or API behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
834 B
Markdown
27 lines
834 B
Markdown
# `shared/hooks/`
|
|
|
|
## Purpose
|
|
|
|
Cross-module React hooks: session, tenant, theme, and platform utilities.
|
|
|
|
## Legacy source (not moved)
|
|
|
|
- `hooks/useMe.ts` — session / workspace
|
|
- `hooks/useTenantId.ts` — tenant scoping (67+ consumers)
|
|
- `hooks/useAuth.ts` — auth helpers
|
|
- `hooks/useTheme.ts` — white-label theme
|
|
- `hooks/useHeaderSession.ts`, `hooks/useTenantHost.ts`
|
|
|
|
Domain hooks **stay in modules** until migration:
|
|
|
|
- `hooks/useBeautyLookups.ts` → future `modules/beauty/hooks/`
|
|
- `hooks/useHealthcareLookups.ts`, `useHealthcarePatientContext.ts`, `useHealthcareDoctorContext.ts` → future `modules/healthcare/hooks/`
|
|
|
|
## Import rules
|
|
|
|
Shared hooks MUST NOT import domain API clients (`*-api.ts` for accounting/beauty/healthcare).
|
|
|
|
## Status
|
|
|
|
📁 Scaffold only — hooks remain in `hooks/`.
|