Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

04 — Information Architecture (Organizations Module)

Module IA within the global shell (00-shared/05). The module owns two surfaces: the tenant self surface (Org Admin, /organization) and the platform surface (Super Admin, /admin/tenants). Routes are (planned) — the client repo does not exist; they follow go_router conventions from 00-shared/11 §6.


1. Navigation placement

SurfaceDestinationShell slotVisible to
Organization/organization (Settings group, 00-shared/05 §2)Drawer/rail: "Settings" section, above "Users & Roles"Org Admin + custom roles with any organization.*/settings.* perm
Tenants (platform)/admin/tenantsDrawer/rail: "Platform" sectionisPlatformAdmin only
  • Both surfaces hidden and unroutable for everyone else (00-shared/05 §1).
  • Tenants surface lives under a separate "Platform" group so tenant admins never see it.

2. Screen hierarchy (self surface)

/organization ──────────────── Org Overview (tab shell)
 ├── /organization/edit ────── Org Edit (full-screen form, >3 fields → page not sheet)
 ├── /organization/branding ── Branding (page w/ live preview)
 ├── /organization/settings ── Settings tabs (TabBar: General | Attendance | Academic | Grading | Notification | Theme)
 │                              └─ each tab = inline form (≤3-5 fields) — save per tab or one global save (see §5)
 ├── /organization/feature-flags ── Feature flags list (switch rows grouped by module)
 └── /organization/members ──── Invite admin (form + members list) — cross-module (users + rbac)
      └─ /organization/delete ──── (dialog, not route)

3. Screen hierarchy (platform surface)

/admin/tenants ─────────────── Tenants list (master)
 ├── /admin/tenants/:id ────── Tenant detail (master-detail right pane on ≥840 dp; push on phone)
 │    ├── edit → /admin/tenants/:id/edit (reuses Org Edit screen, id from route)
 │    ├── settings / branding / feature-flags (reuse self screens with :id)
 │    └── delete (typed-confirm dialog)
 └── /admin/tenants/new ────── Tenant create (wizard-lite: single full-screen form)

4. Modal hierarchy (per 00-shared/05 §5)

LevelUsed forWidget
Snackbarsave success, toggle rollback, purge scheduledAppSnackbar
Bottom sheettimezone picker (searchable list), currency picker, color presetsAppBottomSheet
Dialogunsaved-changes guard, delete confirm, status change confirm (suspend/activate), registration-slug handoffAppDialog
Full-screenOrg Edit, Branding, Invite admin, Tenant createPage routes
Loaderonly global submit waits; screens prefer skeletonsAppProgress

Destructive rules (00-shared/05 §5): organization.delete needs typed confirm (type the org name); suspend needs a plain confirm dialog with consequence copy.

5. Screen relationships

  • Overview → Edit → back to Overview (refresh). Overview → Branding → back (refresh).
  • Overview → Settings tabs: each tab fetches the same org doc (GET :id/settings); one global "Save all" submits the merged full settings object (full-replace — organizations.service.ts:134).
  • Overview → Feature flags: fetches GET :id/feature-flags (map) merged with standalone GET /feature-flags (catalog: labels/descriptions/module).
  • Master-detail on tablet/desktop for /admin/tenants (00-shared/05 §3); push-on-top on phone; breadcrumbs on desktop at depth ≥2 (00-shared/05 §3).
RouteScreenGuard
/organizationOrg Overviewauthed + any organization.*/settings.*
/organization/editOrg Editorganization.update
/organization/brandingBrandingorganization.update
/organization/settingsSettings tabsorganization.settings.update or settings.*
/organization/feature-flagsFeature flagsfeature-flags.read + feature-flags.update
/organization/membersInvite adminuser.create + rbac.member.create
/admin/tenantsTenants listisPlatformAdmin
/admin/tenants/newTenant createisPlatformAdmin
/admin/tenants/:id (+ /edit)Tenant detail/editisPlatformAdmin

Deep links:

  • studylyon://organization/settings — admin push to a setting ((forward-looking) push; route itself real).
  • studylyon://admin/tenants/:id — support link to a tenant ((forward-looking)).

7. Nested nav & state survival

  • Settings tabs use StatefulShellBranch/TabBarView keep-alive (00-shared/03 AppTabs) so switching tabs preserves unsaved edits; switching bottom-nav destinations preserves tab state (00-shared/05 §3).
  • Feature-flags grouping by module field (feature-flag.schema.ts:21-22) with collapsible sections (AnimatedSize, 00-shared/08 §4).

8. Quick actions, FABs, context menus

ScreenFABQuick actionContext menu (rows)
Tenants list— (list is platform; row actions suffice)Ctrl+K search already global; N new tenant (desktop, 00-shared/05 §7)View · Edit · Suspend · Delete
Tenant detailEdit (top bar)
Org OverviewEdit profile (top bar action)
Members"Invite admin"Remove member · Change role
Feature flagsDelete flag (standalone collection)
  • No FAB on self-surface overview (editing is toolbar-driven); the single FAB in this module is the optional "Invite admin" on members (AppFAB with heroTag unique per screen, 00-shared/03 §D).

9. Global search integration

  • Tenants list: q filters name/slug regex case-insensitive (organizations.service.ts:78-83), debounced 300 ms (AppSearchBar).
  • Platform admins can reach a tenant via global search only if the search backend indexes organizations (planned).