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> |
||
|---|---|---|
| .. | ||
| README.md | ||
shared/hooks/
Purpose
Cross-module React hooks: session, tenant, theme, and platform utilities.
Legacy source (not moved)
hooks/useMe.ts— session / workspacehooks/useTenantId.ts— tenant scoping (67+ consumers)hooks/useAuth.ts— auth helpershooks/useTheme.ts— white-label themehooks/useHeaderSession.ts,hooks/useTenantHost.ts
Domain hooks stay in modules until migration:
hooks/useBeautyLookups.ts→ futuremodules/beauty/hooks/hooks/useHealthcareLookups.ts,useHealthcarePatientContext.ts,useHealthcareDoctorContext.ts→ futuremodules/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/.