# erkaek/aa-indy_hub architecture

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

- Interactive diagram: https://gitdiagram.com/erkaek/aa-indy_hub
- Repository: https://github.com/erkaek/aa-indy_hub
- Video tour (about a minute): https://gitdiagram.com/erkaek/aa-indy_hub/video

## Overview

Indy Hub is an Alliance Auth application for EVE Online industry management and internal Material Exchange. Users enter through its web views to browse blueprints and jobs, manage copy requests and production projects, and trade materials; corporation data depends on permissions and authorized ESI access. Celery tasks refresh industry and exchange data in the background, with Django models holding application state. The README documents capabilities beyond the sampled excerpts; edges for those branches are included only where the README or source index supports them.

Main entry points: [`indy_hub/views/industry.py`](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/industry.py) (Industry views), [`indy_hub/models.py`](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/models.py) (Application records), [`indy_hub/views/material_exchange.py`](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/material_exchange.py) (Exchange workflows), [`indy_hub/tasks/industry.py`](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/tasks/industry.py) (Industry refresh tasks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_industry_views["Industry views<br/>[industry.py]"]
  node_user_views["User views<br/>[user.py]"]
  node_navigation["Navigation<br/>[navigation.py]"]
  node_api["Application API<br/>[api.py]"]
end

subgraph group_industry["Industry workflows"]
  node_blueprints_jobs["Blueprints and jobs<br/>[industry.py]"]
  node_copy_workflow["Copy requests<br/>[industry.py]"]
  node_projects["Production projects"]
  node_structure_registry["Structure registry"]
end

subgraph group_exchange["Material Exchange"]
  node_exchange_views["Exchange workflows"]
  node_exchange_orders["Exchange orders"]
  node_exchange_config["Exchange settings"]
  node_notifications["Notifications<br/>[notifications.py]"]
end

subgraph group_data["Data and integrations"]
  node_domain_models[("Application records<br/>[models.py]")]
  node_esi["ESI client<br/>[esi_client.py]"]
  node_asset_cache["Asset cache<br/>[asset_cache.py]"]
  node_location_names["Location resolution<br/>[eve.py]"]
end

subgraph group_ops["Background operations"]
  node_industry_tasks["Industry refresh tasks<br/>[industry.py]"]
  node_exchange_tasks["Exchange tasks"]
  node_contract_tasks["Contract processing"]
  node_admin_stats["Admin health and usage"]
  node_celery["Celery workers<br/>[tasks.py]"]
end

node_member(("Alliance Auth users"))
node_discord["Discord integration"]

node_member -->|"opens industry"| node_industry_views
node_member -->|"manages account"| node_user_views
node_member -->|"trades materials"| node_exchange_views
node_industry_views -->|"serves"| node_blueprints_jobs
node_industry_views -->|"serves"| node_copy_workflow
node_industry_views -->|"reads and writes"| node_domain_models
node_industry_views -->|"uses client"| node_esi
node_industry_views -->|"uses services"| node_structure_registry
node_industry_views -->|"uses project service"| node_projects
node_user_views -->|"reads and writes"| node_domain_models
node_user_views -->|"uses industry views"| node_industry_views
node_navigation -->|"reads settings"| node_domain_models
node_navigation -.->|"displays menu"| node_member
node_api -.->|"supports interface"| node_industry_views
node_projects -->|"uses records"| node_domain_models
node_projects -->|"uses structure data"| node_structure_registry
node_exchange_views -->|"reads and writes"| node_domain_models
node_exchange_views -->|"uses cached assets"| node_asset_cache
node_exchange_views -->|"dispatches tasks"| node_exchange_tasks
node_exchange_views -->|"sends notices"| node_notifications
node_exchange_orders -.->|"supports orders"| node_exchange_views
node_exchange_config -.->|"configures exchange"| node_exchange_views
node_notifications -.->|"optional dispatch"| node_discord
node_industry_tasks -->|"updates records"| node_domain_models
node_industry_tasks -->|"fetches ESI data"| node_esi
node_industry_tasks -->|"uses asset data"| node_asset_cache
node_industry_tasks -->|"resolves locations"| node_location_names
node_exchange_tasks -->|"updates records"| node_domain_models
node_exchange_tasks -->|"uses cached assets"| node_asset_cache
node_contract_tasks -->|"updates records"| node_domain_models
node_contract_tasks -->|"fetches ESI data"| node_esi
node_contract_tasks -->|"sends notices"| node_notifications
node_celery -->|"loads tasks"| node_industry_tasks
node_celery -->|"loads tasks"| node_exchange_tasks
node_celery -->|"loads tasks"| node_contract_tasks
node_admin_stats -.->|"summarizes usage"| node_domain_models

click node_industry_views "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/industry.py"
click node_user_views "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/user.py"
click node_navigation "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/navigation.py"
click node_api "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/api.py"
click node_blueprints_jobs "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/industry.py"
click node_copy_workflow "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/industry.py"
click node_projects "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/production_projects.py"
click node_structure_registry "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/industry_structures.py"
click node_exchange_views "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/material_exchange.py"
click node_exchange_orders "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/material_exchange_orders.py"
click node_exchange_config "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/material_exchange_config.py"
click node_notifications "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/notifications.py"
click node_domain_models "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/models.py"
click node_esi "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/esi_client.py"
click node_asset_cache "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/asset_cache.py"
click node_location_names "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/utils/eve.py"
click node_industry_tasks "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/tasks/industry.py"
click node_exchange_tasks "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/tasks/material_exchange.py"
click node_contract_tasks "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/tasks/material_exchange_contracts.py"
click node_admin_stats "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/admin_user_status.py"
click node_celery "https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/tasks.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_industry_views,node_user_views,node_navigation,node_api,node_member toneBlue
class node_blueprints_jobs,node_copy_workflow,node_projects,node_structure_registry toneAmber
class node_exchange_views,node_exchange_orders,node_exchange_config,node_notifications toneMint
class node_domain_models,node_esi,node_asset_cache,node_location_names toneRose
class node_industry_tasks,node_exchange_tasks,node_contract_tasks,node_admin_stats,node_celery,node_discord toneIndigo
```

## Components

### Web experience

- [Industry views](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/industry.py): `indy_hub/views/industry.py`
- [User views](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/user.py): `indy_hub/views/user.py`
- [Navigation](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/navigation.py): `indy_hub/views/navigation.py`
- [Application API](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/api.py): `indy_hub/views/api.py`

### Industry workflows

- [Blueprints and jobs](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/industry.py): `indy_hub/views/industry.py`
- [Copy requests](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/industry.py): `indy_hub/views/industry.py`
- [Production projects](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/production_projects.py): `indy_hub/services/production_projects.py`
- [Structure registry](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/industry_structures.py): `indy_hub/services/industry_structures.py`

### Material Exchange

- [Exchange workflows](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/material_exchange.py): `indy_hub/views/material_exchange.py`
- [Exchange orders](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/material_exchange_orders.py): `indy_hub/views/material_exchange_orders.py`
- [Exchange settings](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/views/material_exchange_config.py): `indy_hub/views/material_exchange_config.py`
- [Notifications](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/notifications.py): `indy_hub/notifications.py`

### Data and integrations

- [Application records](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/models.py): `indy_hub/models.py`
- [ESI client](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/esi_client.py): `indy_hub/services/esi_client.py`
- [Asset cache](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/asset_cache.py): `indy_hub/services/asset_cache.py`
- [Location resolution](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/utils/eve.py): `indy_hub/utils/eve.py`

### Background operations

- [Industry refresh tasks](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/tasks/industry.py): `indy_hub/tasks/industry.py`
- [Exchange tasks](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/tasks/material_exchange.py): `indy_hub/tasks/material_exchange.py`
- [Contract processing](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/tasks/material_exchange_contracts.py): `indy_hub/tasks/material_exchange_contracts.py`
- [Admin health and usage](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/services/admin_user_status.py): `indy_hub/services/admin_user_status.py`
- [Celery workers](https://github.com/erkaek/aa-indy_hub/blob/main/indy_hub/tasks.py): `indy_hub/tasks.py`

### Other components

- **Alliance Auth users**
- **Discord integration**

## Connections

- Alliance Auth users → Industry views: opens industry
- Alliance Auth users → User views: manages account
- Alliance Auth users → Exchange workflows: trades materials
- Industry views → Blueprints and jobs: serves (evidence: `indy_hub/views/industry.py`)
- Industry views → Copy requests: serves (evidence: `indy_hub/views/industry.py`)
- Industry views → Application records: reads and writes (evidence: `indy_hub/views/industry.py`)
- Industry views → ESI client: uses client (evidence: `indy_hub/views/industry.py`)
- Industry views → Structure registry: uses services (evidence: `indy_hub/views/industry.py`)
- Industry views → Production projects: uses project service (evidence: `indy_hub/views/industry.py`)
- User views → Application records: reads and writes (evidence: `indy_hub/views/user.py`)
- User views → Industry views: uses industry views (evidence: `indy_hub/views/user.py`)
- Navigation → Application records: reads settings (evidence: `indy_hub/views/navigation.py`)
- Navigation → Alliance Auth users: displays menu
- Application API → Industry views: supports interface
- Production projects → Application records: uses records (evidence: `indy_hub/services/production_projects.py`)
- Production projects → Structure registry: uses structure data (evidence: `indy_hub/services/production_projects.py`)
- Exchange workflows → Application records: reads and writes (evidence: `indy_hub/views/material_exchange.py`)
- Exchange workflows → Asset cache: uses cached assets (evidence: `indy_hub/views/material_exchange.py`)
- Exchange workflows → Exchange tasks: dispatches tasks (evidence: `indy_hub/views/material_exchange.py`)
- Exchange workflows → Notifications: sends notices (evidence: `indy_hub/views/material_exchange.py`)
- Exchange orders → Exchange workflows: supports orders
- Exchange settings → Exchange workflows: configures exchange
- Notifications → Discord integration: optional dispatch
- Industry refresh tasks → Application records: updates records (evidence: `indy_hub/tasks/industry.py`)
- Industry refresh tasks → ESI client: fetches ESI data (evidence: `indy_hub/tasks/industry.py`)
- Industry refresh tasks → Asset cache: uses asset data (evidence: `indy_hub/tasks/industry.py`)
- Industry refresh tasks → Location resolution: resolves locations (evidence: `indy_hub/tasks/industry.py`)
- Exchange tasks → Application records: updates records
- Exchange tasks → Asset cache: uses cached assets
- Contract processing → Application records: updates records (evidence: `indy_hub/tasks/material_exchange_contracts.py`)
- Contract processing → ESI client: fetches ESI data (evidence: `indy_hub/tasks/material_exchange_contracts.py`)
- Contract processing → Notifications: sends notices (evidence: `indy_hub/tasks/material_exchange_contracts.py`)
- Celery workers → Industry refresh tasks: loads tasks (evidence: `indy_hub/tasks.py`)
- Celery workers → Exchange tasks: loads tasks (evidence: `indy_hub/tasks.py`)
- Celery workers → Contract processing: loads tasks (evidence: `indy_hub/tasks.py`)
- Admin health and usage → Application records: summarizes usage
