# reape4er/geoai_web architecture

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

- Interactive diagram: https://gitdiagram.com/reape4er/geoai_web
- Repository: https://github.com/reape4er/geoai_web

## Overview

##### Project type and purpose
- From the root you have an app.py and a directory called vuemap/ that contains a Vue.js application with Leaflet mapping components.
- This is a full-stack web mapping app (“GEOAI_web”) where the Python backend (app.py) serves APIs or endpoints for GIS/AI processing, and the Vue/Vite frontend (vuemap/) provides the interactive map UI.

##### File structure
- Top-level:
- app.py – Python entry point (likely a Flask/FastAPI service).
- README.md, .gitignore, .gitattributes – project metadata.
- vuemap/:
- package.json, vite.config.js – front-end build config (Vite).
- index.html, main.js – front-end bootstrap.
- ESLint, Prettier, VSCode configs for code quality.

##### README
- The README only shows the placeholder title “GEOAI_web,” confirming minimal documentation. We infer architecture from code organization.

##### Elements
- Clear labels: “User Browser,” “Vue.js Frontend,” “Python API Service,” “Database/Storage,” “External AI Service.”
- Browser → Frontend assets (GET index.html, JS, CSS)
- Frontend → Backend (HTTP POST/GET /api/geojson)
- Backend ↔ Database / External Service

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Side
    subgraph "Client (Web Browser)"
        Browser["Web Browser"]:::client
        subgraph "Vue.js Frontend"
            RootDir["vuemap/"]:::frontend
            pkg["package.json"]:::config
            vite["vite.config.js"]:::config
            html["index.html"]:::frontend
            mainjs["main.js"]:::frontend
            subgraph "Components"
                LF["LeafletMap.vue"]:::frontend
                TM["ToolMenu.vue"]:::frontend
                MK["Marker_tool.vue"]:::frontend
                BX["Box_tool.vue"]:::frontend
                PR["Prompt_tool.vue"]:::frontend
                GJ["GeojsonExporter.vue"]:::frontend
                LC["LayerControl.vue"]:::frontend
            end
            store["mapStore.js"]:::store
            patch["leaflet-draw-patch.js"]:::util
        end
    end

    %% Server Side
    subgraph "Server"
        API["Python API Service"]:::backend
        DB["Database/File Store"]:::datastore
    end

    %% External Services
    subgraph "External Services"
        ExternalAI["External AI Service"]:::external
        ExternalMapAPI["GIS Tile Server"]:::external
    end

    %% Data Flows
    Browser -->|GET static assets| html
    Browser -->|GET config/build| pkg
    Browser -->|GET build config| vite
    html --> mainjs
    mainjs --> LF
    mainjs --> TM
    mainjs --> MK
    mainjs --> BX
    mainjs --> PR
    mainjs --> GJ
    mainjs --> LC
    mainjs --> store
    mainjs --> patch
    Browser -->|interacts with UI| LF
    Browser -->|uses tools| TM
    Browser -->|uses tools| MK
    Browser -->|uses tools| BX
    Browser -->|uses tools| PR
    Browser -->|uses tools| GJ
    Browser -->|uses tools| LC

    Browser -->|REST API calls| API
    API -->|read/write| DB
    API -->|AI inference| ExternalAI
    API -->|tile requests| ExternalMapAPI

    %% Click Events
    click API "https://github.com/reape4er/geoai_web/blob/main/app.py"
    click RootDir "https://github.com/reape4er/geoai_web/tree/main/vuemap/"
    click pkg "https://github.com/reape4er/geoai_web/blob/main/vuemap/package.json"
    click vite "https://github.com/reape4er/geoai_web/blob/main/vuemap/vite.config.js"
    click html "https://github.com/reape4er/geoai_web/blob/main/vuemap/index.html"
    click mainjs "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/main.js"
    click LF "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/components/LeafletMap.vue"
    click TM "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/components/ToolMenu.vue"
    click MK "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/components/Marker_tool.vue"
    click BX "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/components/Box_tool.vue"
    click PR "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/components/Prompt_tool.vue"
    click GJ "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/components/GeojsonExporter.vue"
    click LC "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/components/LayerControl.vue"
    click store "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/stores/mapStore.js"
    click patch "https://github.com/reape4er/geoai_web/blob/main/vuemap/src/utils/leaflet-draw-patch.js"

    %% Styles
    classDef client fill:#f0f8ff,stroke:#333,stroke-width:1px
    classDef frontend fill:#add8e6,stroke:#333,stroke-width:1px
    classDef backend fill:#ffb6c1,stroke:#333,stroke-width:1px
    classDef datastore fill:#98fb98,stroke:#333,stroke-width:1px
    classDef external fill:#ffe4b5,stroke:#333,stroke-width:1px
    classDef config fill:#e0e0ff,stroke:#333,stroke-width:1px
    classDef store fill:#d3ffd3,stroke:#333,stroke-width:1px
    classDef util fill:#fffacd,stroke:#333,stroke-width:1px
```
