# msorri/kenenonvastuu architecture

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

- Interactive diagram: https://gitdiagram.com/msorri/kenenonvastuu
- Repository: https://github.com/msorri/kenenonvastuu

## Overview

##### Project Type Analysis
This is a single-page web application built with Vue.js that serves a specific purpose: displaying train timetables and attributing delays to responsible stakeholders in the Finnish railway system.

##### Key Components

Frontend Architecture:
- Vue.js Application Core
- Router Layer (src/router)
- View Components (src/views)
- Static Data Layer (src/assets/data)

External Integrations:
- Train Timetable Data Source (likely an external API)
- Static Delay Attribution Data (JSON files)

**┌─ Client Browser ─────────────────────────────────┐**

- ┌─ Vue.js Application ──────────────────────┐   │

- ┌─ Router ─────┐    ┌─ Views ────────┐  │   │
- /            │    │ Home.vue       │  │   │
- /causes      │──▶│ Causes.vue     │  │   │
- /train       │    │ Train.vue      │  │   │
- ┘    └───────────────┘  │   │
- ▲                  ▲           │   │

- ┌─ Static Data ───────────┘           │   │
- category-exp.json                   │   │
- detailedCategory-exp.json           │   │
- thirdCategory-exp.json              │   │
- ┘ │   │
- ┘│   │
- ┘

##### Important Elements to Highlight

a) Data Flow:
- How the static JSON files (delay attribution data) are consumed by the views
- Routing flow between different views
- External API calls for train timetable data

b) Component Hierarchy:
- Vue.js application structure
- Relationship between routes and views
- Where static data is loaded and used

##### Specific Implementation Notes

- The static nature of the delay attribution data (JSON files)
- The view components that handle different functionalities (Home, Causes, Train)
- The routing system that manages navigation between views

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client["Client Browser"]
        subgraph VueApp["Vue.js Application"]
            AppCore["Application Core"]:::core
            Router["Router Layer"]:::router
            
            subgraph Views["View Components"]
                Home["Home View"]:::view
                Causes["Causes View"]:::view
                Train["Train View"]:::view
            end
            
            subgraph StaticData["Static Data Layer"]
                Category["Category Data"]:::data
                DetailedCategory["Detailed Category Data"]:::data
                ThirdCategory["Third Category Data"]:::data
            end
            
            AppCore --> Router
            Router --> Home
            Router --> Causes
            Router --> Train
            
            Category --> Home
            Category --> Causes
            Category --> Train
            DetailedCategory --> Home
            DetailedCategory --> Causes
            DetailedCategory --> Train
            ThirdCategory --> Home
            ThirdCategory --> Causes
            ThirdCategory --> Train
        end
    end
    
    %% Styling
    classDef core fill:#4299e1,stroke:#2b6cb0,stroke-width:2px
    classDef router fill:#48bb78,stroke:#2f855a,stroke-width:2px
    classDef view fill:#ed8936,stroke:#c05621,stroke-width:2px
    classDef data fill:#9f7aea,stroke:#6b46c1,stroke-width:2px
    
    %% Click events
    click AppCore "https://github.com/msorri/kenenonvastuu/blob/master/src/main.js"
    click Router "https://github.com/msorri/kenenonvastuu/blob/master/src/router/index.js"
    click Home "https://github.com/msorri/kenenonvastuu/blob/master/src/views/Home.vue"
    click Causes "https://github.com/msorri/kenenonvastuu/blob/master/src/views/Causes.vue"
    click Train "https://github.com/msorri/kenenonvastuu/blob/master/src/views/Train.vue"
    click Category "https://github.com/msorri/kenenonvastuu/blob/master/src/assets/data/category-exp.json"
    click DetailedCategory "https://github.com/msorri/kenenonvastuu/blob/master/src/assets/data/detailedCategory-exp.json"
    click ThirdCategory "https://github.com/msorri/kenenonvastuu/blob/master/src/assets/data/thirdCategory-exp.json"
    
    %% Legend
    subgraph Legend
        CoreLegend["Application Core"]:::core
        RouterLegend["Router Component"]:::router
        ViewLegend["View Component"]:::view
        DataLegend["Data Store"]:::data
    end
```
