frontend phase 0: app shells, design system & data/contract patterns

Turn the starter into the Balinyaar foundation for the three actor
experiences and lock in the patterns later phases copy.

- Cleanup: remove toastDemo namespace, placeholder home page, and the two
  dead icons; fix BottomBar to use usePathname (locale-aware active tab).
- Three actor shells under (private-routes), no layout above [locale]:
  customer (customer) group with the 5-tab bottom nav; nurse (/nurse) and
  admin (/admin) on the shared sidebar engine. Role model via constants/roles
  + useActorRole (defaults to customer until roles land in f1-b2).
- services/{domain} reference (patients) with a mock behind a config seam,
  hierarchical query keys, deliberate staleTime, and mutation invalidation;
  shared ApiEnvelope/Paginated wire types + unwrap() in lib/api/types.
- Money (integer-safe IRR/Toman) + Shamsi-date utils; toEnglishDigits helper.
- Shared composites, each tested: OtpInput, PhoneNumberField, StepperHeader,
  StatusChip, PlaceholderScreen.
- i18n: seed nav/common/shell/patients in both locales; document namespace
  conventions. Update client/CLAUDE.md Project Structure + fix ColorSchemeScript
  doc drift. Add phase report, STATUS, and REQ-001 (envelope/casing/pagination).

Gate: npm run check + test:ci green (72 tests); build green with NEXT_PUBLIC_API_URL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
hamid
2026-07-02 01:19:21 +03:30
parent 2f2aec61a2
commit 94fdcbe0d1
65 changed files with 1632 additions and 227 deletions
+36 -13
View File
@@ -1,24 +1,47 @@
{
"nav": {
"home": "خانه",
"login": "ورود"
"bookings": "رزروها",
"patients": "بیماران",
"wallet": "کیف‌پول",
"profile": "پروفایل",
"dashboard": "داشبورد",
"verification": "احراز هویت",
"visits": "ویزیت‌ها",
"admin": "مدیریت",
"overview": "نمای کلی",
"users": "کاربران",
"notifications": "اعلان‌ها",
"login": "ورود",
"logout": "خروج"
},
"common": {
"dark_mode": "حالت تاریک",
"light_mode": "حالت روشن",
"direction_ltr": "تغییر به چپ‌به‌راست",
"direction_rtl": "تغییر به راست‌به‌چپ"
"direction_rtl": "تغییر به راست‌به‌چپ",
"coming_soon": "به‌زودی",
"loading": "در حال بارگذاری…",
"retry": "تلاش مجدد",
"add": "افزودن",
"cancel": "انصراف",
"currency_toman": "تومان"
},
"toastDemo": {
"title": "نمایش اعلان‌های Toast",
"subtitle": "روی هر دکمه کلیک کنید تا نوع مربوطه نمایش داده شود",
"success_btn": "موفقیت",
"error_btn": "خطا",
"warning_btn": "هشدار",
"info_btn": "اطلاعات",
"success_msg": "پروفایل با موفقیت ذخیره شد!",
"error_msg": "بارگذاری اطلاعات ناموفق بود. لطفاً دوباره تلاش کنید.",
"warning_msg": "جلسه شما تا ۵ دقیقه دیگر منقضی می‌شود.",
"info_msg": "نسخه جدیدی از برنامه در دسترس است."
"shell": {
"customer_app": "اپلیکیشن خانواده",
"nurse_app": "نمای پرستار",
"admin_console": "کنسول مدیریت",
"placeholder_body": "این بخش در فازهای بعدی تکمیل می‌شود."
},
"patients": {
"title": "بیماران",
"subtitle": "یک صفحهٔ مرجع که به الگوی services/{domain} و React Query متصل است (داده‌های آزمایشی).",
"add": "افزودن بیمار",
"empty": "هنوز بیماری ثبت نشده است. اولین بیمار را اضافه کنید.",
"name_label": "نام کامل",
"gender_label": "جنسیت",
"gender_male": "مرد",
"gender_female": "زن",
"added": "بیمار اضافه شد"
}
}