# felixkraas/iski2gpx architecture

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

- Interactive diagram: https://gitdiagram.com/felixkraas/iski2gpx
- Repository: https://github.com/felixkraas/iski2gpx

## Overview

##### Project Type and Purpose
- The project is an open-source tool designed to collect iSki JSON formatted data and convert it into GPX (GPS Exchange Format).
- It is organized into multiple modules, with one component focused on converting the data (iSki2gpx.Converter) and another on scraping (iSki2gpx.Scraper).

##### Analyzing the File Structure
- At the top level you have configuration and build files (.dockerignore, .editorconfig, .gitignore, LICENSE.md, README.md, solution file iSki2gpx.sln).
- The src directory contains:
– The Converter component for transformation from iSki format to GPX. It includes:
- A GPX submodule with separate Builder classes (GpxBuilder, GpxMetadataBuilder, GpxTrackBuilder, GpxTrackPointBuilder, GpxTrackSegmentBuilder) that construct various parts of the GPX document.
- GPX Models representing the elements (GpxElement, GpxMetadata, GpxTrack, GpxTrackPoint, GpxTrackSegment).
- A Writer module responsible for outputting the GPX file.
- An iSki module containing Models (iSkiTrack, iSkiTrackPoint) and Reader components (iSkiReader, iSkiPointsListConverter) to interpret the JSON format.
- Some utility functions (e.g., DateTimeUtil).
– The Scraper component that likely fetches or collects iSki JSON data from external sources.
- The tests directory mirrors these two components, ensuring that both conversion and scraping functionalities are well-tested.

- Scraper Module: “iSki2gpx.Scraper”
- Data Pipeline within Converter:
- “iSki Reader” (parsing JSON to iSki Models)
- “GPX Builder Subsystem”:
- “GpxBuilder”
- “GpxMetadataBuilder”
- “GpxTrackBuilder”
- “GpxTrackPointBuilder”
- “GpxTrackSegmentBuilder”
- “GPX Writer” (output generation)
- “Utility Functions” (DateTimeUtil etc.)
- Test Layer: Represent testing modules associated with each component.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% External Systems
    A["iSki JSON Source"]:::external

    %% Scraper Layer
    B["iSki2gpx.Scraper"]:::scraper

    %% Conversion Layer
    C["iSki2gpx.Converter"]:::converter
    subgraph "iSki Parsing"
        D["iSki Reader"]:::parser
        P["iSki Models"]:::model
    end
    subgraph "GPX Building"
        E["GpxBuilder"]:::builder
        F["GpxMetadataBuilder"]:::builder
        G["GpxTrackBuilder"]:::builder
        H["GpxTrackPointBuilder"]:::builder
        I["GpxTrackSegmentBuilder"]:::builder
    end
    J["GPX Writer"]:::writer
    K["Utility Functions"]:::utility
    L["GPX Models"]:::model

    %% Test Layer
    subgraph "Testing"
        M["Converter Tests"]:::test
        N["Scraper Tests"]:::test
    end

    %% GPX Output
    O["GPX Output File"]:::output

    %% Data Flow
    A -->|"send_JSON"| B
    B -->|"provide_JSON"| D
    D -->|"create_iSkiModels"| P
    P -->|"pass_iSkiModels"| E
    D -->|"convert_to_GPX"| E
    E -->|"utilizes"| F
    E -->|"utilizes"| G
    E -->|"utilizes"| H
    E -->|"utilizes"| I
    E -->|"builds_GPX_doc"| J
    K -->|"assist_iSkiReader"| D
    K -->|"assist_GPXBuilder"| E
    K -->|"assist_GPXWriter"| J
    J -->|"outputs_GPX"| O
    M -->|"tests_converter"| C
    N -->|"tests_scraper"| B

    %% Click Events
    click C "https://github.com/felixkraas/iski2gpx/blob/master/src/iSki2gpx.Converter"
    click E "https://github.com/felixkraas/iski2gpx/blob/master/src/iSki2gpx.Converter/GPX/Builder/GpxBuilder.cs"
    click F "https://github.com/felixkraas/iski2gpx/blob/master/src/iSki2gpx.Converter/GPX/Builder/GpxMetadataBuilder.cs"
    click G "https://github.com/felixkraas/iski2gpx/blob/master/src/iSki2gpx.Converter/GPX/Builder/GpxTrackBuilder.cs"
    click H "https://github.com/felixkraas/iski2gpx/blob/master/src/iSki2gpx.Converter/GPX/Builder/GpxTrackPointBuilder.cs"
    click I "https://github.com/felixkraas/iski2gpx/blob/master/src/iSki2gpx.Converter/GPX/Builder/GpxTrackSegmentBuilder.cs"
    click L "https://github.com/felixkraas/iski2gpx/tree/master/src/iSki2gpx.Converter/GPX/Models"
    click J "https://github.com/felixkraas/iski2gpx/blob/master/src/iSki2gpx.Converter/GPX/Writer/GpxWriter.cs"
    click K "https://github.com/felixkraas/iski2gpx/blob/master/src/iSki2gpx.Converter/Util/DateTimeUtil.cs"
    click D "https://github.com/felixkraas/iski2gpx/tree/master/src/iSki2gpx.Converter/iSki/Reader"
    click P "https://github.com/felixkraas/iski2gpx/tree/master/src/iSki2gpx.Converter/iSki/Models"
    click B "https://github.com/felixkraas/iski2gpx/blob/master/src/iSki2gpx.Scraper"
    click M "https://github.com/felixkraas/iski2gpx/blob/master/tests/iSki2gpx.Converter.Tests"
    click N "https://github.com/felixkraas/iski2gpx/blob/master/tests/iSki2gpx.Scraper.Tests"

    %% Styles
    classDef external fill:#f2f2f2,stroke:#333,stroke-width:2px;
    classDef scraper fill:#ffd1dc,stroke:#e53,stroke-width:2px;
    classDef converter fill:#d1ffd1,stroke:#333,stroke-width:2px;
    classDef parser fill:#d1e0ff,stroke:#333,stroke-width:2px;
    classDef builder fill:#f9e79f,stroke:#b7950b,stroke-width:2px;
    classDef writer fill:#f5b7b1,stroke:#c0392b,stroke-width:2px;
    classDef utility fill:#d5f5e3,stroke:#27ae60,stroke-width:2px;
    classDef model fill:#d6eaf8,stroke:#2980b9,stroke-width:2px;
    classDef test fill:#fad7a0,stroke:#e67e22,stroke-width:2px;
    classDef output fill:#f0f3f4,stroke:#7f8c8d,stroke-width:2px;
```
