# yangyangisgood/map-app architecture

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

- Interactive diagram: https://gitdiagram.com/yangyangisgood/map-app
- Repository: https://github.com/yangyangisgood/map-app

## Overview

##### Project type and purpose
- This is a front‐end–only, static web application (“築路app”) for planning and scoring pedestrian routes based on six indicators (平坦、快速、順暢、照明、美觀、綠化).
- It consists exclusively of static assets (HTML, CSS, JS, fonts, images) under a `public/` directory and relies on external services (Google Maps API) to compute and display routes.

##### File structure
- Top‐level files:
– `README.md` (project description and screenshots)
– `.gitignore`, `package.json` / `package-lock.json` (dependency metadata, though no custom Node.js code directory exists)
- `public/` directory structure:
– `public/index.html` — Home page
– `public/planning/` — Route planning pages and CSS
– `public/scoring/` — Route scoring pages, CSS, result page
– `public/css/`, `public/js/`, `public/bootstrap/`, `public/fonts/`, `public/image/` — Static style, script, framework, and asset resources
- There are no backend or server‐side directories, indicating a purely static hosting design.

##### README for additional insights
- No mention of an internal API or database—only client‐side logic and calls to Google Maps.
- Screenshots show map embed, user input forms, scoring interfaces: everything runs in the browser.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Entities
    Browser["User's Browser"]:::client

    %% CDN / Static Asset Host
    subgraph "CDN / Static Asset Host"
        subgraph "Front-end Modules"
            Home["Home Module<br>/index.html"]:::frontend
            Planning["Route Planning Module<br>/planning"]:::frontend
            Scoring["Route Scoring Module<br>/scoring"]:::frontend
        end
        subgraph "Assets"
            CSS["Global Styles<br>/css"]:::assets
            BS_CSS["Bootstrap CSS<br>/bootstrap/css"]:::assets
            JS["Global Scripts<br>/js"]:::assets
            BS_JS["Bootstrap JS<br>/bootstrap/js"]:::assets
            Fonts["Fonts<br>/fonts"]:::assets
            Images["Images<br>/image"]:::assets
        end
        Docs["Project Docs & Metadata"]:::docs
    end

    External["Google Maps API"]:::external
    Future["Future Backend API / Database"]:::future

    %% Connections
    Browser -->|"GET HTML/CSS/JS"| Home
    Browser --> Planning
    Browser --> Scoring
    Browser --> CSS
    Browser --> BS_CSS
    Browser --> JS
    Browser --> BS_JS
    Browser --> Fonts
    Browser --> Images
    Browser --> Docs
    Browser -->|"XHR/JSON"| External
    Browser -.->|"Possible POST"| Future

    %% Click Events
    click Home "https://github.com/yangyangisgood/map-app/blob/main/public/index.html"
    click Planning "https://github.com/yangyangisgood/map-app/tree/main/public/planning/"
    click Scoring "https://github.com/yangyangisgood/map-app/tree/main/public/scoring/"
    click CSS "https://github.com/yangyangisgood/map-app/tree/main/public/css/"
    click BS_CSS "https://github.com/yangyangisgood/map-app/tree/main/public/bootstrap/css/"
    click JS "https://github.com/yangyangisgood/map-app/tree/main/public/js/"
    click BS_JS "https://github.com/yangyangisgood/map-app/blob/main/public/bootstrap/js/bootstrap.js"
    click Fonts "https://github.com/yangyangisgood/map-app/tree/main/public/fonts/"
    click Images "https://github.com/yangyangisgood/map-app/tree/main/public/image/"
    click Docs "https://github.com/yangyangisgood/map-app/blob/main/README.md"

    %% Styles
    classDef client fill:#D6E9FE,stroke:#2B7CE9,color:#023B94;
    classDef frontend fill:#E8F6E8,stroke:#28A745,color:#155724;
    classDef assets fill:#FFF4E5,stroke:#FFC107,color:#856404;
    classDef external fill:#E2F0CB,stroke:#8BC34A,color:#33691E;
    classDef future fill:#F3E5F5,stroke:#9C27B0,color:#4A148C;
    classDef docs fill:#F0F0F0,stroke:#6C757D,color:#343A40;
```
