# cloud-strife-182000/carbon-finance-project-group-7 architecture

> Architecture diagram of the GitHub repository cloud-strife-182000/carbon-finance-project-group-7, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-02-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cloud-strife-182000/carbon-finance-project-group-7
- Repository: https://github.com/cloud-strife-182000/carbon-finance-project-group-7

## Overview

##### Project type and purpose
- This is a data‐visualization dashboard built as a single‐service Python app using Streamlit (a “full‐stack” in the sense of UI + backend in one process).
- Purpose: interactive exploration of ESG and green bond metrics in Indian capital markets.

##### File structure
- Top level:
- streamlit_app.py – main application entrypoint
- data/ – CSV data sources (ESG scores, green bond data)
- requirements.txt – Python dependencies
- .devcontainer/ – VS Code devcontainer config
- .github/ – repository governance (CODEOWNERS)
- No separate frontend vs backend directories: everything lives in one Python script.

##### README insights
- Tech stack: Python, Streamlit, Altair, Pandas (implied), CSV data files.
- Deployed live on Streamlit Community Cloud.
- Core functionality: data ingestion → transformation/filtering → Altair visualizations → Streamlit UI.

##### Main components & their relationships
a. Components
- User Browser (Client)
- Streamlit Server (Python process hosting streamlit_app.py)
- Data Storage (local CSV files under data/)
- Data Processing Layer (Pandas; filter, aggregate)
- Visualization Layer (Altair; charts, heatmaps, KPIs)
- Deployment/Dev Environment (Docker devcontainer, GitHub, Streamlit Cloud)
b. Interactions
1. User interacts with UI controls (year/sector filters) in Browser
2. Browser sends requests to Streamlit Server
3. Server loads CSVs from data/, applies Pandas transforms
4. Processed data fed into Altair charts
5. Streamlit sends rendered HTML/JS charts back to Browser
6. Code and environment config managed in GitHub & .devcontainer; deployed to Streamlit Cloud
c. Architectural patterns
- Monolithic, event‐driven data‐pipeline within a single process
- “MVC‐lite”: UI widgets (View) → Python callbacks (Controller) → Pandas (Model)
d. Key technologies
- Streamlit: handles routing of UI events and rendering
- Pandas: data transformation
- Altair: declarative visualization
- Docker devcontainer: reproducible local setup
- Streamlit Community Cloud: deployment host

##### Detail
- Every essential piece—data sources, code, UI, dev environment, and deployment endpoint

- A “Developer Workflow” lane (GitHub → Devcontainer → Local Streamlit Server)
- A “Production” lane (GitHub → CI/CD → Streamlit Community Cloud)
- Data stores (CSV files) feeding into the runtime block
- Browser client on the right receiving the rendered dashboard

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Developer Workflow"
        GitHubRepo["GitHub Repo"]:::external
        GH1[".github/CODEOWNERS"]:::external
        GH2[".gitignore"]:::external
        DevC["Devcontainer"]:::external
        LocalServer["Local Streamlit Server"]:::compute
        GitHubRepo --> GH1
        GitHubRepo --> GH2
        GitHubRepo --> DevC
        DevC --> LocalServer
    end

    subgraph "Production"
        GitHubRepo2["GitHub Repo"]:::external
        CICD["CI/CD Pipeline"]:::external
        StreamlitCloud["Streamlit Community Cloud"]:::external
        GitHubRepo2 --> CICD
        CICD --> StreamlitCloud
    end

    subgraph "Runtime"
        Server["Streamlit Server"]:::compute
        subgraph "Inside Streamlit Server"
            Ingest["Data Ingestion"]:::compute
            Process["Data Processing"]:::compute
            Visual["Visualization (Altair)"]:::compute
        end
    end

    DataDir["data/"]:::storage
    CSV1["esg_risk_data.csv"]:::storage
    CSV2["green_bonds_data.csv"]:::storage
    CSV3["green_bonds_companies_debt_data.csv"]:::storage
    Browser["User Browser"]:::external
    README["README.md"]:::external
    Req["requirements.txt"]:::external

    LocalServer -->|"runs streamlit_app.py"| Server
    StreamlitCloud -->|"hosts streamlit_app.py"| Server
    Server -->|"load CSV"| Ingest
    Ingest -->|"filter & aggregate"| Process
    Process -->|"generate specs"| Visual
    Visual -->|"render charts"| Browser
    Server -.->|"serves UI"| Browser

    DataDir --> CSV1
    DataDir --> CSV2
    DataDir --> CSV3
    CSV1 -->|"source"| Ingest
    CSV2 -->|"source"| Ingest
    CSV3 -->|"source"| Ingest

    README -->|docs| GitHubRepo
    Req -->|dependencies| LocalServer
    Req -->|dependencies| StreamlitCloud

    click Server "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/blob/main/streamlit_app.py"
    click DataDir "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/tree/main/data/"
    click CSV1 "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/blob/main/data/esg_risk_data.csv"
    click CSV2 "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/blob/main/data/green_bonds_data.csv"
    click CSV3 "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/blob/main/data/green_bonds_companies_debt_data.csv"
    click DevC "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/blob/main/.devcontainer/devcontainer.json"
    click GH1 "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/tree/main/.github/CODEOWNERS"
    click GH2 "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/blob/main/.gitignore"
    click Req "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/blob/main/requirements.txt"
    click README "https://github.com/cloud-strife-182000/carbon-finance-project-group-7/blob/main/README.md"

    classDef compute fill:#AED6F1,stroke:#000,stroke-width:1px
    classDef storage fill:#ABEBC6,stroke:#000,stroke-width:1px
    classDef external fill:#F5B041,stroke:#000,stroke-width:1px
```
