# dfe-digital/register-early-career-teachers-public architecture

> Architecture diagram of the GitHub repository dfe-digital/register-early-career-teachers-public, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dfe-digital/register-early-career-teachers-public
- Repository: https://github.com/dfe-digital/register-early-career-teachers-public

## Overview

This is the Register Early Career Teachers service: schools register and manage early career teachers (ECTs) and mentors, while appropriate bodies record induction activity; administrators oversee records and funding, and lead providers integrate through an API. The graph groups those user-facing domains around the Rails request entry point and shared domain records. Sampled code confirms route dispatch, session handling and an admin induction-period controller’s teacher lookup; most feature wiring is inferred only at subsystem level from the tree, so uncertain service-to-service links are omitted.

Main entry points: [`config/routes.rb`](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/config/routes.rb) (Rails routes), [`app/controllers/api/v3`](https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/api/v3) (Version 3 endpoints), [`app/controllers/admin/induction_periods_controller.rb`](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/admin/induction_periods_controller.rb) (Induction period edits), [`app/controllers/schools`](https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/schools) (School registrations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_routes["Rails routes<br/>[routes.rb]"]
  node_sessions["Sign-in sessions"]
  node_session_manager["Session manager<br/>[manager.rb]"]
end

subgraph group_school["School workflows"]
  node_school_workflows["School registrations"]
  node_school_teachers["ECT and mentor management"]
end

subgraph group_ab["Appropriate bodies"]
  node_ab_workflows["Induction workflows"]
  node_ab_tasks["Review and claim tasks"]
  node_batch_processing["Batch processing"]
end

subgraph group_admin["Administration"]
  node_admin_teachers["Teacher administration"]
  node_admin_schools["School administration"]
  node_admin_finance["Finance and statements"]
  node_admin_induction["Induction period edits"]
end

subgraph group_api["Provider API"]
  node_api_controllers["Version 3 endpoints"]
  node_api_services["API operations"]
  node_serializers["API serializers"]
end

subgraph group_domain["Shared domain"]
  node_teacher[("Teacher records<br/>[teacher.rb]")]
  node_induction[("Induction periods")]
  node_partnerships[("School partnerships")]
  node_declarations[("Declarations and statements<br/>[declaration.rb]")]
end

node_school_actor(("School users"))
node_ab_actor(("Appropriate body users"))
node_admin_actor(("Administrators"))
node_provider_actor(("API clients"))

node_routes -->|"routes sign-in"| node_sessions
node_sessions -->|"manages session"| node_session_manager
node_routes -->|"draws school routes"| node_school_workflows
node_routes -->|"draws AB routes"| node_ab_workflows
node_routes -->|"draws admin routes"| node_admin_teachers
node_routes -->|"draws API routes"| node_api_controllers
node_school_actor -->|"submits registrations"| node_school_workflows
node_school_actor -->|"manages teachers"| node_school_teachers
node_ab_actor -->|"records induction"| node_ab_workflows
node_ab_actor -->|"reviews tasks"| node_ab_tasks
node_ab_workflows -.->|"queues processing"| node_batch_processing
node_admin_actor -->|"manages records"| node_admin_teachers
node_admin_actor -->|"manages schools"| node_admin_schools
node_admin_actor -->|"reviews payments"| node_admin_finance
node_admin_actor -->|"edits periods"| node_admin_induction
node_admin_induction -->|"loads teacher"| node_teacher
node_admin_induction -->|"loads period"| node_induction
node_provider_actor -->|"calls API"| node_api_controllers
node_api_controllers -->|"delegates operations"| node_api_services
node_api_controllers -->|"formats responses"| node_serializers
node_school_teachers -->|"manages records"| node_teacher
node_school_workflows -->|"manages partnerships"| node_partnerships
node_admin_finance -->|"reviews declarations"| node_declarations

click node_routes "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/config/routes.rb"
click node_sessions "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/sessions_controller.rb"
click node_session_manager "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/services/sessions/manager.rb"
click node_school_workflows "https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/schools"
click node_school_teachers "https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/schools"
click node_ab_workflows "https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/appropriate_bodies"
click node_ab_tasks "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/appropriate_bodies/tasks_controller.rb"
click node_batch_processing "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/jobs/appropriate_bodies/process_batch_job.rb"
click node_admin_teachers "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/admin/teachers_controller.rb"
click node_admin_schools "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/admin/schools_controller.rb"
click node_admin_finance "https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/admin/finance"
click node_admin_induction "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/admin/induction_periods_controller.rb"
click node_api_controllers "https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/api/v3"
click node_api_services "https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/services/api"
click node_serializers "https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/serializers/api"
click node_teacher "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/models/teacher.rb"
click node_induction "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/models/induction_period.rb"
click node_partnerships "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/models/school_partnership.rb"
click node_declarations "https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/models/declaration.rb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_routes,node_sessions,node_session_manager,node_school_actor,node_ab_actor,node_provider_actor toneBlue
class node_school_workflows,node_school_teachers toneAmber
class node_ab_workflows,node_ab_tasks,node_batch_processing toneMint
class node_admin_teachers,node_admin_schools,node_admin_finance,node_admin_induction toneRose
class node_api_controllers,node_api_services,node_serializers,node_admin_actor toneIndigo
class node_teacher,node_induction,node_partnerships,node_declarations toneTeal
```

## Components

### Application entry

- [Rails routes](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/config/routes.rb): `config/routes.rb`
- [Sign-in sessions](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/sessions_controller.rb): `app/controllers/sessions_controller.rb`
- [Session manager](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/services/sessions/manager.rb): `app/services/sessions/manager.rb`

### School workflows

- [School registrations](https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/schools): `app/controllers/schools`
- [ECT and mentor management](https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/schools): `app/controllers/schools`

### Appropriate bodies

- [Induction workflows](https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/appropriate_bodies): `app/controllers/appropriate_bodies`
- [Review and claim tasks](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/appropriate_bodies/tasks_controller.rb): `app/controllers/appropriate_bodies/tasks_controller.rb`
- [Batch processing](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/jobs/appropriate_bodies/process_batch_job.rb): `app/jobs/appropriate_bodies/process_batch_job.rb`

### Administration

- [Teacher administration](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/admin/teachers_controller.rb): `app/controllers/admin/teachers_controller.rb`
- [School administration](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/admin/schools_controller.rb): `app/controllers/admin/schools_controller.rb`
- [Finance and statements](https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/admin/finance): `app/controllers/admin/finance`
- [Induction period edits](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/controllers/admin/induction_periods_controller.rb): `app/controllers/admin/induction_periods_controller.rb`

### Provider API

- [Version 3 endpoints](https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/controllers/api/v3): `app/controllers/api/v3`
- [API operations](https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/services/api): `app/services/api`
- [API serializers](https://github.com/dfe-digital/register-early-career-teachers-public/tree/main/app/serializers/api): `app/serializers/api`

### Shared domain

- [Teacher records](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/models/teacher.rb): `app/models/teacher.rb`
- [Induction periods](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/models/induction_period.rb): `app/models/induction_period.rb`
- [School partnerships](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/models/school_partnership.rb): `app/models/school_partnership.rb`
- [Declarations and statements](https://github.com/dfe-digital/register-early-career-teachers-public/blob/main/app/models/declaration.rb): `app/models/declaration.rb`

### Other components

- **School users**
- **Appropriate body users**
- **Administrators**
- **API clients**

## Connections

- Rails routes → Sign-in sessions: routes sign-in
- Sign-in sessions → Session manager: manages session
- Rails routes → School registrations: draws school routes
- Rails routes → Induction workflows: draws AB routes
- Rails routes → Teacher administration: draws admin routes
- Rails routes → Version 3 endpoints: draws API routes
- School users → School registrations: submits registrations
- School users → ECT and mentor management: manages teachers
- Appropriate body users → Induction workflows: records induction
- Appropriate body users → Review and claim tasks: reviews tasks
- Induction workflows → Batch processing: queues processing
- Administrators → Teacher administration: manages records
- Administrators → School administration: manages schools
- Administrators → Finance and statements: reviews payments
- Administrators → Induction period edits: edits periods
- Induction period edits → Teacher records: loads teacher
- Induction period edits → Induction periods: loads period
- API clients → Version 3 endpoints: calls API
- Version 3 endpoints → API operations: delegates operations
- Version 3 endpoints → API serializers: formats responses
- ECT and mentor management → Teacher records: manages records
- School registrations → School partnerships: manages partnerships
- Finance and statements → Declarations and statements: reviews declarations
