TorbatYar/frontend/modules/beauty
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
..
calendar Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
charts Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
components Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
constants Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
design-system Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
features/owner Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
forms Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
hooks Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
pages Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
services Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
tables Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
types Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
utils Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
index.ts Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30
README.md Migrate Beauty, Healthcare, and Accounting frontend to modular src/modules architecture. 2026-07-26 22:28:27 +03:30

TorbatYar Beauty Business Module

Status: Migrated (first business module in modules/)
Route prefix: /beauty (unchanged — routes stay in app/beauty/)

Structure

modules/beauty/
├── components/          # Portal shells, layouts (BeautyPortalShell, createPortalLayout, …)
├── pages/               # Portal page bundles (customer, owner, admin, public, …)
├── features/owner/      # Owner CRUD screens (organizations, customers, catalog, …)
├── design-system/       # BeautyStatusChip, BeautyCards, BeautyTablePage, tokens
├── hooks/               # useBeautyLookups
├── services/            # beauty-business-api.ts
├── constants/           # portals.ts (nav config)
├── types/               # Re-exported API types
├── forms/               # (reserved — owner forms live in features/owner for now)
├── tables/              # (reserved — BeautyTablePage in design-system/)
├── calendar/            # (reserved)
├── charts/              # (reserved)
└── utils/               # (reserved)

Import convention

import { beautyBusinessApi } from "@/modules/beauty/services/beauty-business-api";
import { CustomerDashboard } from "@/modules/beauty/pages/customer";
import { createPortalLayout } from "@/modules/beauty/components/createPortalLayout";
import { useBeautyLookups } from "@/modules/beauty/hooks/useBeautyLookups";

Legacy shims (deprecated):

  • @/lib/beauty-business-api
  • @/lib/beauty-portals
  • @/hooks/useBeautyLookups

Boundaries

  • Must not import @/modules/healthcare/*, @/modules/accounting/*, or legacy healthcare/accounting components.
  • May import @/components/ds, @/hooks/useMe, @/hooks/useTenantId, @/lib/auth, @/lib/utils.