# tg11-org/forge architecture

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

- Interactive diagram: https://gitdiagram.com/tg11-org/forge
- Repository: https://github.com/tg11-org/forge

## Overview

Forge is a Django industrial-services website: visitors browse informational pages, services, hosting, pricing, portfolio work and articles; registered users can manage profiles and saved payment methods, while staff manage hosting plans, instances and users. Hosting also exposes a provisioning request to an external Core API. The README documents PostgreSQL and accessibility options. Source excerpts show account, hosting and staff operations; other content areas are included from the documented capabilities, but their implementation details and wiring are not sampled.

Main entry points: [`hosting/models.py`](https://github.com/tg11-org/forge/blob/main/hosting/models.py) (Plans and instances), [`accounts/views.py`](https://github.com/tg11-org/forge/blob/main/accounts/views.py) (Account and payments), [`hosting/views.py`](https://github.com/tg11-org/forge/blob/main/hosting/views.py) (Instance operations), [`controlpanel/views.py`](https://github.com/tg11-org/forge/blob/main/controlpanel/views.py) (Staff console)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Public content"]
  node_pages_views["Site pages<br/>[views.py]"]
  node_pages_models["Page content<br/>[models.py]"]
  node_services_views["Services<br/>[views.py]"]
  node_services_models["Service content<br/>[models.py]"]
  node_pricing_views["Pricing<br/>[views.py]"]
  node_pricing_models["Pricing plans<br/>[models.py]"]
  node_portfolio_views["Portfolio<br/>[views.py]"]
  node_portfolio_models["Portfolio content<br/>[models.py]"]
  node_notes_views["Articles<br/>[views.py]"]
  node_notes_models["Blog content<br/>[models.py]"]
end

subgraph group_hosting["Hosting operations"]
  node_hosting_public["Hosting catalog<br/>[views.py]"]
  node_hosting_models["Plans and instances<br/>[models.py]"]
  node_instance_views["Instance operations<br/>[views.py]"]
  node_control_views["Staff console<br/>[views.py]"]
  node_control_forms["Staff forms<br/>[forms.py]"]
end

subgraph group_accounts["Accounts and payments"]
  node_account_views["Account and payments<br/>[views.py]"]
  node_account_models["Profiles and orders<br/>[models.py]"]
end

subgraph group_platform["Shared platform"]
  node_database[("PostgreSQL database")]
  node_theme_js["Theme and accessibility<br/>[theme.js]"]
  node_main_js["Site interactions<br/>[main.js]"]
end

node_visitor(("Visitor or user"))
node_stripe["Stripe"]
node_core_api["Core API"]

node_visitor -.->|"browses"| node_pages_views
node_visitor -.->|"browses"| node_services_views
node_visitor -.->|"browses"| node_hosting_public
node_visitor -.->|"browses"| node_pricing_views
node_visitor -.->|"browses"| node_portfolio_views
node_visitor -.->|"browses"| node_notes_views
node_pages_views -.->|"uses"| node_pages_models
node_services_views -.->|"uses"| node_services_models
node_hosting_public -->|"reads"| node_hosting_models
node_instance_views -->|"reads and updates"| node_hosting_models
node_control_views -->|"reads and updates"| node_hosting_models
node_control_views -->|"validates through"| node_control_forms
node_control_forms -->|"forms for"| node_hosting_models
node_pricing_views -.->|"uses"| node_pricing_models
node_portfolio_views -.->|"uses"| node_portfolio_models
node_notes_views -.->|"uses"| node_notes_models
node_visitor -.->|"registers or signs in"| node_account_views
node_account_views -->|"reads and writes"| node_account_models
node_account_views -->|"creates and retrieves"| node_stripe
node_instance_views -->|"requests provisioning"| node_core_api
node_visitor -->|"changes accessibility settings"| node_theme_js
node_visitor -.->|"uses site interactions"| node_main_js
node_account_models -.->|"stores records"| node_database
node_hosting_models -.->|"stores records"| node_database
node_pages_models -.->|"stores content"| node_database
node_services_models -.->|"stores content"| node_database
node_pricing_models -.->|"stores content"| node_database
node_portfolio_models -.->|"stores content"| node_database
node_notes_models -.->|"stores content"| node_database

click node_pages_views "https://github.com/tg11-org/forge/blob/main/pages/views.py"
click node_pages_models "https://github.com/tg11-org/forge/blob/main/pages/models.py"
click node_services_views "https://github.com/tg11-org/forge/blob/main/services/views.py"
click node_services_models "https://github.com/tg11-org/forge/blob/main/services/models.py"
click node_hosting_public "https://github.com/tg11-org/forge/blob/main/hosting/views.py"
click node_hosting_models "https://github.com/tg11-org/forge/blob/main/hosting/models.py"
click node_pricing_views "https://github.com/tg11-org/forge/blob/main/pricing/views.py"
click node_pricing_models "https://github.com/tg11-org/forge/blob/main/pricing/models.py"
click node_portfolio_views "https://github.com/tg11-org/forge/blob/main/portfolio/views.py"
click node_portfolio_models "https://github.com/tg11-org/forge/blob/main/portfolio/models.py"
click node_notes_views "https://github.com/tg11-org/forge/blob/main/notes/views.py"
click node_notes_models "https://github.com/tg11-org/forge/blob/main/notes/models.py"
click node_instance_views "https://github.com/tg11-org/forge/blob/main/hosting/views.py"
click node_control_views "https://github.com/tg11-org/forge/blob/main/controlpanel/views.py"
click node_control_forms "https://github.com/tg11-org/forge/blob/main/controlpanel/forms.py"
click node_account_views "https://github.com/tg11-org/forge/blob/main/accounts/views.py"
click node_account_models "https://github.com/tg11-org/forge/blob/main/accounts/models.py"
click node_theme_js "https://github.com/tg11-org/forge/blob/main/static/js/theme.js"
click node_main_js "https://github.com/tg11-org/forge/blob/main/static/js/main.js"

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_pages_views,node_pages_models,node_services_views,node_services_models,node_pricing_views,node_pricing_models,node_portfolio_views,node_portfolio_models,node_notes_views,node_notes_models,node_visitor toneBlue
class node_hosting_public,node_hosting_models,node_instance_views,node_control_views,node_control_forms toneAmber
class node_account_views,node_account_models,node_core_api toneMint
class node_database,node_theme_js,node_main_js toneRose
class node_stripe toneIndigo
```

## Components

### Public content

- [Site pages](https://github.com/tg11-org/forge/blob/main/pages/views.py): `pages/views.py`
- [Page content](https://github.com/tg11-org/forge/blob/main/pages/models.py): `pages/models.py`
- [Services](https://github.com/tg11-org/forge/blob/main/services/views.py): `services/views.py`
- [Service content](https://github.com/tg11-org/forge/blob/main/services/models.py): `services/models.py`
- [Pricing](https://github.com/tg11-org/forge/blob/main/pricing/views.py): `pricing/views.py`
- [Pricing plans](https://github.com/tg11-org/forge/blob/main/pricing/models.py): `pricing/models.py`
- [Portfolio](https://github.com/tg11-org/forge/blob/main/portfolio/views.py): `portfolio/views.py`
- [Portfolio content](https://github.com/tg11-org/forge/blob/main/portfolio/models.py): `portfolio/models.py`
- [Articles](https://github.com/tg11-org/forge/blob/main/notes/views.py): `notes/views.py`
- [Blog content](https://github.com/tg11-org/forge/blob/main/notes/models.py): `notes/models.py`

### Hosting operations

- [Hosting catalog](https://github.com/tg11-org/forge/blob/main/hosting/views.py): `hosting/views.py`
- [Plans and instances](https://github.com/tg11-org/forge/blob/main/hosting/models.py): `hosting/models.py`
- [Instance operations](https://github.com/tg11-org/forge/blob/main/hosting/views.py): `hosting/views.py`
- [Staff console](https://github.com/tg11-org/forge/blob/main/controlpanel/views.py): `controlpanel/views.py`
- [Staff forms](https://github.com/tg11-org/forge/blob/main/controlpanel/forms.py): `controlpanel/forms.py`

### Accounts and payments

- [Account and payments](https://github.com/tg11-org/forge/blob/main/accounts/views.py): `accounts/views.py`
- [Profiles and orders](https://github.com/tg11-org/forge/blob/main/accounts/models.py): `accounts/models.py`

### Shared platform

- **PostgreSQL database**
- [Theme and accessibility](https://github.com/tg11-org/forge/blob/main/static/js/theme.js): `static/js/theme.js`
- [Site interactions](https://github.com/tg11-org/forge/blob/main/static/js/main.js): `static/js/main.js`

### Other components

- **Visitor or user**
- **Stripe**
- **Core API**

## Connections

- Visitor or user → Site pages: browses (evidence: `README.md`)
- Visitor or user → Services: browses (evidence: `README.md`)
- Visitor or user → Hosting catalog: browses (evidence: `README.md`)
- Visitor or user → Pricing: browses (evidence: `README.md`)
- Visitor or user → Portfolio: browses (evidence: `README.md`)
- Visitor or user → Articles: browses (evidence: `README.md`)
- Site pages → Page content: uses
- Services → Service content: uses
- Hosting catalog → Plans and instances: reads (evidence: `hosting/views.py`)
- Instance operations → Plans and instances: reads and updates (evidence: `hosting/views.py`)
- Staff console → Plans and instances: reads and updates (evidence: `controlpanel/views.py`)
- Staff console → Staff forms: validates through (evidence: `controlpanel/views.py`)
- Staff forms → Plans and instances: forms for (evidence: `controlpanel/forms.py`)
- Pricing → Pricing plans: uses
- Portfolio → Portfolio content: uses
- Articles → Blog content: uses
- Visitor or user → Account and payments: registers or signs in (evidence: `README.md`)
- Account and payments → Profiles and orders: reads and writes (evidence: `accounts/views.py`)
- Account and payments → Stripe: creates and retrieves (evidence: `accounts/views.py`)
- Instance operations → Core API: requests provisioning (evidence: `hosting/views.py`)
- Visitor or user → Theme and accessibility: changes accessibility settings (evidence: `README.md`)
- Visitor or user → Site interactions: uses site interactions
- Profiles and orders → PostgreSQL database: stores records
- Plans and instances → PostgreSQL database: stores records
- Page content → PostgreSQL database: stores content
- Service content → PostgreSQL database: stores content
- Pricing plans → PostgreSQL database: stores content
- Portfolio content → PostgreSQL database: stores content
- Blog content → PostgreSQL database: stores content
