# kaareloun/auto-api architecture

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

- Interactive diagram: https://gitdiagram.com/kaareloun/auto-api
- Repository: https://github.com/kaareloun/auto-api

## Overview

##### Protocol Definition Layer should include

- Capabilities Container
- Groupings of the main capability types (e.g., Chassis, Digital Key, Points of Interest)
- Properties System
- Relationship between capabilities and their properties
- Three main component types:
- State
- Getters
- Setters

##### Implementation Layer should showcase

- Parser/Generator System
- How the YAML definitions are processed
- Connections to generated platform-specific libraries
- Data Flow Controllers
- Demonstrate the modular data flow system
- Size optimization for low-bandwidth connections

##### Integration Layer should display

- Vehicle Systems Interface
- Third-party Services Interface
- Communication Protocols

Key Visualization Elements:

- Data flow between vehicles and services
- Property inheritance patterns
- Generation paths for platform-specific implementations

##### Specific technical details
- Property identifiers
- Size specifications
- Timestamp components
- Failure handling paths

##### File Structure Integration
- How the various .yml files (charging.yml, doors.yml, etc.) map to capabilities
- Demonstrate the relationship between universal_properties.yml and specific capabilities
- Tools/definitions.yaml and tools/exceptions.yaml in the generation pipeline

##### Documentation Flow
- How the spec generates documentation
- Connection to high-mobility.com documentation system

##### Modular Architecture
- Modular nature of data flow
- Package size optimization paths
- Demonstrate versioning compatibility

- All component types
- Special symbols used
- Version indicators
- State indicators

Remember to include a small "Version Control" section showing how updates to the spec propagate through the system, as this is crucial for maintaining backward compatibility while allowing for system growth.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph PDL["Protocol Definition Layer"]
        direction TB
        CC["Capabilities Container"]:::container
        PS["Properties System"]:::system
        UP["Universal Properties"]:::props
        CT["Custom Types"]:::types
        
        CC --> PS
        PS --> UP
        PS --> CT
    end

    subgraph IL["Implementation Layer"]
        direction TB
        PG["Parser/Generator System"]:::system
        DF["Data Flow Controllers"]:::controller
        TD["Tools Definitions"]:::tools
        TE["Tools Exceptions"]:::tools
        RG["REST Generator"]:::generator
        
        PG --> TD
        PG --> TE
        PG --> RG
        DF --> PG
    end

    subgraph INL["Integration Layer"]
        direction TB
        VSI["Vehicle Systems Interface"]:::interface
        TPS["Third-party Services"]:::service
        CP["Communication Protocols"]:::protocol
        
        VSI --> CP
        TPS --> CP
    end

    subgraph CD["Core Definitions"]
        direction TB
        CH["Charging"]:::core
        CL["Climate"]:::core
        DR["Doors"]:::core
        EN["Engine"]:::core
        LT["Lights"]:::core
        WN["Windows"]:::core
    end

    subgraph DS["Documentation System"]
        direction TB
        DC["Documentation Config"]:::docs
        DI["Documentation Index"]:::docs
        SP["Specification"]:::docs
    end

    subgraph IS["Integration Specs"]
        direction TB
        BR["Browser"]:::integration
        MB["Mobile"]:::integration
        MC["Multi Command"]:::integration
    end

    subgraph EH["Error Handling"]
        direction TB
        FM["Failure Message"]:::error
        PM["Permissions"]:::permissions
    end

    PDL --> IL
    IL --> INL
    CD --> PDL
    IL --> DS
    INL --> IS
    IL --> EH

    %% Click Events
    click CC "https://github.com/kaareloun/auto-api/blob/master/capabilities.yml"
    click UP "https://github.com/kaareloun/auto-api/blob/master/misc/universal_properties.yml"
    click CT "https://github.com/kaareloun/auto-api/blob/master/custom_types.yml"
    click TD "https://github.com/kaareloun/auto-api/blob/master/tools/definitions.yaml"
    click TE "https://github.com/kaareloun/auto-api/blob/master/tools/exceptions.yaml"
    click RG "https://github.com/kaareloun/auto-api/tree/master/tools/rest-gen"
    click VSI "https://github.com/kaareloun/auto-api/blob/master/vehicle_status.yml"
    click CH "https://github.com/kaareloun/auto-api/blob/master/charging.yml"
    click CL "https://github.com/kaareloun/auto-api/blob/master/climate.yml"
    click DR "https://github.com/kaareloun/auto-api/blob/master/doors.yml"
    click EN "https://github.com/kaareloun/auto-api/blob/master/engine.yml"
    click LT "https://github.com/kaareloun/auto-api/blob/master/lights.yml"
    click WN "https://github.com/kaareloun/auto-api/blob/master/windows.yml"
    click DC "https://github.com/kaareloun/auto-api/blob/master/docs/_config.yml"
    click DI "https://github.com/kaareloun/auto-api/blob/master/docs/index.md"
    click SP "https://github.com/kaareloun/auto-api/blob/master/SPEC.md"
    click FM "https://github.com/kaareloun/auto-api/blob/master/failure_message.yml"
    click BR "https://github.com/kaareloun/auto-api/blob/master/browser.yml"
    click MB "https://github.com/kaareloun/auto-api/blob/master/mobile.yml"
    click MC "https://github.com/kaareloun/auto-api/blob/master/multi_command.yml"
    click PM "https://github.com/kaareloun/auto-api/blob/master/misc/permissions.yml"

    %% Styling
    classDef container fill:#e1f5fe,stroke:#01579b
    classDef system fill:#e8f5e9,stroke:#2e7d32
    classDef props fill:#fff3e0,stroke:#ff6f00
    classDef types fill:#f3e5f5,stroke:#7b1fa2
    classDef controller fill:#fce4ec,stroke:#c2185b
    classDef tools fill:#ede7f6,stroke:#4527a0
    classDef generator fill:#fff8e1,stroke:#ffa000
    classDef interface fill:#e8eaf6,stroke:#3f51b5
    classDef service fill:#e0f2f1,stroke:#00695c
    classDef protocol fill:#f1f8e9,stroke:#33691e
    classDef core fill:#e3f2fd,stroke:#1565c0
    classDef docs fill:#f9fbe7,stroke:#827717
    classDef integration fill:#fbe9e7,stroke:#d84315
    classDef error fill:#ffebee,stroke:#b71c1c
    classDef permissions fill:#f3e5f5,stroke:#6a1b9a
```
