Skip to content

Domain Placement Rules

Goal

Keep feature ownership clear and avoid duplicate pages across roles.

Rule

  • Put pages in domains/shared/pages/* when multiple roles use the same workflow.
  • Keep role folders (domains/admin, domains/hod, etc.) only for role-unique experiences.

Current Decisions

  • Users management moved to shared (domains/shared/pages/users/*).
  • System pages moved to shared (domains/shared/pages/system/*).
  • Admin dashboard remains role-specific (domains/admin/pages/dashboard/*).
  • Shared feature pages use folder-per-page structure:
    • users/list/index.tsx, users/detail/index.tsx, users/create/index.tsx
    • maintenance/list/index.tsx, maintenance/detail/index.tsx, maintenance/create/index.tsx
  • Each shared page owns its local skeleton (.../list/skeleton.tsx, etc.) to keep loading UI permission-aware and page-specific.

Why

This reduces duplication, keeps permission logic centralized, and makes future migration to query-based state easier.