# simsine/eos_upload architecture

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

- Interactive diagram: https://gitdiagram.com/simsine/eos_upload
- Repository: https://github.com/simsine/eos_upload

## Overview

1. **Overall shape**
   - This is a **Python/Streamlit** application packaged as the `atlantest` module.
   - The app is run locally through `streamlit_app.py`, with dependency management handled by **uv**.

2. **Runtime and entrypoint**
   - `streamlit_app.py` is the main launch target for Streamlit.
   - `run.sh` and `run.ps1` are thin wrappers around the same Streamlit startup command, intended for Linux/macOS and Windows respectively.

3. **Primary UI architecture**
   - The application is organized as a **multi-page Streamlit app**.
   - The page modules live under `atlantest/streamlit_pages/`, which suggests the UI is split into separate workflows rather than a single monolithic screen.

4. **Page-level subsystems**
   - The named pages indicate distinct functional areas:
     - `dc_test.py`
     - `eos_uploader.py`
     - `metrology.py`
     - `visual_inspection.py`
   - Architecturally, these look like independent workflow pages that likely share common UI scaffolding but serve different operational tasks.

5. **Shared UI foundation**
   - `atlantest/base_page.py` is the main shared abstraction.
   - This likely centralizes common page behavior such as layout, navigation, styling, validation, or access to shared services.

6. **Static assets boundary**
   - `atlantest/static/` is the repository’s asset boundary for non-code resources.
   - In a Streamlit app this usually means images, logos, or other UI assets used by one or more pages.

7. **External system integrations**
   - The README makes it clear the app integrates with **ITkdb** and **ITkpd**, and also needs access to **EOS**.
   - These are the main external dependencies that materially affect the architecture; the UI is not self-contained.

8. **Authentication/configuration flow**
   - The app depends on environment variables `ITKDB_ACCESS_CODE1` and `ITKDB_ACCESS_CODE2`.
   - That means access to external systems is configured out-of-band from the UI and injected at runtime via the shell/environment.

9. **Likely data flow**
   - User opens the Streamlit app locally.
   - The selected page collects operational input or inspection/test data.
   - That page then interacts with external services such as ITkdb/ITkpd, and the EOS uploader page likely handles artifact transfer or publishing.
   - Results are then reflected back in the Streamlit UI.

10. **Packaging and dependency management**
    - `pyproject.toml` and `uv.lock` define the project environment and dependency set.
    - This repo is designed to be reproducible through uv rather than manual virtualenv/package management.

11. **What is not present**
    - There is no evidence of a separate backend server, database, or message queue in the repository layout.
    - The architecture appears to be a **single-process UI app** with direct integrations to external enterprise systems.

12. **Diagramming takeaway**
    - A good architecture diagram would show:
      - Local user/browser UI at the top
      - Streamlit app entrypoint in the middle
      - Shared page base class plus four functional pages beneath it
      - External integrations to ITkdb, ITkpd, and EOS on the side
      - Environment variables and uv-based launch/configuration as operational dependencies

