# unicef/iogt architecture

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

- Interactive diagram: https://gitdiagram.com/unicef/iogt
- Repository: https://github.com/unicef/iogt

## Overview

IoGT is a Django/Wagtail content platform for publishing localized pages and interactive questionnaires, with user accounts, comments, offline access, search, and optional integrations. A typical visitor browses published content or submits a questionnaire; editors manage the site through Wagtail. The graph includes the documented capability branches, but source excerpts are partial, so only evidenced relationships are solid; documented or unverified links are dashed.

Main entry points: [`iogt/views.py`](https://github.com/unicef/iogt/blob/develop/iogt/views.py) (IoGT Web App), [`home/models.py`](https://github.com/unicef/iogt/blob/develop/home/models.py) (Site Content), [`questionnaires/models.py`](https://github.com/unicef/iogt/blob/develop/questionnaires/models.py) (Questionnaires), [`iogt_content_migration/management/commands/load_v1_db.py`](https://github.com/unicef/iogt/blob/develop/iogt_content_migration/management/commands/load_v1_db.py) (V1 Content Import)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_publishing["Publishing"]
  node_sitecontent[("Site Content<br/>[models.py]")]
  node_pageblocks["Page Blocks<br/>[blocks.py]"]
  node_pagebehaviors["Page Behaviors<br/>[mixins.py]"]
  node_progress["Reading Progress"]
  node_translations["Localized Strings"]
end

subgraph group_engagement["Engagement"]
  node_questionnaires[("Questionnaires<br/>[models.py]")]
  node_skiplogic["Skip Logic<br/>[utils.py]"]
  node_questionblocks["Question Blocks<br/>[blocks.py]"]
  node_interactive["Interactive Shortcodes<br/>[services.py]"]
  node_shortcodeparser["Shortcode Parser<br/>[shortcode.py]"]
  node_comments[("Comments<br/>[models.py]")]
  node_chatbot["Chatbot Messaging<br/>[rapidpro_client.py]"]
end

subgraph group_platform["Platform Services"]
  node_iogt["IoGT Web App<br/>[views.py]"]
  node_users[("User Accounts<br/>[models.py]")]
  node_adminlogin["Azure Login<br/>[azure_backend.py]"]
  node_search["Site Search<br/>[views.py]"]
  node_offline["Offline Access<br/>[views.py]"]
  node_settings["Project Settings<br/>[base.py]"]
end

subgraph group_operations["Operations"]
  node_migration["V1 Content Import<br/>[load_v1_db.py]"]
end

node_visitor(("Visitor"))
node_editor(("Site Editor"))
node_rapidpro["RapidPro"]
node_database[("Relational Database")]
node_wagtail["Wagtail Admin"]

node_visitor -.->|"browses"| node_iogt
node_editor -.->|"edits content"| node_wagtail
node_iogt -.->|"loads pages"| node_sitecontent
node_sitecontent -->|"uses blocks"| node_pageblocks
node_sitecontent -->|"uses mixins"| node_pagebehaviors
node_sitecontent -->|"calculates progress"| node_progress
node_iogt -->|"serves surveys"| node_questionnaires
node_questionnaires -->|"paginates questions"| node_skiplogic
node_skiplogic -->|"evaluates blocks"| node_questionblocks
node_questionnaires -.->|"stores submissions"| node_database
node_sitecontent -->|"allows comments"| node_comments
node_iogt -.->|"uses accounts"| node_users
node_settings -->|"configures backend"| node_adminlogin
node_iogt -.->|"provides search"| node_search
node_iogt -.->|"supports offline pages"| node_offline
node_interactive -->|"registers shortcodes"| node_shortcodeparser
node_chatbot -.->|"connects optionally"| node_rapidpro
node_migration -->|"imports pages"| node_sitecontent
node_migration -->|"imports surveys"| node_questionnaires
node_iogt -.->|"uses localized text"| node_translations
node_sitecontent -.->|"persists content"| node_database

click node_iogt "https://github.com/unicef/iogt/blob/develop/iogt/views.py"
click node_sitecontent "https://github.com/unicef/iogt/blob/develop/home/models.py"
click node_pageblocks "https://github.com/unicef/iogt/blob/develop/home/blocks.py"
click node_pagebehaviors "https://github.com/unicef/iogt/blob/develop/home/mixins.py"
click node_progress "https://github.com/unicef/iogt/blob/develop/home/utils/progress_manager.py"
click node_translations "https://github.com/unicef/iogt/blob/develop/home/translatable_strings.py"
click node_questionnaires "https://github.com/unicef/iogt/blob/develop/questionnaires/models.py"
click node_skiplogic "https://github.com/unicef/iogt/blob/develop/questionnaires/utils.py"
click node_questionblocks "https://github.com/unicef/iogt/blob/develop/questionnaires/blocks.py"
click node_interactive "https://github.com/unicef/iogt/blob/develop/interactive/services.py"
click node_shortcodeparser "https://github.com/unicef/iogt/blob/develop/interactive/shortcode.py"
click node_comments "https://github.com/unicef/iogt/blob/develop/comments/models.py"
click node_users "https://github.com/unicef/iogt/blob/develop/iogt_users/models.py"
click node_adminlogin "https://github.com/unicef/iogt/blob/develop/admin_login/azure_backend.py"
click node_search "https://github.com/unicef/iogt/blob/develop/search/views.py"
click node_offline "https://github.com/unicef/iogt/blob/develop/iogt/views.py"
click node_settings "https://github.com/unicef/iogt/blob/develop/iogt/settings/base.py"
click node_migration "https://github.com/unicef/iogt/blob/develop/iogt_content_migration/management/commands/load_v1_db.py"
click node_chatbot "https://github.com/unicef/iogt/blob/develop/messaging/rapidpro_client.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_sitecontent,node_pageblocks,node_pagebehaviors,node_progress,node_translations toneBlue
class node_questionnaires,node_skiplogic,node_questionblocks,node_interactive,node_shortcodeparser,node_comments,node_chatbot,node_database toneAmber
class node_iogt,node_users,node_adminlogin,node_search,node_offline,node_settings,node_rapidpro toneMint
class node_migration toneRose
class node_visitor,node_editor,node_wagtail toneIndigo
```

## Components

### Publishing

- [Site Content](https://github.com/unicef/iogt/blob/develop/home/models.py): `home/models.py`
- [Page Blocks](https://github.com/unicef/iogt/blob/develop/home/blocks.py): `home/blocks.py`
- [Page Behaviors](https://github.com/unicef/iogt/blob/develop/home/mixins.py): `home/mixins.py`
- [Reading Progress](https://github.com/unicef/iogt/blob/develop/home/utils/progress_manager.py): `home/utils/progress_manager.py`
- [Localized Strings](https://github.com/unicef/iogt/blob/develop/home/translatable_strings.py): `home/translatable_strings.py`

### Engagement

- [Questionnaires](https://github.com/unicef/iogt/blob/develop/questionnaires/models.py): `questionnaires/models.py`
- [Skip Logic](https://github.com/unicef/iogt/blob/develop/questionnaires/utils.py): `questionnaires/utils.py`
- [Question Blocks](https://github.com/unicef/iogt/blob/develop/questionnaires/blocks.py): `questionnaires/blocks.py`
- [Interactive Shortcodes](https://github.com/unicef/iogt/blob/develop/interactive/services.py): `interactive/services.py`
- [Shortcode Parser](https://github.com/unicef/iogt/blob/develop/interactive/shortcode.py): `interactive/shortcode.py`
- [Comments](https://github.com/unicef/iogt/blob/develop/comments/models.py): `comments/models.py`
- [Chatbot Messaging](https://github.com/unicef/iogt/blob/develop/messaging/rapidpro_client.py): `messaging/rapidpro_client.py`

### Platform Services

- [IoGT Web App](https://github.com/unicef/iogt/blob/develop/iogt/views.py): `iogt/views.py`
- [User Accounts](https://github.com/unicef/iogt/blob/develop/iogt_users/models.py): `iogt_users/models.py`
- [Azure Login](https://github.com/unicef/iogt/blob/develop/admin_login/azure_backend.py): `admin_login/azure_backend.py`
- [Site Search](https://github.com/unicef/iogt/blob/develop/search/views.py): `search/views.py`
- [Offline Access](https://github.com/unicef/iogt/blob/develop/iogt/views.py): `iogt/views.py`
- [Project Settings](https://github.com/unicef/iogt/blob/develop/iogt/settings/base.py): `iogt/settings/base.py`

### Operations

- [V1 Content Import](https://github.com/unicef/iogt/blob/develop/iogt_content_migration/management/commands/load_v1_db.py): `iogt_content_migration/management/commands/load_v1_db.py`

### Other components

- **Visitor**
- **Site Editor**
- **RapidPro**
- **Relational Database**
- **Wagtail Admin**

## Connections

- Visitor → IoGT Web App: browses
- Site Editor → Wagtail Admin: edits content
- IoGT Web App → Site Content: loads pages (evidence: `iogt/views.py`)
- Site Content → Page Blocks: uses blocks (evidence: `home/models.py`)
- Site Content → Page Behaviors: uses mixins (evidence: `home/models.py`)
- Site Content → Reading Progress: calculates progress (evidence: `home/models.py`)
- IoGT Web App → Questionnaires: serves surveys (evidence: `iogt/views.py`)
- Questionnaires → Skip Logic: paginates questions (evidence: `questionnaires/models.py`)
- Skip Logic → Question Blocks: evaluates blocks (evidence: `questionnaires/utils.py`)
- Questionnaires → Relational Database: stores submissions
- Site Content → Comments: allows comments (evidence: `comments/models.py`)
- IoGT Web App → User Accounts: uses accounts
- Project Settings → Azure Login: configures backend (evidence: `iogt/settings/base.py`)
- IoGT Web App → Site Search: provides search
- IoGT Web App → Offline Access: supports offline pages (evidence: `iogt/views.py`)
- Interactive Shortcodes → Shortcode Parser: registers shortcodes (evidence: `interactive/services.py`)
- Chatbot Messaging → RapidPro: connects optionally
- V1 Content Import → Site Content: imports pages (evidence: `iogt_content_migration/management/commands/load_v1_db.py`)
- V1 Content Import → Questionnaires: imports surveys (evidence: `iogt_content_migration/management/commands/load_v1_db.py`)
- IoGT Web App → Localized Strings: uses localized text
- Site Content → Relational Database: persists content
