# athallahd/sec-reporter-id architecture

> Architecture diagram of the GitHub repository athallahd/sec-reporter-id, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/athallahd/sec-reporter-id
- Repository: https://github.com/athallahd/sec-reporter-id

## Overview

This is a local excerpt of Reporter’s Celery scheduler: Beat dispatches scheduled tasks, adapters invoke existing Django management commands, and failures propagate for Celery to report. It also includes a scheduled User UBID task that gathers member data and writes a table. The README documents the dashboard schedule and upstream command ownership, but those command implementations are outside this tree; the UBID excerpt is partial, so its data sources are shown only where supported.

Main entry points: [`user_ubid.py`](https://github.com/athallahd/sec-reporter-id/blob/main/user_ubid.py) (UBID Task), [`dashboard_daily_summary.py`](https://github.com/athallahd/sec-reporter-id/blob/main/dashboard_daily_summary.py) (Dashboard Task), [`user_location.py`](https://github.com/athallahd/sec-reporter-id/blob/main/user_location.py) (Location Task), [`celeryconfig.py`](https://github.com/athallahd/sec-reporter-id/blob/main/celeryconfig.py) (Beat Config)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scheduling["Scheduling"]
  node_config["Beat Config<br/>[celeryconfig.py]"]
end

subgraph group_daily_adapters["Daily Adapters"]
  node_dashboard_task["Dashboard Task"]
  node_location_task["Location Task<br/>[user_location.py]"]
end

subgraph group_ubid_sync["UBID Sync"]
  node_ubid_task["UBID Task<br/>[user_ubid.py]"]
end

node_beat(("Celery Beat"))
node_dashboard_command["Dashboard Command"]
node_location_command["Location Sync Command"]
node_member_sources[("Member Data Sources")]
node_django_db[("Django Database")]

node_config -->|"configures schedules"| node_beat
node_beat -->|"dispatches"| node_dashboard_task
node_beat -->|"dispatches"| node_location_task
node_beat -->|"dispatches"| node_ubid_task
node_dashboard_task -->|"calls refresh_dashboard"| node_dashboard_command
node_location_task -->|"calls sync_user_locations"| node_location_command
node_ubid_task -->|"queries member data"| node_member_sources
node_ubid_task -->|"truncates and inserts"| node_django_db

click node_config "https://github.com/athallahd/sec-reporter-id/blob/main/celeryconfig.py"
click node_dashboard_task "https://github.com/athallahd/sec-reporter-id/blob/main/dashboard_daily_summary.py"
click node_location_task "https://github.com/athallahd/sec-reporter-id/blob/main/user_location.py"
click node_ubid_task "https://github.com/athallahd/sec-reporter-id/blob/main/user_ubid.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_config toneBlue
class node_dashboard_task,node_location_task,node_member_sources,node_django_db toneAmber
class node_ubid_task toneMint
class node_beat,node_dashboard_command,node_location_command toneIndigo
```

## Components

### Scheduling

- [Beat Config](https://github.com/athallahd/sec-reporter-id/blob/main/celeryconfig.py): `celeryconfig.py`

### Daily Adapters

- [Dashboard Task](https://github.com/athallahd/sec-reporter-id/blob/main/dashboard_daily_summary.py): `dashboard_daily_summary.py`
- [Location Task](https://github.com/athallahd/sec-reporter-id/blob/main/user_location.py): `user_location.py`

### UBID Sync

- [UBID Task](https://github.com/athallahd/sec-reporter-id/blob/main/user_ubid.py): `user_ubid.py`

### Other components

- **Celery Beat**
- **Dashboard Command**
- **Location Sync Command**
- **Member Data Sources**
- **Django Database**

## Connections

- Beat Config → Celery Beat: configures schedules
- Celery Beat → Dashboard Task: dispatches
- Celery Beat → Location Task: dispatches
- Celery Beat → UBID Task: dispatches
- Dashboard Task → Dashboard Command: calls refresh_dashboard
- Location Task → Location Sync Command: calls sync_user_locations
- UBID Task → Member Data Sources: queries member data
- UBID Task → Django Database: truncates and inserts
