# infographicsuo/beyondtoxics architecture

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

- Interactive diagram: https://gitdiagram.com/infographicsuo/beyondtoxics
- Repository: https://github.com/infographicsuo/beyondtoxics

## Overview

##### Project type and purpose
- From the file tree and README (“BeyondToxics”), this is a static, client-side web application (“FERNS” folder) that visualizes environmental data (JSON files for counties and chemicals) in the browser.

##### File structure
- Top level:
- .gitignore
- README.md
- FERNS/ (all of the front-end code and data)
- FERNS/ contents:
- index.html – entry point
- ferns.js, styles.js – JavaScript modules
- ferns.css – styling
- OR_COUNTY.json, chemicals.json – static data sets
- No build scripts or server code: implies a simple static-site deployment.

##### Key insights from README
- Project name only (“BeyondToxics”) with no further tech stack notes, confirming a minimal client-only app.
- We can infer that a static file host or CDN is the intended deployment target.

##### Main components
a. User’s Web Browser (Client)
- Loads index.html
- Executes ferns.js and styles.js
b. Static File Host / CDN
c. (Optional) External Map API or Analytics Service
- If the app integrates any third-party map or telemetry—display as an external service node

##### Architectural patterns & principles
- Static SPA (Single-Page Application)
- Unidirectional data flow: JS fetches data → renders views
- Separation of concerns: HTML for structure, CSS for styling, JS for logic/data

##### Technologies & libraries
- Core: HTML5, vanilla JavaScript (ES modules), CSS
- Data format: JSON
- Deployment: any static file host or CDN (GitHub Pages, Netlify, S3, etc.)

- host1 [label="FERNS Assets"]
- }

##### Final advice
- Be very detailed: break out the JS modules, CSS, data files if needed.
- Keep it simple: static host → client → data flow is the core.

## Diagram (Mermaid)

```mermaid
flowchart TD
    classDef client fill:#a2d5f2,stroke:#000
    classDef static fill:#98d9a6,stroke:#000
    classDef file fill:#cee3f8,stroke:#000
    classDef js fill:#f6d565,stroke:#000
    classDef css fill:#f5a8a8,stroke:#000
    classDef data fill:#f2e394,stroke:#000
    classDef external fill:#d3b8ae,stroke:#000

    Browser["Browser (Client)"]:::client

    subgraph "Static File Host / CDN"
        direction TB
        AssetsFolder["FERNS Assets"]:::static
        subgraph "FERNS/"
            direction TB
            Index["index.html"]:::file
            JSMain["ferns.js"]:::js
            JSStyle["styles.js"]:::js
            CSS["ferns.css"]:::css
            CountyJSON["OR_COUNTY.json"]:::data
            ChemJSON["chemicals.json"]:::data
        end
        Icons["icons/"]:::static
    end

    External["External Map/Analytics Service"]:::external

    Browser -->|"requests assets"| AssetsFolder
    Browser -->|"executes"| JSMain
    Browser -->|"executes"| JSStyle
    JSMain -->|"fetches data"| CountyJSON
    JSMain -->|"fetches data"| ChemJSON
    Browser -->|"loads icons"| Icons
    Browser -->|"sends telemetry"| External

    click Index "https://github.com/infographicsuo/beyondtoxics/blob/main/FERNS/index.html"
    click JSMain "https://github.com/infographicsuo/beyondtoxics/blob/main/FERNS/ferns.js"
    click JSStyle "https://github.com/infographicsuo/beyondtoxics/blob/main/FERNS/styles.js"
    click CSS "https://github.com/infographicsuo/beyondtoxics/blob/main/FERNS/ferns.css"
    click CountyJSON "https://github.com/infographicsuo/beyondtoxics/blob/main/FERNS/OR_COUNTY.json"
    click ChemJSON "https://github.com/infographicsuo/beyondtoxics/blob/main/FERNS/chemicals.json"
    click Icons "https://github.com/infographicsuo/beyondtoxics/tree/main/icons/"
    click AssetsFolder "https://github.com/infographicsuo/beyondtoxics/tree/main/FERNS/"
```
