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>
865 B
865 B
shared/forms/
Purpose
Form field wrappers, validators, and react-hook-form integration helpers shared across modules.
Legacy source (not moved)
components/ds/FormControls.tsx— FormField, Select, Checkbox, MoneyInput, Tabs- RHF + Zod patterns in accounting and beauty
(owner)/pages
Planned contents
FormField,FormSection,FormActions- RHF adapters for MoneyInput, DatePicker, entity comboboxes
- Shared Zod schema fragments (phone, money, tenant ID)
Allowed dependencies
shared/ui/shared/calendar/(date fields)shared/utils/(parseMoneyInput, formatMoney)- External:
react-hook-form,@hookform/resolvers,zod
Forbidden dependencies
- Module-specific entity pickers (stay in module until abstracted)
Status
📁 Scaffold only — no files migrated in Phase 1.