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:
+36
-13
@@ -1,24 +1,47 @@
|
||||
{
|
||||
"nav": {
|
||||
"home": "Home",
|
||||
"login": "Login"
|
||||
"bookings": "Bookings",
|
||||
"patients": "Patients",
|
||||
"wallet": "Wallet",
|
||||
"profile": "Profile",
|
||||
"dashboard": "Dashboard",
|
||||
"verification": "Verification",
|
||||
"visits": "Visits",
|
||||
"admin": "Admin",
|
||||
"overview": "Overview",
|
||||
"users": "Users",
|
||||
"notifications": "Notifications",
|
||||
"login": "Login",
|
||||
"logout": "Logout"
|
||||
},
|
||||
"common": {
|
||||
"dark_mode": "Dark mode",
|
||||
"light_mode": "Light mode",
|
||||
"direction_ltr": "Switch to LTR",
|
||||
"direction_rtl": "Switch to RTL"
|
||||
"direction_rtl": "Switch to RTL",
|
||||
"coming_soon": "Coming soon",
|
||||
"loading": "Loading…",
|
||||
"retry": "Retry",
|
||||
"add": "Add",
|
||||
"cancel": "Cancel",
|
||||
"currency_toman": "Toman"
|
||||
},
|
||||
"toastDemo": {
|
||||
"title": "Toast Notifications Demo",
|
||||
"subtitle": "Click a button to trigger each toast type",
|
||||
"success_btn": "Success",
|
||||
"error_btn": "Error",
|
||||
"warning_btn": "Warning",
|
||||
"info_btn": "Info",
|
||||
"success_msg": "Profile saved successfully!",
|
||||
"error_msg": "Failed to load data. Please try again.",
|
||||
"warning_msg": "Your session will expire in 5 minutes.",
|
||||
"info_msg": "A new version of the app is available."
|
||||
"shell": {
|
||||
"customer_app": "Family app",
|
||||
"nurse_app": "Nurse view",
|
||||
"admin_console": "Admin console",
|
||||
"placeholder_body": "This area will be built in a later phase."
|
||||
},
|
||||
"patients": {
|
||||
"title": "Patients",
|
||||
"subtitle": "A reference screen wired to the services/{domain} + React Query pattern (mocked data).",
|
||||
"add": "Add patient",
|
||||
"empty": "No patients yet. Add your first patient.",
|
||||
"name_label": "Full name",
|
||||
"gender_label": "Gender",
|
||||
"gender_male": "Male",
|
||||
"gender_female": "Female",
|
||||
"added": "Patient added"
|
||||
}
|
||||
}
|
||||
|
||||
+36
-13
@@ -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": "بیمار اضافه شد"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user