TorbatYar/frontend/shared/hooks/README.md
Mortezakoohjani 6f4a484051 Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture.
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>
2026-07-26 22:28:27 +03:30

834 B

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/.