Main entry points: [`streamlit_app.py`](https://github.com/simsine/eos_upload/blob/main/streamlit_app.py) (App entry), [`atlantest/base_page.py`](https://github.com/simsine/eos_upload/blob/main/atlantest/base_page.py) (Base page), [`atlantest/streamlit_pages/dc_test.py`](https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/dc_test.py) (DC test), [`atlantest/streamlit_pages/eos_uploader.py`](https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/eos_uploader.py) (EOS upload)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime"]
  node_browser(("Browser<br/>client"))
  node_streamlit_app["App entry<br/>streamlit entrypoint<br/>[streamlit_app.py]"]
  node_run_sh["Linux launch<br/>shell wrapper<br/>[run.sh]"]
  node_run_ps1["Windows launch<br/>powershell wrapper<br/>[run.ps1]"]
end

subgraph group_ui["UI"]
  node_base_page["Base page<br/>shared page base<br/>[base_page.py]"]
  node_dc_test["DC test<br/>page<br/>[dc_test.py]"]
  node_eos_uploader["EOS upload<br/>page<br/>[eos_uploader.py]"]
  node_metrology["Metrology<br/>page<br/>[metrology.py]"]
  node_visual_inspection["Visual inspect<br/>page"]
  node_static_assets["Static assets"]
end

subgraph group_external["External systems"]
  node_itkdb[("ITkdb<br/>external service")]
  node_itkpd[("ITkpd<br/>external service")]
  node_eos[("EOS<br/>storage system")]
  node_env_vars{{"ITkdb creds<br/>runtime config"}}
end

subgraph group_ops["Operations"]
  node_pyproject["Project config<br/>dependency config<br/>[pyproject.toml]"]
  node_uv_lock["Lockfile<br/>dependency lock<br/>[uv.lock]"]
  node_uv{{"uv<br/>package manager"}}
end

node_browser -->|"uses"| node_streamlit_app
node_run_sh -->|"starts"| node_streamlit_app
node_run_ps1 -->|"starts"| node_streamlit_app
node_uv -->|"runs"| node_streamlit_app
node_pyproject -.->|"pins"| node_uv_lock
node_pyproject -.->|"configures"| node_uv
node_streamlit_app -->|"loads"| node_base_page
node_streamlit_app -->|"routes"| node_dc_test
node_streamlit_app -->|"routes"| node_eos_uploader
node_streamlit_app -->|"routes"| node_metrology
node_streamlit_app -->|"routes"| node_visual_inspection
node_base_page -->|"shared with"| node_dc_test
node_base_page -->|"shared with"| node_eos_uploader
node_base_page -->|"shared with"| node_metrology
node_base_page -->|"shared with"| node_visual_inspection
node_dc_test -->|"integrates"| node_itkdb
node_dc_test -->|"integrates"| node_itkpd
node_eos_uploader -->|"uploads to"| node_eos
node_eos_uploader -->|"integrates"| node_itkdb
node_metrology -->|"integrates"| node_itkdb
node_metrology -->|"integrates"| node_itkpd
node_visual_inspection -->|"integrates"| node_itkdb
node_visual_inspection -->|"integrates"| node_itkpd
node_env_vars -.->|"authenticates"| node_itkdb
node_streamlit_app -.->|"uses"| node_static_assets

click node_streamlit_app "https://github.com/simsine/eos_upload/blob/main/streamlit_app.py"
click node_run_sh "https://github.com/simsine/eos_upload/blob/main/run.sh"
click node_run_ps1 "https://github.com/simsine/eos_upload/blob/main/run.ps1"
click node_base_page "https://github.com/simsine/eos_upload/blob/main/atlantest/base_page.py"
click node_dc_test "https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/dc_test.py"
click node_eos_uploader "https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/eos_uploader.py"
click node_metrology "https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/metrology.py"
click node_visual_inspection "https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/visual_inspection.py"
click node_static_assets "https://github.com/simsine/eos_upload/tree/main/atlantest/static"
click node_pyproject "https://github.com/simsine/eos_upload/blob/main/pyproject.toml"
click node_uv_lock "https://github.com/simsine/eos_upload/blob/main/uv.lock"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_browser,node_streamlit_app,node_run_sh,node_run_ps1 toneBlue
class node_base_page,node_dc_test,node_eos_uploader,node_metrology,node_visual_inspection,node_static_assets toneAmber
class node_itkdb,node_itkpd,node_eos,node_env_vars toneMint
class node_pyproject,node_uv_lock,node_uv toneRose
```

## Components

### Runtime

Local launch and Streamlit execution boundary.

- **Browser**: client · Local user interacting with the Streamlit UI.
- [App entry](https://github.com/simsine/eos_upload/blob/main/streamlit_app.py): streamlit entrypoint · Main Streamlit launch target. · `streamlit_app.py`
- [Linux launch](https://github.com/simsine/eos_upload/blob/main/run.sh): shell wrapper · Thin shell wrapper for starting the app. · `run.sh`
- [Windows launch](https://github.com/simsine/eos_upload/blob/main/run.ps1): powershell wrapper · Thin PowerShell wrapper for starting the app. · `run.ps1`

### UI

Shared page framework and Streamlit workflows.

- [Base page](https://github.com/simsine/eos_upload/blob/main/atlantest/base_page.py): shared page base · Common page abstraction shared by Streamlit workflows. · `atlantest/base_page.py`
- [DC test](https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/dc_test.py): page · Streamlit workflow for DC test operations. · `atlantest/streamlit_pages/dc_test.py`
- [EOS upload](https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/eos_uploader.py): page · Workflow for sending artifacts to EOS. · `atlantest/streamlit_pages/eos_uploader.py`
- [Metrology](https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/metrology.py): page · Workflow for measurement and inspection tasks. · `atlantest/streamlit_pages/metrology.py`
- [Visual inspect](https://github.com/simsine/eos_upload/blob/main/atlantest/streamlit_pages/visual_inspection.py): page · Workflow for visual inspection tasks. · `atlantest/streamlit_pages/visual_inspection.py`
- [Static assets](https://github.com/simsine/eos_upload/tree/main/atlantest/static): assets · Repository boundary for UI resources and images. · `atlantest/static`

### External systems

Enterprise services and runtime configuration used by the app.

- **ITkdb**: external service · External database or service integration.
- **ITkpd**: external service · External production-data integration.
- **EOS**: storage system · External storage used for upload and retrieval.
- **ITkdb creds**: runtime config · Environment-provided access codes for ITkdb.

### Operations

Packaging, dependency, and asset support.

- [Project config](https://github.com/simsine/eos_upload/blob/main/pyproject.toml): dependency config · Python project metadata and dependency definitions. · `pyproject.toml`
- [Lockfile](https://github.com/simsine/eos_upload/blob/main/uv.lock): dependency lock · Pinned dependency resolution for reproducible installs. · `uv.lock`
- **uv**: package manager · Tooling used to manage and run the environment.

## Connections

- Browser → App entry: uses · User opens the local Streamlit app in a browser.
- Linux launch → App entry: starts · Linux/macOS wrapper launches the app.
- Windows launch → App entry: starts · Windows wrapper launches the app.
- uv → App entry: runs · uv manages the environment used to execute the app.
- Project config → Lockfile: pins · Project metadata and resolved dependencies stay aligned.
- Project config → uv: configures · Project metadata defines the uv-managed environment.
- App entry → Base page: loads · Entry point wires shared page behavior.
- App entry → DC test: routes · App exposes the DC test page.
- App entry → EOS upload: routes · App exposes the EOS upload page.
- App entry → Metrology: routes · App exposes the metrology page.
- App entry → Visual inspect: routes · App exposes the visual inspection page.
- Base page → DC test: shared with · Common base behavior is reused by the page.
- Base page → EOS upload: shared with · Common base behavior is reused by the page.
- Base page → Metrology: shared with · Common base behavior is reused by the page.
- Base page → Visual inspect: shared with · Common base behavior is reused by the page.
- DC test → ITkdb: integrates · DC test workflow interacts with ITkdb.
- DC test → ITkpd: integrates · DC test workflow interacts with ITkpd.
- EOS upload → EOS: uploads to · Upload workflow pushes artifacts to EOS.
- EOS upload → ITkdb: integrates · Upload workflow references ITkdb data.
- Metrology → ITkdb: integrates · Metrology workflow reads or writes ITkdb data.
- Metrology → ITkpd: integrates · Metrology workflow references ITkpd data.
- Visual inspect → ITkdb: integrates · Visual inspection workflow reads or writes ITkdb data.
- Visual inspect → ITkpd: integrates · Visual inspection workflow references ITkpd data.
- ITkdb creds → ITkdb: authenticates · Access codes are injected at runtime for ITkdb access.
- App entry → Static assets: uses · The UI consumes shared static resources.
