# vijay18-amoga/openai-status-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/vijay18-amoga/openai-status-tracker
- Repository: https://github.com/vijay18-amoga/openai-status-tracker

## Overview

OpenAI Status Tracker polls the public Statuspage API, detects incident-update IDs not previously seen in memory, and prints changed incidents. Users can run this loop directly in the console or use Django server mode, where app startup launches a background scheduler; the browser page reports the in-memory incident count. The graph captures both entry modes and the documented web route. Storage is in-memory for update tracking; the SQLite database is configured by Django but is not part of the shown monitoring workflow.

Main entry points: [`tracker/monitor.py`](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/monitor.py) (Update monitor), [`tracker/fetcher.py`](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/fetcher.py) (Incident fetcher), [`run_tracker.py`](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/run_tracker.py) (Console runner), [`tracker/scheduler.py`](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/scheduler.py) (Polling scheduler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_polling["Incident monitoring"]
  node_monitor["Update monitor<br/>[monitor.py]"]
  node_seen[("Seen updates<br/>[monitor.py]")]
  node_fetcher["Incident fetcher<br/>[fetcher.py]"]
end

subgraph group_entry["Run modes"]
  node_runner["Console runner<br/>[run_tracker.py]"]
  node_scheduler["Polling scheduler<br/>[scheduler.py]"]
  node_app_start["Django app startup<br/>[apps.py]"]
end

subgraph group_web["Django status page"]
  node_root_routes["Project URL routes<br/>[urls.py]"]
  node_app_routes["Tracker URL routes<br/>[urls.py]"]
  node_status_view["Status page view<br/>[views.py]"]
end

node_console_user(("Console operator"))
node_browser_user(("Browser user"))
node_status_api[("OpenAI Status API")]

node_console_user -->|"starts"| node_runner
node_runner -->|"calls"| node_monitor
node_monitor -->|"fetches"| node_fetcher
node_fetcher -->|"requests incidents"| node_status_api
node_monitor -->|"compares and updates"| node_seen
node_monitor -->|"prints updates"| node_console_user
node_app_start -->|"starts"| node_scheduler
node_scheduler -->|"calls periodically"| node_monitor
node_browser_user -->|"requests page"| node_root_routes
node_root_routes -->|"includes"| node_app_routes
node_app_routes -->|"routes to"| node_status_view
node_status_view -->|"reads count"| node_seen

click node_runner "https://github.com/vijay18-amoga/openai-status-tracker/blob/main/run_tracker.py"
click node_monitor "https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/monitor.py"
click node_seen "https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/monitor.py"
click node_fetcher "https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/fetcher.py"
click node_scheduler "https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/scheduler.py"
click node_app_start "https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/apps.py"
click node_root_routes "https://github.com/vijay18-amoga/openai-status-tracker/blob/main/status_tracker/urls.py"
click node_app_routes "https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/urls.py"
click node_status_view "https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/views.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_monitor,node_seen,node_fetcher,node_browser_user toneBlue
class node_runner,node_scheduler,node_app_start,node_status_api toneAmber
class node_root_routes,node_app_routes,node_status_view toneMint
class node_console_user toneIndigo
```

## Components

### Incident monitoring

- [Update monitor](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/monitor.py): `tracker/monitor.py`
- [Seen updates](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/monitor.py): `tracker/monitor.py`
- [Incident fetcher](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/fetcher.py): `tracker/fetcher.py`

### Run modes

- [Console runner](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/run_tracker.py): `run_tracker.py`
- [Polling scheduler](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/scheduler.py): `tracker/scheduler.py`
- [Django app startup](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/apps.py): `tracker/apps.py`

### Django status page

- [Project URL routes](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/status_tracker/urls.py): `status_tracker/urls.py`
- [Tracker URL routes](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/urls.py): `tracker/urls.py`
- [Status page view](https://github.com/vijay18-amoga/openai-status-tracker/blob/main/tracker/views.py): `tracker/views.py`

### Other components

- **Console operator**
- **Browser user**
- **OpenAI Status API**

## Connections

- Console operator → Console runner: starts (evidence: `README.md`)
- Console runner → Update monitor: calls (evidence: `run_tracker.py`)
- Update monitor → Incident fetcher: fetches (evidence: `tracker/monitor.py`)
- Incident fetcher → OpenAI Status API: requests incidents (evidence: `tracker/fetcher.py`)
- Update monitor → Seen updates: compares and updates (evidence: `tracker/monitor.py`)
- Update monitor → Console operator: prints updates (evidence: `README.md`)
- Django app startup → Polling scheduler: starts (evidence: `tracker/apps.py`)
- Polling scheduler → Update monitor: calls periodically (evidence: `tracker/scheduler.py`)
- Browser user → Project URL routes: requests page (evidence: `status_tracker/urls.py`)
- Project URL routes → Tracker URL routes: includes (evidence: `status_tracker/urls.py`)
- Tracker URL routes → Status page view: routes to (evidence: `tracker/urls.py`)
- Status page view → Seen updates: reads count (evidence: `tracker/views.py`)
