# gilda007/assurance architecture

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

- Interactive diagram: https://gitdiagram.com/gilda007/assurance
- Repository: https://github.com/gilda007/assurance

## Overview

This repository is a desktop insurance-management application with Automobile and Claims modules, shared database/session infrastructure, and a separate ASAC production API. A typical workflow is to manage contacts, vehicles and contracts, then register and process claims, including recourse and settlement; the API supports certificate production and authentication. The graph preserves the documented-by-tree domain branches, but the README is empty and many UI-to-controller connections are unsampled, so those links are omitted rather than inferred.

Main entry points: [`addons/Automobiles/api/routers/productions.py`](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/routers/productions.py) (Production routes), [`addons/Automobiles/controllers/automobile_controller.py`](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/controllers/automobile_controller.py) (Vehicle management), [`addons/Automobiles/api/routers/auth.py`](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/routers/auth.py) (Authentication routes), [`addons/sinistres/controllers/sinistre_controller.py`](https://github.com/gilda007/assurance/blob/master/addons/sinistres/controllers/sinistre_controller.py) (Claim lifecycle)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_automobiles["Automobile insurance"]
  node_auto_ui["Automobile interface<br/>[main_ui.py]"]
  node_auto_controller["Vehicle management"]
  node_contract_controller["Contract management"]
  node_fleet_controller["Fleet management"]
  node_garage_controller["Garage management"]
  node_auto_models[("Vehicle records")]
  node_contact_models[("Contact records<br/>[contact_models.py]")]
  node_contract_models[("Contract records<br/>[contract_models.py]")]
  node_auto_views["Contact views"]
end

subgraph group_claims["Claims operations"]
  node_claims_ui["Claims interface<br/>[main_ui.py]"]
  node_claim_controller["Claim lifecycle"]
  node_claim_service["Claim services"]
  node_recourse_controller["Recourse management"]
  node_recourse_service["Recourse service<br/>[recours_service.py]"]
  node_settlement_service["Settlement service"]
  node_claim_models[("Claim records<br/>[sinistre.py]")]
end

subgraph group_asac["ASAC API"]
  node_asac_app["API application<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[auth.py]"]
  node_production_routes["Production routes<br/>[productions.py]"]
  node_api_schemas["API schemas<br/>[schemas.py]"]
  node_api_security["API security<br/>[security.py]"]
  node_api_db[("ASAC database<br/>[database.py]")]
  node_api_models[("API records<br/>[models_db.py]")]
  node_lometa_client["LOMETA integration<br/>[lometa_client.py]"]
end

subgraph group_platform["Shared platform"]
  node_core_db[("Shared database<br/>[database.py]")]
  node_local_db[("Local database<br/>[local_db.py]")]
  node_query_cache["Query cache<br/>[query_cache.py]"]
  node_logger["Application logging<br/>[logger.py]"]
end

node_asac_client(("API consumers"))

node_auto_controller -->|"queries"| node_contact_models
node_auto_controller -->|"manages"| node_auto_models
node_auto_controller -->|"uses"| node_contract_models
node_contract_controller -->|"manages"| node_contract_models
node_auto_controller -->|"delegates"| node_contract_controller
node_garage_controller -.->|"stores"| node_core_db
node_claim_controller -->|"delegates"| node_claim_service
node_claim_controller -->|"queries"| node_claim_models
node_claim_controller -.->|"uses"| node_recourse_service
node_recourse_controller -->|"delegates"| node_recourse_service
node_claim_controller -.->|"uses"| node_settlement_service
node_asac_client -.->|"requests"| node_asac_app
node_asac_app -->|"registers"| node_auth_routes
node_asac_app -->|"registers"| node_production_routes
node_auth_routes -->|"validates"| node_api_schemas
node_auth_routes -->|"checks"| node_api_security
node_auth_routes -->|"opens session"| node_api_db
node_auth_routes -->|"queries"| node_api_models
node_production_routes -->|"validates"| node_api_schemas
node_production_routes -->|"checks"| node_api_security
node_production_routes -->|"opens session"| node_api_db
node_production_routes -->|"queries"| node_api_models
node_production_routes -->|"calls"| node_lometa_client
node_api_db -->|"opens LOMETA session"| node_core_db
node_core_db -->|"loads models"| node_auto_models
node_core_db -.->|"uses"| node_local_db
node_auto_controller -.->|"caches"| node_query_cache

click node_auto_ui "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/main_ui.py"
click node_auto_controller "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/controllers/automobile_controller.py"
click node_contract_controller "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/controllers/contract_controller.py"
click node_fleet_controller "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/controllers/flotte_controller.py"
click node_garage_controller "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/controllers/garage_controller.py"
click node_auto_models "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/models/automobile_models.py"
click node_contact_models "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/models/contact_models.py"
click node_contract_models "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/models/contract_models.py"
click node_auto_views "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/views/contact_detail_view.py"
click node_claims_ui "https://github.com/gilda007/assurance/blob/master/addons/sinistres/main_ui.py"
click node_claim_controller "https://github.com/gilda007/assurance/blob/master/addons/sinistres/controllers/sinistre_controller.py"
click node_claim_service "https://github.com/gilda007/assurance/blob/master/addons/sinistres/services/sinistre_service.py"
click node_recourse_controller "https://github.com/gilda007/assurance/blob/master/addons/sinistres/controllers/recours_controller.py"
click node_recourse_service "https://github.com/gilda007/assurance/blob/master/addons/sinistres/services/recours_service.py"
click node_settlement_service "https://github.com/gilda007/assurance/blob/master/addons/sinistres/services/reglement_service.py"
click node_claim_models "https://github.com/gilda007/assurance/blob/master/addons/sinistres/models/sinistre.py"
click node_asac_app "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/main.py"
click node_auth_routes "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/routers/auth.py"
click node_production_routes "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/routers/productions.py"
click node_api_schemas "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/schemas.py"
click node_api_security "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/utils/security.py"
click node_api_db "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/database.py"
click node_api_models "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/models_db.py"
click node_lometa_client "https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/lometa_client.py"
click node_core_db "https://github.com/gilda007/assurance/blob/master/core/database.py"
click node_local_db "https://github.com/gilda007/assurance/blob/master/core/local_db.py"
click node_query_cache "https://github.com/gilda007/assurance/blob/master/core/workers/query_cache.py"
click node_logger "https://github.com/gilda007/assurance/blob/master/core/logger.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_auto_ui,node_auto_controller,node_contract_controller,node_fleet_controller,node_garage_controller,node_auto_models,node_contact_models,node_contract_models,node_auto_views toneBlue
class node_claims_ui,node_claim_controller,node_claim_service,node_recourse_controller,node_recourse_service,node_settlement_service,node_claim_models toneAmber
class node_asac_app,node_auth_routes,node_production_routes,node_api_schemas,node_api_security,node_api_db,node_api_models,node_lometa_client,node_asac_client toneMint
class node_core_db,node_local_db,node_query_cache,node_logger toneRose
```

## Components

### Automobile insurance

- [Automobile interface](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/main_ui.py): `addons/Automobiles/main_ui.py`
- [Vehicle management](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/controllers/automobile_controller.py): `addons/Automobiles/controllers/automobile_controller.py`
- [Contract management](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/controllers/contract_controller.py): `addons/Automobiles/controllers/contract_controller.py`
- [Fleet management](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/controllers/flotte_controller.py): `addons/Automobiles/controllers/flotte_controller.py`
- [Garage management](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/controllers/garage_controller.py): `addons/Automobiles/controllers/garage_controller.py`
- [Vehicle records](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/models/automobile_models.py): `addons/Automobiles/models/automobile_models.py`
- [Contact records](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/models/contact_models.py): `addons/Automobiles/models/contact_models.py`
- [Contract records](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/models/contract_models.py): `addons/Automobiles/models/contract_models.py`
- [Contact views](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/views/contact_detail_view.py): `addons/Automobiles/views/contact_detail_view.py`

### Claims operations

- [Claims interface](https://github.com/gilda007/assurance/blob/master/addons/sinistres/main_ui.py): `addons/sinistres/main_ui.py`
- [Claim lifecycle](https://github.com/gilda007/assurance/blob/master/addons/sinistres/controllers/sinistre_controller.py): `addons/sinistres/controllers/sinistre_controller.py`
- [Claim services](https://github.com/gilda007/assurance/blob/master/addons/sinistres/services/sinistre_service.py): `addons/sinistres/services/sinistre_service.py`
- [Recourse management](https://github.com/gilda007/assurance/blob/master/addons/sinistres/controllers/recours_controller.py): `addons/sinistres/controllers/recours_controller.py`
- [Recourse service](https://github.com/gilda007/assurance/blob/master/addons/sinistres/services/recours_service.py): `addons/sinistres/services/recours_service.py`
- [Settlement service](https://github.com/gilda007/assurance/blob/master/addons/sinistres/services/reglement_service.py): `addons/sinistres/services/reglement_service.py`
- [Claim records](https://github.com/gilda007/assurance/blob/master/addons/sinistres/models/sinistre.py): `addons/sinistres/models/sinistre.py`

### ASAC API

- [API application](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/main.py): `addons/Automobiles/api/main.py`
- [Authentication routes](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/routers/auth.py): `addons/Automobiles/api/routers/auth.py`
- [Production routes](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/routers/productions.py): `addons/Automobiles/api/routers/productions.py`
- [API schemas](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/schemas.py): `addons/Automobiles/api/schemas.py`
- [API security](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/utils/security.py): `addons/Automobiles/api/utils/security.py`
- [ASAC database](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/database.py): `addons/Automobiles/api/database.py`
- [API records](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/models_db.py): `addons/Automobiles/api/models_db.py`
- [LOMETA integration](https://github.com/gilda007/assurance/blob/master/addons/Automobiles/api/lometa_client.py): `addons/Automobiles/api/lometa_client.py`

### Shared platform

- [Shared database](https://github.com/gilda007/assurance/blob/master/core/database.py): `core/database.py`
- [Local database](https://github.com/gilda007/assurance/blob/master/core/local_db.py): `core/local_db.py`
- [Query cache](https://github.com/gilda007/assurance/blob/master/core/workers/query_cache.py): `core/workers/query_cache.py`
- [Application logging](https://github.com/gilda007/assurance/blob/master/core/logger.py): `core/logger.py`

### Other components

- **API consumers**

## Connections

- Vehicle management → Contact records: queries (evidence: `addons/Automobiles/controllers/automobile_controller.py`)
- Vehicle management → Vehicle records: manages (evidence: `addons/Automobiles/controllers/automobile_controller.py`)
- Vehicle management → Contract records: uses (evidence: `addons/Automobiles/controllers/automobile_controller.py`)
- Contract management → Contract records: manages (evidence: `addons/Automobiles/controllers/contract_controller.py`)
- Vehicle management → Contract management: delegates (evidence: `addons/Automobiles/controllers/automobile_controller.py`)
- Garage management → Shared database: stores
- Claim lifecycle → Claim services: delegates (evidence: `addons/sinistres/controllers/sinistre_controller.py`)
- Claim lifecycle → Claim records: queries (evidence: `addons/sinistres/controllers/sinistre_controller.py`)
- Claim lifecycle → Recourse service: uses
- Recourse management → Recourse service: delegates (evidence: `addons/sinistres/controllers/recours_controller.py`)
- Claim lifecycle → Settlement service: uses
- API consumers → API application: requests
- API application → Authentication routes: registers (evidence: `addons/Automobiles/api/main.py`)
- API application → Production routes: registers (evidence: `addons/Automobiles/api/main.py`)
- Authentication routes → API schemas: validates (evidence: `addons/Automobiles/api/routers/auth.py`)
- Authentication routes → API security: checks (evidence: `addons/Automobiles/api/routers/auth.py`)
- Authentication routes → ASAC database: opens session (evidence: `addons/Automobiles/api/routers/auth.py`)
- Authentication routes → API records: queries (evidence: `addons/Automobiles/api/routers/auth.py`)
- Production routes → API schemas: validates (evidence: `addons/Automobiles/api/routers/productions.py`)
- Production routes → API security: checks (evidence: `addons/Automobiles/api/routers/productions.py`)
- Production routes → ASAC database: opens session (evidence: `addons/Automobiles/api/routers/productions.py`)
- Production routes → API records: queries (evidence: `addons/Automobiles/api/routers/productions.py`)
- Production routes → LOMETA integration: calls (evidence: `addons/Automobiles/api/routers/productions.py`)
- ASAC database → Shared database: opens LOMETA session (evidence: `addons/Automobiles/api/database.py`)
- Shared database → Vehicle records: loads models (evidence: `core/database.py`)
- Shared database → Local database: uses
- Vehicle management → Query cache: caches (evidence: `addons/Automobiles/controllers/automobile_controller.py`)
