# 8x15yz/optimal-loads-gaia-x-connector architecture

> Architecture diagram of the GitHub repository 8x15yz/optimal-loads-gaia-x-connector, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/8x15yz/optimal-loads-gaia-x-connector
- Repository: https://github.com/8x15yz/optimal-loads-gaia-x-connector

## Overview

Blue-X is an account-scoped portal for importing and checking credentials, creating demo participant sessions, and discovering or negotiating service offerings. The main workflow runs through the FastAPI portal and its SQLite-backed state. The excerpts show account checks, credential rechecking, and service negotiation; the tree also identifies credential, service-credential, and UI modules whose internal wiring was not sampled, so those links are omitted where uncertain.

Main entry points: [`portal-mvp/portal.py`](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py) (Portal API), [`portal-mvp/verification_support.py`](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/verification_support.py) (Certificate validation), [`portal-mvp/schema_validation.py`](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/schema_validation.py) (Schema validation), [`portal-mvp/credentials.py`](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/credentials.py) (Credential processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal workflow"]
  node_api["Portal API<br/>[portal.py]"]
  node_account_auth["Account authentication<br/>[accounts.py]"]
  node_portal_db[("Portal database<br/>[portal.py]")]
  node_demo_session["Demo sessions<br/>[portal.py]"]
end

subgraph group_identity["Identity verification"]
  node_credential_import["Credential import<br/>[portal.py]"]
  node_credential_logic["Credential processing<br/>[credentials.py]"]
  node_credential_checks["Credential checks"]
  node_cert_policy["Certificate validation"]
  node_schema_check["Schema validation"]
  node_schema_assets["Credential schemas"]
  node_verification_timing["Verification timing"]
end

subgraph group_services["Service exchange"]
  node_service_registry["Service offerings<br/>[portal.py]"]
  node_service_credentials["Offering credentials"]
  node_negotiation["Contract negotiation<br/>[portal.py]"]
end

subgraph group_operations["Administration and observability"]
  node_admin["Admin controls<br/>[portal.py]"]
  node_admin_setup["Operator setup<br/>[manage_admin.py]"]
  node_audit_logs["Audit and logs<br/>[portal.py]"]
end

node_participant(("Portal user"))
node_certificate_sources{{"Certificate sources"}}

node_participant -->|"sends requests"| node_api
node_api -->|"checks credentials"| node_account_auth
node_api -->|"reads and writes"| node_portal_db
node_api -->|"accepts imports"| node_credential_import
node_api -->|"rechecks imports"| node_credential_logic
node_credential_logic -.->|"delegates checks"| node_credential_checks
node_credential_checks -.->|"validates certificates"| node_cert_policy
node_schema_check -->|"loads schemas"| node_schema_assets
node_schema_check -->|"records timings"| node_verification_timing
node_cert_policy -->|"records timings"| node_verification_timing
node_cert_policy -->|"fetches certificates"| node_certificate_sources
node_api -->|"activates sessions"| node_demo_session
node_api -->|"lists offerings"| node_service_registry
node_api -->|"starts negotiation"| node_negotiation
node_api -->|"handles admin"| node_admin
node_admin_setup -->|"bootstraps operators"| node_api
node_api -->|"serves log queries"| node_audit_logs

click node_api "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py"
click node_account_auth "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/accounts.py"
click node_portal_db "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py"
click node_credential_import "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py"
click node_credential_logic "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/credentials.py"
click node_credential_checks "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/credential_checks.py"
click node_cert_policy "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/verification_support.py"
click node_schema_check "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/schema_validation.py"
click node_schema_assets "https://github.com/8x15yz/optimal-loads-gaia-x-connector/tree/main/portal-mvp/schemas"
click node_verification_timing "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/verification_timing.py"
click node_demo_session "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py"
click node_service_registry "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py"
click node_service_credentials "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/service_credentials.py"
click node_negotiation "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py"
click node_admin "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py"
click node_admin_setup "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/manage_admin.py"
click node_audit_logs "https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.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_api,node_account_auth,node_portal_db,node_demo_session,node_participant toneBlue
class node_credential_import,node_credential_logic,node_credential_checks,node_cert_policy,node_schema_check,node_schema_assets,node_verification_timing toneAmber
class node_service_registry,node_service_credentials,node_negotiation toneMint
class node_admin,node_admin_setup,node_audit_logs toneRose
class node_certificate_sources toneIndigo
```

## Components

### Portal workflow

- [Portal API](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py): `portal-mvp/portal.py`
- [Account authentication](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/accounts.py): `portal-mvp/accounts.py`
- [Portal database](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py): `portal-mvp/portal.py`
- [Demo sessions](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py): `portal-mvp/portal.py`

### Identity verification

- [Credential import](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py): `portal-mvp/portal.py`
- [Credential processing](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/credentials.py): `portal-mvp/credentials.py`
- [Credential checks](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/credential_checks.py): `portal-mvp/credential_checks.py`
- [Certificate validation](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/verification_support.py): `portal-mvp/verification_support.py`
- [Schema validation](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/schema_validation.py): `portal-mvp/schema_validation.py`
- [Credential schemas](https://github.com/8x15yz/optimal-loads-gaia-x-connector/tree/main/portal-mvp/schemas): `portal-mvp/schemas`
- [Verification timing](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/verification_timing.py): `portal-mvp/verification_timing.py`

### Service exchange

- [Service offerings](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py): `portal-mvp/portal.py`
- [Offering credentials](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/service_credentials.py): `portal-mvp/service_credentials.py`
- [Contract negotiation](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py): `portal-mvp/portal.py`

### Administration and observability

- [Admin controls](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py): `portal-mvp/portal.py`
- [Operator setup](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/manage_admin.py): `portal-mvp/manage_admin.py`
- [Audit and logs](https://github.com/8x15yz/optimal-loads-gaia-x-connector/blob/main/portal-mvp/portal.py): `portal-mvp/portal.py`

### Other components

- **Portal user**
- **Certificate sources**

## Connections

- Portal user → Portal API: sends requests (evidence: `portal-mvp/portal.py`)
- Portal API → Account authentication: checks credentials (evidence: `portal-mvp/portal.py`)
- Portal API → Portal database: reads and writes (evidence: `portal-mvp/portal.py`)
- Portal API → Credential import: accepts imports (evidence: `portal-mvp/portal.py`)
- Portal API → Credential processing: rechecks imports (evidence: `portal-mvp/portal.py`)
- Credential processing → Credential checks: delegates checks
- Credential checks → Certificate validation: validates certificates
- Schema validation → Credential schemas: loads schemas (evidence: `portal-mvp/schema_validation.py`)
- Schema validation → Verification timing: records timings (evidence: `portal-mvp/schema_validation.py`)
- Certificate validation → Verification timing: records timings (evidence: `portal-mvp/verification_support.py`)
- Certificate validation → Certificate sources: fetches certificates (evidence: `portal-mvp/verification_support.py`)
- Portal API → Demo sessions: activates sessions (evidence: `portal-mvp/portal.py`)
- Portal API → Service offerings: lists offerings (evidence: `portal-mvp/portal.py`)
- Portal API → Contract negotiation: starts negotiation (evidence: `portal-mvp/portal.py`)
- Portal API → Admin controls: handles admin (evidence: `portal-mvp/portal.py`)
- Operator setup → Portal API: bootstraps operators (evidence: `portal-mvp/manage_admin.py`)
- Portal API → Audit and logs: serves log queries (evidence: `portal-mvp/portal.py`)
