# techlib/celus architecture

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

- Interactive diagram: https://gitdiagram.com/techlib/celus
- Repository: https://github.com/techlib/celus

## Overview

CELUS is a consortium-oriented web application for harvesting and visualizing electronic-resource usage statistics. Its principal workflow is to schedule and fetch SUSHI reports, import them into access-log data, and expose the resulting statistics for dashboards and reporting. The repository also contains organization/publication management, knowledgebase integration, analytics, exports, annotations, and event notifications. Source excerpts establish parts of the import and task flow; other connections are shown as unverified where only the tree or subsystem names support them.

Main entry points: [`apps/logs/models.py`](https://github.com/techlib/celus/blob/master/apps/logs/models.py) (Access-log data), [`apps/sushi/models.py`](https://github.com/techlib/celus/blob/master/apps/sushi/models.py) (SUSHI fetching), [`design/ui/src/pages/Main.vue`](https://github.com/techlib/celus/blob/master/design/ui/src/pages/Main.vue) (CELUS interface), [`apps/sushi/tasks.py`](https://github.com/techlib/celus/blob/master/apps/sushi/tasks.py) (Harvest tasks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_ui["CELUS interface<br/>[Main.vue]"]
  node_api["Application API<br/>[views.py]"]
end

subgraph group_harvesting["Harvest and import"]
  node_scheduler["Harvest scheduler<br/>[models.py]"]
  node_sushi["SUSHI fetching<br/>[models.py]"]
  node_harvest_tasks["Harvest tasks<br/>[tasks.py]"]
  node_import_tasks["Import processing<br/>[tasks.py]"]
  node_logs[("Access-log data<br/>[models.py]")]
end

subgraph group_domain["Consortium data"]
  node_organizations[("Organizations<br/>[models.py]")]
  node_publications[("Platforms and titles<br/>[models.py]")]
  node_knowledgebase[("Knowledgebase<br/>[models.py]")]
  node_tags[("Tags and lists<br/>[models.py]")]
end

subgraph group_insights["Analytics and delivery"]
  node_reporting["Reporting engine<br/>[computation.py]"]
  node_charts["Charts<br/>[views.py]"]
  node_exports["Data exports<br/>[models.py]"]
  node_annotations[("Annotations<br/>[models.py]")]
  node_events[("Events and alerts<br/>[models.py]")]
end

node_user(("Consortium user"))
node_celery["Background task queue"]
node_sushi_service(("SUSHI provider"))

node_user -->|"uses"| node_ui
node_ui -.->|"requests"| node_api
node_scheduler -->|"processes intentions"| node_sushi
node_sushi -->|"fetches reports"| node_sushi_service
node_scheduler -.->|"queues work"| node_harvest_tasks
node_harvest_tasks -->|"runs harvest logic"| node_sushi
node_harvest_tasks -->|"runs asynchronously"| node_celery
node_import_tasks -->|"imports records"| node_logs
node_import_tasks -->|"runs asynchronously"| node_celery
node_sushi -.->|"creates access logs"| node_logs
node_logs -->|"associates usage"| node_organizations
node_logs -->|"associates usage"| node_publications
node_knowledgebase -->|"updates platform data"| node_publications
node_reporting -.->|"queries usage"| node_logs
node_charts -.->|"visualizes usage"| node_logs
node_exports -->|"exports reports"| node_logs
node_exports -->|"uses tag filters"| node_tags
node_annotations -.->|"appears in interface"| node_ui
node_events -->|"sends notifications"| node_celery
node_events -->|"publishes updates"| node_ui

click node_ui "https://github.com/techlib/celus/blob/master/design/ui/src/pages/Main.vue"
click node_api "https://github.com/techlib/celus/blob/master/apps/api/views.py"
click node_scheduler "https://github.com/techlib/celus/blob/master/apps/scheduler/models.py"
click node_sushi "https://github.com/techlib/celus/blob/master/apps/sushi/models.py"
click node_harvest_tasks "https://github.com/techlib/celus/blob/master/apps/sushi/tasks.py"
click node_import_tasks "https://github.com/techlib/celus/blob/master/apps/logs/tasks.py"
click node_logs "https://github.com/techlib/celus/blob/master/apps/logs/models.py"
click node_organizations "https://github.com/techlib/celus/blob/master/apps/organizations/models.py"
click node_publications "https://github.com/techlib/celus/blob/master/apps/publications/models.py"
click node_knowledgebase "https://github.com/techlib/celus/blob/master/apps/knowledgebase/models.py"
click node_tags "https://github.com/techlib/celus/blob/master/apps/tags/models.py"
click node_reporting "https://github.com/techlib/celus/blob/master/apps/reporting/logic/computation.py"
click node_charts "https://github.com/techlib/celus/blob/master/apps/charts/views.py"
click node_exports "https://github.com/techlib/celus/blob/master/apps/export/models.py"
click node_annotations "https://github.com/techlib/celus/blob/master/apps/annotations/models.py"
click node_events "https://github.com/techlib/celus/blob/master/apps/events/models.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_ui,node_api,node_user toneBlue
class node_scheduler,node_sushi,node_harvest_tasks,node_import_tasks,node_logs toneAmber
class node_organizations,node_publications,node_knowledgebase,node_tags toneMint
class node_reporting,node_charts,node_exports,node_annotations,node_events,node_celery toneRose
class node_sushi_service toneIndigo
```

## Components

### Web client

- [CELUS interface](https://github.com/techlib/celus/blob/master/design/ui/src/pages/Main.vue): `design/ui/src/pages/Main.vue`
- [Application API](https://github.com/techlib/celus/blob/master/apps/api/views.py): `apps/api/views.py`

### Harvest and import

- [Harvest scheduler](https://github.com/techlib/celus/blob/master/apps/scheduler/models.py): `apps/scheduler/models.py`
- [SUSHI fetching](https://github.com/techlib/celus/blob/master/apps/sushi/models.py): `apps/sushi/models.py`
- [Harvest tasks](https://github.com/techlib/celus/blob/master/apps/sushi/tasks.py): `apps/sushi/tasks.py`
- [Import processing](https://github.com/techlib/celus/blob/master/apps/logs/tasks.py): `apps/logs/tasks.py`
- [Access-log data](https://github.com/techlib/celus/blob/master/apps/logs/models.py): `apps/logs/models.py`

### Consortium data

- [Organizations](https://github.com/techlib/celus/blob/master/apps/organizations/models.py): `apps/organizations/models.py`
- [Platforms and titles](https://github.com/techlib/celus/blob/master/apps/publications/models.py): `apps/publications/models.py`
- [Knowledgebase](https://github.com/techlib/celus/blob/master/apps/knowledgebase/models.py): `apps/knowledgebase/models.py`
- [Tags and lists](https://github.com/techlib/celus/blob/master/apps/tags/models.py): `apps/tags/models.py`

### Analytics and delivery

- [Reporting engine](https://github.com/techlib/celus/blob/master/apps/reporting/logic/computation.py): `apps/reporting/logic/computation.py`
- [Charts](https://github.com/techlib/celus/blob/master/apps/charts/views.py): `apps/charts/views.py`
- [Data exports](https://github.com/techlib/celus/blob/master/apps/export/models.py): `apps/export/models.py`
- [Annotations](https://github.com/techlib/celus/blob/master/apps/annotations/models.py): `apps/annotations/models.py`
- [Events and alerts](https://github.com/techlib/celus/blob/master/apps/events/models.py): `apps/events/models.py`

### Other components

- **Consortium user**
- **Background task queue**
- **SUSHI provider**

## Connections

- Consortium user → CELUS interface: uses (evidence: `README.rst`)
- CELUS interface → Application API: requests
- Harvest scheduler → SUSHI fetching: processes intentions (evidence: `apps/scheduler/models.py`)
- SUSHI fetching → SUSHI provider: fetches reports (evidence: `apps/sushi/models.py`)
- Harvest scheduler → Harvest tasks: queues work (evidence: `apps/sushi/tasks.py`)
- Harvest tasks → SUSHI fetching: runs harvest logic (evidence: `apps/sushi/tasks.py`)
- Harvest tasks → Background task queue: runs asynchronously (evidence: `apps/sushi/tasks.py`)
- Import processing → Access-log data: imports records (evidence: `apps/logs/tasks.py`)
- Import processing → Background task queue: runs asynchronously (evidence: `apps/logs/tasks.py`)
- SUSHI fetching → Access-log data: creates access logs (evidence: `apps/sushi/models.py`)
- Access-log data → Organizations: associates usage (evidence: `apps/logs/models.py`)
- Access-log data → Platforms and titles: associates usage (evidence: `apps/logs/models.py`)
- Knowledgebase → Platforms and titles: updates platform data (evidence: `apps/knowledgebase/models.py`)
- Reporting engine → Access-log data: queries usage
- Charts → Access-log data: visualizes usage
- Data exports → Access-log data: exports reports (evidence: `apps/export/models.py`)
- Data exports → Tags and lists: uses tag filters (evidence: `apps/export/models.py`)
- Annotations → CELUS interface: appears in interface
- Events and alerts → Background task queue: sends notifications (evidence: `apps/events/models.py`)
- Events and alerts → CELUS interface: publishes updates (evidence: `apps/events/models.py`)
