# Phase 3: Institutional Structure

## Completed

- Institution aggregate with opaque public ID, contact details, timezone, currency,
  lifecycle status, and restricted administration.
- Tenant-owned campuses, study centres, faculties, departments, programmes, academic
  levels, academic sessions, and semesters.
- Generic domain registry and transactional save action for consistent CRUD behavior.
- Relationship-aware Form Request validation that rejects foreign-tenant parents.
- Policy authorization and tenant-scoped record binding.
- Searchable, paginated, responsive administration screens.
- Exclusive main-campus and current-session/current-semester state handling.
- Soft archival and restrictive database relationships.
- Repeatable theological-university demonstration seeder.

## Database relationships

```text
Institution
├── Users
├── Campuses
│   ├── Study Centres
│   └── Faculties
│       └── Departments
│           └── Programmes
├── Academic Levels
└── Academic Sessions
    └── Semesters
```

Every child also carries `institution_id`. Parent selectors, validation queries,
authorization policies, list queries, and custom route binding all enforce the same
tenant boundary.

## Demo data

- 1 theological university
- 2 campuses and 1 online study centre
- 3 faculties and 6 departments
- 10 theological programmes
- 7 academic levels
- 3 academic sessions with 2 semesters each
- development-only super-administrator and institution-administrator accounts

## Phase boundary

Granular roles, permissions, user activation/suspension, registration control, and
login audit belong to Phase 4 and are not claimed complete here.

## Local environment note

XAMPP's CLI PHP currently has the `intl` extension disabled. This does not affect the
Phase 3 application or migrations, but Laravel's optional `artisan db:show --counts`
formatting command requires it. Enable `extension=intl` in the active PHP configuration
before using that diagnostic command.
