TorbatYar/frontend/shared/layouts/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

1.1 KiB

shared/layouts/

Purpose

Application chrome: portal shells, sidebars, public site layouts, page headers, auth gates composition.

Legacy source (not moved)

  • components/accounting/AccountingShell.tsx
  • components/beauty/BeautyPortalShell.tsx, PublicBeautyLayout.tsx, createPortalLayout.tsx
  • components/healthcare/HealthcarePortalShell.tsx, PublicHealthcareLayout.tsx, createPortalLayout.tsx
  • components/admin/AdminShell.tsx
  • components/ds/Page.tsx — PageHeader, EmptyState, LoadingState, ErrorState
  • components/AuthGuard.tsx, SiteHeader.tsx

Planned contents (Phase 2)

  • PortalShell — parameterized sidebar/nav shell
  • createPortalLayout() — single factory for all modules
  • PublicSiteLayout — marketing/booking site wrapper
  • ModuleGate — tenant + onboarding gate

Allowed dependencies

  • shared/ui/, shared/hooks/, shared/providers/
  • shared/constants/ (nav types only — nav data stays per module)

Forbidden dependencies

  • Module page bodies, module API clients

Status

📁 Scaffold only — no files migrated in Phase 1.