# eooce/choreo-2go architecture

> Architecture diagram of the GitHub repository eooce/choreo-2go, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eooce/choreo-2go
- Repository: https://github.com/eooce/choreo-2go

## Overview

##### Project type and purpose
- The top‐level Dockerfile + GitHub Actions workflow suggests it’s built, tested, and auto-deployed via CI/CD.

##### File structure
- `.github/workflows/auto-deploy.yml` → CI/CD pipeline for build + deploy
- `Dockerfile` → container image definition
- `files/`
- `package.json` + `index.js` → Node.js application root
- `config.json` → runtime configuration
- `server/` → backend API routes & controllers
- `switch/` → business-logic module or feature-toggle routing
- `web/` → frontend code (static assets or a Single-Page App)

##### Final advice
- Infrastructure touchpoints (CI/CD, container registry, target runtime).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "CI/CD Pipeline" 
        CI["CI/CD Pipeline"]:::ci
    end
    CI -->|"triggers build"| DockerDef["Container Definition\n(Dockerfile)"]:::infra
    DockerDef -->|"builds image"| Image["Container Image"]:::infra
    Image -->|"deployed via CI/CD"| Container["Running Container"]:::infra

    subgraph "Runtime Environment"
        Container --> Frontend["Frontend\n(files/web/)"]:::frontend
        Container --> API["API Server\n(files/server/)"]:::backend
        Frontend -->|serves assets via HTTP| Browser["Browser (Client)"]:::external
        Browser -->|AJAX/REST calls| API
        API -->|"invokes"| Switch["Business-Logic Module\n(files/swith/)"]:::module
        API -->|"reads config"| Config["Runtime Configuration\n(files/config.json)"]:::config
        API -->|"uses deps"| Package["Dependencies\n(files/package.json)"]:::config
        API -->|"entrypoint"| Entrypoint["Application Entrypoint\n(files/index.js)"]:::config
        API -->|integrates with| External["External Services\n(DB, 3rd-party)"]:::external
    end

    click CI "https://github.com/eooce/choreo-2go/blob/main/.github/workflows/auto-deploy.yml"
    click DockerDef "https://github.com/eooce/choreo-2go/tree/main/Dockerfile"
    click Frontend "https://github.com/eooce/choreo-2go/tree/main/files/web/"
    click API "https://github.com/eooce/choreo-2go/tree/main/files/server/"
    click Switch "https://github.com/eooce/choreo-2go/tree/main/files/swith/"
    click Config "https://github.com/eooce/choreo-2go/blob/main/files/config.json"
    click Package "https://github.com/eooce/choreo-2go/blob/main/files/package.json"
    click Entrypoint "https://github.com/eooce/choreo-2go/blob/main/files/index.js"

    classDef ci fill:#f9f,stroke:#333,stroke-width:1px;
    classDef infra fill:#ccf,stroke:#333,stroke-width:1px;
    classDef frontend fill:#cfc,stroke:#333,stroke-width:1px;
    classDef backend fill:#fcf,stroke:#333,stroke-width:1px;
    classDef module fill:#ffc,stroke:#333,stroke-width:1px;
    classDef config fill:#cff,stroke:#333,stroke-width:1px;
    classDef external fill:#eee,stroke:#333,stroke-width:1px;
```
