# aeecleclair/hyperion architecture

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

- Interactive diagram: https://gitdiagram.com/aeecleclair/hyperion
- Repository: https://github.com/aeecleclair/hyperion

## Overview

Hyperion is a modular FastAPI backend for MyECL, providing authentication, authorization, association services, commerce, payments, documents, and student activities. The principal workflow is client request → FastAPI application → registered API router → authenticated domain endpoint → CRUD/database operation → response. Authentication uses OAuth/OIDC-style token endpoints and persisted authorization and refresh tokens. Domain modules such as CDR and sport competition expose independent workflows, while MyPayment and external payment services support commerce. The sampled source confirms application setup, router inclusion, authentication persistence, and representative module/database calls; unsampled modules are shown only where their tree structure establishes a capability.

Main entry points: [`app/api.py`](https://github.com/aeecleclair/hyperion/blob/main/app/api.py) (API Router), [`app/types/sqlalchemy.py`](https://github.com/aeecleclair/hyperion/blob/main/app/types/sqlalchemy.py) (Relational Database), [`app/core/mypayment/endpoints_mypayment.py`](https://github.com/aeecleclair/hyperion/blob/main/app/core/mypayment/endpoints_mypayment.py) (MyPayment Wallet), [`app/app.py`](https://github.com/aeecleclair/hyperion/blob/main/app/app.py) (FastAPI Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application Runtime"]
  node_app["FastAPI Application<br/>[app.py]"]
  node_api_router["API Router<br/>[api.py]"]
  node_module_registry["Module Registry<br/>[module.py]"]
end

subgraph group_identity["Identity Access"]
  node_auth_endpoints["Auth Endpoints<br/>[endpoints_auth.py]"]
  node_auth_crud["Auth Persistence<br/>[cruds_auth.py]"]
  node_users["User Management<br/>[endpoints_users.py]"]
  node_permissions["Permissions"]
end

subgraph group_platform["Core Platform"]
  node_database[("Relational Database<br/>[sqlalchemy.py]")]
  node_documents["Document Services"]
  node_notifications["Notifications"]
  node_google_api["Google Integration"]
end

subgraph group_commerce["Commerce Payments"]
  node_cdr["Cdr Commerce<br/>[endpoints_cdr.py]"]
  node_mypayment["MyPayment Wallet"]
  node_payment_tool["Payment Tool<br/>[payment_tool.py]"]
end

subgraph group_modules["Student Modules"]
  node_sport["Sport Competition"]
  node_booking["Booking Module"]
  node_calendar["Calendar Module"]
  node_advert["Advert Module"]
end

node_client(("API Client"))
node_helloasso["HelloAsso"]

node_client -->|"sends request"| node_app
node_app -->|"includes router"| node_api_router
node_app -->|"initializes modules"| node_module_registry
node_api_router -->|"dispatches auth"| node_auth_endpoints
node_api_router -->|"dispatches users"| node_users
node_api_router -->|"dispatches documents"| node_documents
node_api_router -->|"dispatches notifications"| node_notifications
node_api_router -->|"dispatches CDR"| node_cdr
node_api_router -->|"dispatches payments"| node_mypayment
node_api_router -->|"dispatches competition"| node_sport
node_api_router -->|"dispatches booking"| node_booking
node_api_router -->|"dispatches calendar"| node_calendar
node_api_router -->|"dispatches adverts"| node_advert
node_api_router -.->|"dispatches Google"| node_google_api
node_auth_endpoints -->|"reads tokens"| node_auth_crud
node_auth_crud -->|"persists tokens"| node_database
node_auth_endpoints -->|"resolves user"| node_users
node_users -->|"reads users"| node_database
node_permissions -->|"reads permissions"| node_database
node_documents -->|"stores documents"| node_database
node_cdr -->|"stores purchases"| node_database
node_sport -->|"stores competition"| node_database
node_mypayment -->|"stores transactions"| node_database
node_cdr -->|"creates payment"| node_payment_tool
node_payment_tool -->|"opens checkout"| node_helloasso
node_mypayment -.->|"handles transfer"| node_helloasso
node_mypayment -->|"sends notifications"| node_notifications
node_documents -.->|"uses Google"| node_google_api

click node_app "https://github.com/aeecleclair/hyperion/blob/main/app/app.py"
click node_api_router "https://github.com/aeecleclair/hyperion/blob/main/app/api.py"
click node_module_registry "https://github.com/aeecleclair/hyperion/blob/main/app/module.py"
click node_auth_endpoints "https://github.com/aeecleclair/hyperion/blob/main/app/core/auth/endpoints_auth.py"
click node_auth_crud "https://github.com/aeecleclair/hyperion/blob/main/app/core/auth/cruds_auth.py"
click node_users "https://github.com/aeecleclair/hyperion/blob/main/app/core/users/endpoints_users.py"
click node_permissions "https://github.com/aeecleclair/hyperion/blob/main/app/core/permissions/endpoints_permissions.py"
click node_database "https://github.com/aeecleclair/hyperion/blob/main/app/types/sqlalchemy.py"
click node_documents "https://github.com/aeecleclair/hyperion/blob/main/app/core/documents/endpoints_documents.py"
click node_notifications "https://github.com/aeecleclair/hyperion/blob/main/app/core/notification/endpoints_notification.py"
click node_cdr "https://github.com/aeecleclair/hyperion/blob/main/app/modules/cdr/endpoints_cdr.py"
click node_mypayment "https://github.com/aeecleclair/hyperion/blob/main/app/core/mypayment/endpoints_mypayment.py"
click node_payment_tool "https://github.com/aeecleclair/hyperion/blob/main/app/core/payment/payment_tool.py"
click node_sport "https://github.com/aeecleclair/hyperion/blob/main/app/modules/sport_competition/endpoints_sport_competition.py"
click node_booking "https://github.com/aeecleclair/hyperion/blob/main/app/modules/booking/endpoints_booking.py"
click node_calendar "https://github.com/aeecleclair/hyperion/blob/main/app/modules/calendar/endpoints_calendar.py"
click node_advert "https://github.com/aeecleclair/hyperion/blob/main/app/modules/advert/endpoints_advert.py"
click node_google_api "https://github.com/aeecleclair/hyperion/blob/main/app/core/google_api/endpoints_google_api.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_app,node_api_router,node_module_registry,node_client toneBlue
class node_auth_endpoints,node_auth_crud,node_users,node_permissions toneAmber
class node_database,node_documents,node_notifications,node_google_api toneMint
class node_cdr,node_mypayment,node_payment_tool toneRose
class node_sport,node_booking,node_calendar,node_advert,node_helloasso toneIndigo
```

## Components

### Application Runtime

- [FastAPI Application](https://github.com/aeecleclair/hyperion/blob/main/app/app.py): `app/app.py`
- [API Router](https://github.com/aeecleclair/hyperion/blob/main/app/api.py): `app/api.py`
- [Module Registry](https://github.com/aeecleclair/hyperion/blob/main/app/module.py): `app/module.py`

### Identity Access

- [Auth Endpoints](https://github.com/aeecleclair/hyperion/blob/main/app/core/auth/endpoints_auth.py): `app/core/auth/endpoints_auth.py`
- [Auth Persistence](https://github.com/aeecleclair/hyperion/blob/main/app/core/auth/cruds_auth.py): `app/core/auth/cruds_auth.py`
- [User Management](https://github.com/aeecleclair/hyperion/blob/main/app/core/users/endpoints_users.py): `app/core/users/endpoints_users.py`
- [Permissions](https://github.com/aeecleclair/hyperion/blob/main/app/core/permissions/endpoints_permissions.py): `app/core/permissions/endpoints_permissions.py`

### Core Platform

- [Relational Database](https://github.com/aeecleclair/hyperion/blob/main/app/types/sqlalchemy.py): `app/types/sqlalchemy.py`
- [Document Services](https://github.com/aeecleclair/hyperion/blob/main/app/core/documents/endpoints_documents.py): `app/core/documents/endpoints_documents.py`
- [Notifications](https://github.com/aeecleclair/hyperion/blob/main/app/core/notification/endpoints_notification.py): `app/core/notification/endpoints_notification.py`
- [Google Integration](https://github.com/aeecleclair/hyperion/blob/main/app/core/google_api/endpoints_google_api.py): `app/core/google_api/endpoints_google_api.py`

### Commerce Payments

- [Cdr Commerce](https://github.com/aeecleclair/hyperion/blob/main/app/modules/cdr/endpoints_cdr.py): `app/modules/cdr/endpoints_cdr.py`
- [MyPayment Wallet](https://github.com/aeecleclair/hyperion/blob/main/app/core/mypayment/endpoints_mypayment.py): `app/core/mypayment/endpoints_mypayment.py`
- [Payment Tool](https://github.com/aeecleclair/hyperion/blob/main/app/core/payment/payment_tool.py): `app/core/payment/payment_tool.py`

### Student Modules

- [Sport Competition](https://github.com/aeecleclair/hyperion/blob/main/app/modules/sport_competition/endpoints_sport_competition.py): `app/modules/sport_competition/endpoints_sport_competition.py`
- [Booking Module](https://github.com/aeecleclair/hyperion/blob/main/app/modules/booking/endpoints_booking.py): `app/modules/booking/endpoints_booking.py`
- [Calendar Module](https://github.com/aeecleclair/hyperion/blob/main/app/modules/calendar/endpoints_calendar.py): `app/modules/calendar/endpoints_calendar.py`
- [Advert Module](https://github.com/aeecleclair/hyperion/blob/main/app/modules/advert/endpoints_advert.py): `app/modules/advert/endpoints_advert.py`

### Other components

- **API Client**
- **HelloAsso**

## Connections

- API Client → FastAPI Application: sends request
- FastAPI Application → API Router: includes router
- FastAPI Application → Module Registry: initializes modules
- API Router → Auth Endpoints: dispatches auth
- API Router → User Management: dispatches users
- API Router → Document Services: dispatches documents
- API Router → Notifications: dispatches notifications
- API Router → Cdr Commerce: dispatches CDR
- API Router → MyPayment Wallet: dispatches payments
- API Router → Sport Competition: dispatches competition
- API Router → Booking Module: dispatches booking
- API Router → Calendar Module: dispatches calendar
- API Router → Advert Module: dispatches adverts
- API Router → Google Integration: dispatches Google
- Auth Endpoints → Auth Persistence: reads tokens
- Auth Persistence → Relational Database: persists tokens
- Auth Endpoints → User Management: resolves user
- User Management → Relational Database: reads users
- Permissions → Relational Database: reads permissions
- Document Services → Relational Database: stores documents
- Cdr Commerce → Relational Database: stores purchases
- Sport Competition → Relational Database: stores competition
- MyPayment Wallet → Relational Database: stores transactions
- Cdr Commerce → Payment Tool: creates payment
- Payment Tool → HelloAsso: opens checkout
- MyPayment Wallet → HelloAsso: handles transfer
- MyPayment Wallet → Notifications: sends notifications
- Document Services → Google Integration: uses Google
