# learning-unlimited/esp-website architecture

> Architecture diagram of the GitHub repository learning-unlimited/esp-website, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/learning-unlimited/esp-website
- Repository: https://github.com/learning-unlimited/esp-website

## Overview

ESP Website is a Django application for managing the logistics of short-term educational programs. Participants and administrators enter through web pages and program modules; the product’s domain areas include program/class data, registration, scheduling, resources, accounting, surveys, and communications. The graph highlights central models and sampled controllers alongside documented product scope. Some subsystem links rely on SOURCE INDEX references rather than inspected call sites, so those links are limited to relationships the index supports.

Main entry points: [`esp/esp/program/models/__init__.py`](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/models/__init__.py) (Program data), [`esp/esp/web/views/main.py`](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/web/views/main.py) (Web entry), [`esp/esp/themes/controllers.py`](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/themes/controllers.py) (Theme management), [`esp/esp/program/controllers/autoscheduler/controller.py`](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/controllers/autoscheduler/controller.py) (Auto scheduling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webentry["Web entry<br/>[main.py]"]
  node_useraccounts[("User accounts<br/>[__init__.py]")]
  node_themes["Theme management<br/>[controllers.py]"]
  node_fileuploads["File storage<br/>[storage.py]"]
end

subgraph group_program["Program operations"]
  node_modules["Program modules<br/>[base.py]"]
  node_programdata[("Program data<br/>[__init__.py]")]
  node_programapp[("Applications<br/>[app_.py]")]
  node_classes[("Classes and sections<br/>[class_.py]")]
  node_autoscheduler["Auto scheduling<br/>[controller.py]"]
end

subgraph group_domain["Domain services"]
  node_resources[("Resource management<br/>[models.py]")]
  node_accounting["Accounting<br/>[controllers.py]"]
  node_accountrecords[("Financial records<br/>[models.py]")]
  node_surveys[("Surveys<br/>[models.py]")]
  node_calendar[("Calendar events<br/>[models.py]")]
end

subgraph group_shared["Shared capabilities"]
  node_email[("Email messaging<br/>[models.py]")]
  node_customforms["Custom forms<br/>[linkfields.py]"]
  node_tags[("Program tags<br/>[models.py]")]
end

node_visitor(("Participants and staff"))

node_visitor -->|"visits"| node_webentry
node_webentry -->|"looks up"| node_useraccounts
node_webentry -->|"resolves programs"| node_programdata
node_webentry -->|"routes program pages"| node_modules
node_programdata -->|"references"| node_programapp
node_programdata -->|"references"| node_classes
node_programdata -->|"references"| node_useraccounts
node_programdata -->|"references"| node_calendar
node_programdata -->|"references"| node_customforms
node_programdata -->|"references"| node_resources
node_programdata -->|"references"| node_surveys
node_programdata -->|"references"| node_email
node_programdata -->|"references"| node_tags
node_programdata -->|"uses accounting"| node_accounting
node_autoscheduler -->|"loads program classes"| node_programdata
node_autoscheduler -->|"loads resource criteria"| node_resources
node_accounting -->|"updates records"| node_accountrecords
node_themes -->|"sets theme tags"| node_tags
node_themes -.->|"supports site rendering"| node_webentry

click node_webentry "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/web/views/main.py"
click node_useraccounts "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/users/models/__init__.py"
click node_modules "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/modules/base.py"
click node_programdata "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/models/__init__.py"
click node_programapp "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/models/app_.py"
click node_classes "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/models/class_.py"
click node_autoscheduler "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/controllers/autoscheduler/controller.py"
click node_resources "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/resources/models.py"
click node_accounting "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/accounting/controllers.py"
click node_accountrecords "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/accounting/models.py"
click node_surveys "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/survey/models.py"
click node_calendar "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/cal/models.py"
click node_email "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/dbmail/models.py"
click node_customforms "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/customforms/linkfields.py"
click node_tags "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/tagdict/models.py"
click node_themes "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/themes/controllers.py"
click node_fileuploads "https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/web/storage.py"

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_webentry,node_useraccounts,node_themes,node_fileuploads toneBlue
class node_modules,node_programdata,node_programapp,node_classes,node_autoscheduler toneAmber
class node_resources,node_accounting,node_accountrecords,node_surveys,node_calendar toneMint
class node_email,node_customforms,node_tags toneRose
class node_visitor toneIndigo
```

## Components

### Web experience

- [Web entry](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/web/views/main.py): `esp/esp/web/views/main.py`
- [User accounts](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/users/models/__init__.py): `esp/esp/users/models/__init__.py`
- [Theme management](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/themes/controllers.py): `esp/esp/themes/controllers.py`
- [File storage](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/web/storage.py): `esp/esp/web/storage.py`

### Program operations

- [Program modules](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/modules/base.py): `esp/esp/program/modules/base.py`
- [Program data](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/models/__init__.py): `esp/esp/program/models/__init__.py`
- [Applications](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/models/app_.py): `esp/esp/program/models/app_.py`
- [Classes and sections](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/models/class_.py): `esp/esp/program/models/class_.py`
- [Auto scheduling](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/program/controllers/autoscheduler/controller.py): `esp/esp/program/controllers/autoscheduler/controller.py`

### Domain services

- [Resource management](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/resources/models.py): `esp/esp/resources/models.py`
- [Accounting](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/accounting/controllers.py): `esp/esp/accounting/controllers.py`
- [Financial records](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/accounting/models.py): `esp/esp/accounting/models.py`
- [Surveys](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/survey/models.py): `esp/esp/survey/models.py`
- [Calendar events](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/cal/models.py): `esp/esp/cal/models.py`

### Shared capabilities

- [Email messaging](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/dbmail/models.py): `esp/esp/dbmail/models.py`
- [Custom forms](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/customforms/linkfields.py): `esp/esp/customforms/linkfields.py`
- [Program tags](https://github.com/learning-unlimited/esp-website/blob/main/esp/esp/tagdict/models.py): `esp/esp/tagdict/models.py`

### Other components

- **Participants and staff**

## Connections

- Participants and staff → Web entry: visits (evidence: `esp/esp/web/views/main.py`)
- Web entry → User accounts: looks up (evidence: `esp/esp/web/views/main.py`)
- Web entry → Program data: resolves programs (evidence: `esp/esp/web/views/main.py`)
- Web entry → Program modules: routes program pages (evidence: `esp/esp/web/views/main.py`)
- Program data → Applications: references (evidence: `esp/esp/program/models/__init__.py`)
- Program data → Classes and sections: references (evidence: `esp/esp/program/models/__init__.py`)
- Program data → User accounts: references (evidence: `esp/esp/program/models/__init__.py`)
- Program data → Calendar events: references (evidence: `esp/esp/program/models/__init__.py`)
- Program data → Custom forms: references (evidence: `esp/esp/program/models/__init__.py`)
- Program data → Resource management: references (evidence: `esp/esp/program/models/__init__.py`)
- Program data → Surveys: references (evidence: `esp/esp/program/models/__init__.py`)
- Program data → Email messaging: references (evidence: `esp/esp/program/models/__init__.py`)
- Program data → Program tags: references (evidence: `esp/esp/program/models/__init__.py`)
- Program data → Accounting: uses accounting (evidence: `esp/esp/program/models/__init__.py`)
- Auto scheduling → Program data: loads program classes (evidence: `esp/esp/program/controllers/autoscheduler/controller.py`)
- Auto scheduling → Resource management: loads resource criteria (evidence: `esp/esp/program/controllers/autoscheduler/controller.py`)
- Accounting → Financial records: updates records (evidence: `esp/esp/accounting/controllers.py`)
- Theme management → Program tags: sets theme tags (evidence: `esp/esp/themes/controllers.py`)
- Theme management → Web entry: supports site rendering
