# county-of-simcoe-gis/simcoecountydeploymentguide architecture

> Architecture diagram of the GitHub repository county-of-simcoe-gis/simcoecountydeploymentguide, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/county-of-simcoe-gis/simcoecountydeploymentguide
- Repository: https://github.com/county-of-simcoe-gis/simcoecountydeploymentguide

## Overview

##### Client Layer
- Web Browser clients accessing the system
- Connection to the reverse proxy

##### Reverse Proxy Layer
- SimcoeCountyProxy component
- Routing rules to different services
- Port mappings

##### Web Applications Layer (Show as separate components)
- SimcoeCountyWebViewer (Main viewer)
- SimcoeCountyFeedback
- SimcoeCountyAppStats
- SimcoeCountyFeatureReports
- SimcoeCountyGeoServerLayerInfo
- Each running in Node.js containers managed by PM2

##### API Layer
- SimcoeCountyWebAPI (Core API service)
- Connections to databases
- Email service integration
- Google Captcha integration

##### GIS Services Layer
- GeoServer (v2.16.1)
- WFS service connections
- Layer Groups configuration

##### Database Layer
- PostgreSQL 12.1 with PostGIS
- Two separate databases:
- 'tabular' (non-spatial database)
- 'weblive' (PostGIS spatial database)

##### Background Services
- Python Search Processor
- Scheduled task connection
- Data flow for search indexing

##### Connection Types
- Double lines: Data replication/ETL processes

##### Infrastructure Details
- PM2 process management boundary
- Node.js runtime environment
- Python runtime for search processor

##### Labels For
- Port numbers
- Communication protocols (HTTP/HTTPS)
- Database connection types
- Service names and versions

- Authentication flow
- Data update process

Special Considerations:

##### Configuration dependencies between components

Level of Detail:
- A deployment view showing the physical server architecture

- Nested containers (to show PM2 management)
- Annotations (for version numbers and configuration notes)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Style definitions
    classDef client fill:#3498db,stroke:#2980b9,color:white
    classDef proxy fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef webapp fill:#2ecc71,stroke:#27ae60,color:white
    classDef api fill:#f1c40f,stroke:#f39c12,color:black
    classDef gis fill:#e67e22,stroke:#d35400,color:white
    classDef db fill:#e74c3c,stroke:#c0392b,color:white
    classDef bg fill:#9b59b6,stroke:#8e44ad,color:white

    %% Client Layer
    subgraph ClientLayer["Client Layer"]
        Browser["Web Browser Clients"]:::client
    end

    %% Reverse Proxy Layer
    subgraph ProxyLayer["Reverse Proxy Layer"]
        Proxy["SimcoeCountyProxy"]:::proxy
    end

    %% Web Applications Layer
    subgraph PM2["PM2 Process Management"]
        WebViewer["SimcoeCountyWebViewer"]:::webapp
        Feedback["SimcoeCountyFeedback"]:::webapp
        AppStats["SimcoeCountyAppStats"]:::webapp
        FeatureReports["SimcoeCountyFeatureReports"]:::webapp
        LayerInfo["SimcoeCountyGeoServerLayerInfo"]:::webapp
    end

    %% API Layer
    subgraph APILayer["API Layer"]
        WebAPI["SimcoeCountyWebAPI"]:::api
        EmailService["Email Service"]:::api
        Captcha["Google Captcha"]:::api
    end

    %% GIS Services Layer
    subgraph GISLayer["GIS Services Layer"]
        GeoServer["GeoServer v2.16.1"]:::gis
        WFS["WFS Services"]:::gis
    end

    %% Database Layer
    subgraph DBLayer["Database Layer"]
        PostgreSQL["PostgreSQL 12.1"]:::db
        TabularDB["Tabular DB"]:::db
        WebLiveDB["WebLive DB\nPostGIS"]:::db
    end

    %% Background Services
    subgraph BGServices["Background Services"]
        SearchProcessor["Python Search\nProcessor"]:::bg
    end

    %% Connections
    Browser --> Proxy
    Proxy --> WebViewer
    Proxy --> Feedback
    Proxy --> AppStats
    Proxy --> FeatureReports
    Proxy --> LayerInfo
    
    WebViewer --> WebAPI
    Feedback --> WebAPI
    AppStats --> WebAPI
    FeatureReports --> WebAPI
    LayerInfo --> WebAPI
    
    WebAPI --> EmailService
    WebAPI --> Captcha
    WebAPI --> GeoServer
    
    GeoServer --> WFS
    WFS --> PostgreSQL
    
    PostgreSQL --> TabularDB
    PostgreSQL --> WebLiveDB
    
    SearchProcessor --> PostgreSQL
    SearchProcessor --> GeoServer

    %% Legend
    subgraph Legend
        Client["Client Component"]:::client
        ProxyComp["Proxy Component"]:::proxy
        WebApp["Web Application"]:::webapp
        APIComp["API Component"]:::api
        GISComp["GIS Component"]:::gis
        DBComp["Database Component"]:::db
        BGComp["Background Component"]:::bg
    end
```
