# prime-slam/sova architecture

> Architecture diagram of the GitHub repository prime-slam/sova, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prime-slam/sova
- Repository: https://github.com/prime-slam/sova

## Overview

##### Main Components Identification

a. Core Processing Pipeline:
- Pipeline Module (Central Orchestrator)
- Sequential Pipeline Implementation
- Configuration System

b. Processing Modules:
- Subdivider Module
- Segmenter Module
- Backend Module
- Filter Module

c. Utility Components:
- Dataset Readers
- Type System
- Utils

**[Input Data Sources]**

- ▼
**[Configuration System]**

- ▼
**[Sequential Pipeline]────────────────────┐**

- ▼                                   ▼
**[Processing Chain]              [Utility Services]**
- Filter                     ├── Dataset Readers
- Subdivider                 ├── Type System
- Segmenter                  └── Pose ReadWriter
- Backend

##### Component Details

Each major component should show:

a. Pipeline:
- Configuration handling
- Sequential processing flow
- Plugin system for different implementations

b. Processing Modules:
- Available implementations (e.g., CAPE, RANSAC for segmenters)
- Interface definitions
- Data flow between modules

c. Utilities:
- Dataset support (KITTI, NuScenes, Hilti)
- Type system integration
- Configuration management

##### Implementation Notes

- Modular architecture allowing easy extension
- Clear separation of concerns between components
- Plugin-based system for different implementations
- Configuration-driven pipeline setup

##### Data Flow Representation

Following flows:
**Raw Data → Filter → Subdivider → Segmenter → Backend → Results**

With parallel flows for:
- Configuration management
- Type checking
- Dataset reading

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Input
        RD[Raw Data]:::data
    end

    subgraph "Core Pipeline"
        CF["Configuration System"]:::core
        SP["Sequential Pipeline"]:::core
        PM["Pipeline Module"]:::core
    end

    subgraph "Processing Modules"
        FM["Filter Module"]:::processing
        SM["Subdivider Module"]:::processing
        SG["Segmenter Module"]:::processing
        BM["Backend Module"]:::processing
    end

    subgraph "Utility Services"
        TS["Type System"]:::utility
        DR["Dataset Readers"]:::utility
        PR["Pose ReadWriter"]:::utility

        subgraph "Dataset Support"
            KT["KITTI"]:::dataset
            NS["NuScenes"]:::dataset
            HT["Hilti"]:::dataset
        end
    end

    %% Data Flow
    RD --> CF
    CF --> SP
    SP --> PM
    PM --> FM
    FM --> SM
    SM --> SG
    SG --> BM

    %% Utility Connections
    DR --> FM
    TS -.-> PM
    PR -.-> BM
    
    %% Dataset Connections
    DR --> KT
    DR --> NS
    DR --> HT

    %% Click Events
    click CF "https://github.com/prime-slam/sova/tree/main/sova/pipeline/configuration/"
    click SP "https://github.com/prime-slam/sova/blob/main/sova/pipeline/sequential_pipeline.py"
    click PM "https://github.com/prime-slam/sova/blob/main/sova/pipeline/pipeline.py"
    click FM "https://github.com/prime-slam/sova/tree/main/sova/filter/"
    click SM "https://github.com/prime-slam/sova/tree/main/sova/subdivider/"
    click SG "https://github.com/prime-slam/sova/tree/main/sova/segmenter/"
    click BM "https://github.com/prime-slam/sova/tree/main/sova/backend/"
    click TS "https://github.com/prime-slam/sova/tree/main/sova/typing/"
    click DR "https://github.com/prime-slam/sova/tree/main/sova/utils/dataset_reader/"
    click PR "https://github.com/prime-slam/sova/blob/main/sova/utils/pose_readwriter.py"
    click KT "https://github.com/prime-slam/sova/blob/main/sova/utils/dataset_reader/kitti.py"
    click NS "https://github.com/prime-slam/sova/blob/main/sova/utils/dataset_reader/nuscenes.py"
    click HT "https://github.com/prime-slam/sova/blob/main/sova/utils/dataset_reader/hilti.py"

    %% Styling
    classDef core fill:#2196F3,stroke:#1565C0,color:white
    classDef processing fill:#4CAF50,stroke:#2E7D32,color:white
    classDef utility fill:#FFC107,stroke:#FFA000,color:black
    classDef dataset fill:#90A4AE,stroke:#546E7A,color:white
    classDef data fill:#E0E0E0,stroke:#9E9E9E,color:black

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[Processing Modules]:::processing
        L3[Utility Services]:::utility
        L4[Dataset Components]:::dataset
        L5[Data Sources]:::data
    end
```
