# it-at-m/dave architecture

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

- Interactive diagram: https://gitdiagram.com/it-at-m/dave
- Repository: https://github.com/it-at-m/dave

## Overview

##### Project Overview
- DAVe is a full-stack application for commissioning, recording, and visualizing traffic counts.
- The project supports multiple portals (Data, Admin, Selfservice) that interface with one or more backend services.
- It leverages a modern stack including Java 21 with Spring Boot, ElasticSearch, PostgreSQL on the backend and Vue.js (with TypeScript, Vuetify, and Leaflet) on the frontend.
- There are clearly defined client interfaces and backend services with external systems (databases, search engines) that you need to include.

##### Main Components
a. Frontend Portals:
- Data Portal: Handles presentation and graphical representation of traffic counts.
- Admin Portal: Manages administrative tasks.
- Selfservice Portal: Provides user-side services.
(These might be represented as separate blocks or modules; note that each of these has a separate repository as mentioned in the README.)

b. Backend Service:
- The core service implemented in Java (Spring Boot based) which handles business logic, data processing, and REST API services.

c. External Systems:
- PostgreSQL: For relational data persistence.
- ElasticSearch: For high-performance searching and analyses.

d. Integration/Interfaces:
- A connection module/interface between the backend and external systems.
- Possibly a simple data pipeline or API interface for importing/exporting traffic count data.

##### Architectural Relationships & Interactions
- The Backend-Service interacts with PostgreSQL for transactional data and with ElasticSearch for indexing and search functionalities—show these interactions using direct connections.
- Internal data flows such as data received from portals being stored in the database, processed, and then made available for reporting or visualized charts.
- If applicable, note any integration points with internal services (such as EAI Reports, EAI GEO, and the still-under-construction EAI S3).

##### Final Recommendations
- Every component is clearly labeled with its name and role.
- Incorporate any architectural patterns visible (like separation of concerns between UI, logic, and data layers).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Frontend Portals Subgraph
    subgraph "Frontend Portals"
        DataPortal("Data Portal (Vue.js)"):::frontend
        AdminPortal("Admin Portal (Vue.js)"):::frontend
        SelfServicePortal("Selfservice Portal (Vue.js)"):::frontend
    end

    %% Backend & Services Subgraph
    subgraph "Backend & Services"
        BackendService("Backend-Service (Java/Spring Boot)"):::backend
        DockerCompose("Docker Compose Config"):::integration
        EAIReports("EAI Reports"):::backend
        EAIGEO("EAI GEO"):::backend
        EAIS3("EAI S3 (Under Construction)"):::backend
    end

    %% External Systems Subgraph
    subgraph "External Systems"
        PostgreSQL("PostgreSQL Database"):::database
        ElasticSearch("ElasticSearch Cluster"):::database
    end

    %% Sample Traffic Count Data Subgraph
    subgraph "Sample Traffic Count Data"
        Zaehlung("zaehlung.csv"):::external
        Messwerte("messwerte.json"):::external
    end

    %% Connections from Frontend to Backend
    DataPortal -->|"REST_API"| BackendService
    AdminPortal -->|"REST_API"| BackendService
    SelfServicePortal -->|"REST_API"| BackendService

    %% Backend-Service interactions
    BackendService -->|"stores"| PostgreSQL
    BackendService -->|"indexes"| ElasticSearch
    BackendService -->|"integrates"| EAIReports
    BackendService -->|"integrates"| EAIGEO
    BackendService -->|"integrates"| EAIS3
    BackendService -->|"deployment"| DockerCompose

    %% Docker Compose linking external systems
    DockerCompose -->|"configures"| PostgreSQL
    DockerCompose -->|"configures"| ElasticSearch

    %% Sample Data imports
    Zaehlung -->|"data_import"| BackendService
    Messwerte -->|"data_import"| BackendService

    %% Click Events
    click DataPortal "https://github.com/it-at-m/dave/blob/main/README.md"
    click AdminPortal "https://github.com/it-at-m/dave/blob/main/README.md"
    click SelfServicePortal "https://github.com/it-at-m/dave/blob/main/README.md"
    click DockerCompose "https://github.com/it-at-m/dave/blob/main/docs/src/docker-compose.md"
    click Zaehlung "https://github.com/it-at-m/dave/blob/main/examples/zaehlung.csv"
    click Messwerte "https://github.com/it-at-m/dave/blob/main/examples/messwerte.json"

    %% Styles
    classDef frontend fill:#b3d9ff,stroke:#00509e,stroke-width:2px;
    classDef backend fill:#b3ffb3,stroke:#008000,stroke-width:2px;
    classDef database fill:#ffe6cc,stroke:#ff8c1a,stroke-width:2px;
    classDef integration fill:#ffcccc,stroke:#cc0000,stroke-width:2px;
    classDef external fill:#ffffcc,stroke:#d6d600,stroke-width:2px;
```
