# pranjalpruthi/dsr architecture

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

- Interactive diagram: https://gitdiagram.com/pranjalpruthi/dsr
- Repository: https://github.com/pranjalpruthi/dsr

## Overview

##### Main Components Identification
The project appears to be a Streamlit web application with the following key components:

a) Frontend Layer:
- Main Streamlit application (app.py)
- Additional pages (pages/1_manage.py)
- Configuration files (.streamlit/config.toml)

b) Data Layer:
- SQLite database (sadhna_report.db)

- Streamlit Server   |
- (Web Application)    |

- Main App   |    |  Manage    |
- (app.py)    |<-->| (1_manage.py)|

- SQLite Database    |
- (sadhna_report.db)    |

##### Important Elements

a) Components:
- Streamlit Server (Main container)
- Main Application Page
- Management Page
- SQLite Database
- Configuration Components

b) Interactions:
- User request flow
- Data flow between pages
- Database queries and responses
- Configuration management

##### Specific Implementation Details

- Streamlit Server             |

- Configuration           |    |
- (.streamlit/config.toml)     |    |

- Main App   |<---->|  Manage   |    |
- (app.py)   |      |  Page     |    |

- ↕                ↕           |

- ↕                ↕

- SQLite Database                 |
- (sadhna_report.db)               |

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Server["Streamlit Application Server"]
        direction TB
        
        subgraph Config["Configuration Layer"]
            direction TB
            AppConfig[".streamlit/config.toml"]:::config
            SecConfig[".streamlit/secrets.toml"]:::config
            DevConfig[".devcontainer/devcontainer.json"]:::config
            Deps["requirements.txt"]:::config
        end

        subgraph Pages["Application Pages"]
            direction TB
            MainApp["Main Application"]:::page
            ManagePage["Management Interface"]:::page
            MainApp <--> ManagePage
        end

        Config --> Pages
    end

    DB[(SQLite Database)]:::database
    Pages <--> DB

    classDef page fill:#90EE90,stroke:#333,stroke-width:2px
    classDef config fill:#FFB6C1,stroke:#333,stroke-width:2px
    classDef database fill:#FFD700,stroke:#333,stroke-width:2px

    %% Click events for component mapping
    click MainApp "https://github.com/pranjalpruthi/dsr/blob/main/app.py"
    click ManagePage "https://github.com/pranjalpruthi/dsr/blob/main/pages/1_manage.py"
    click AppConfig "https://github.com/pranjalpruthi/dsr/blob/main/.streamlit/config.toml"
    click SecConfig "https://github.com/pranjalpruthi/dsr/blob/main/.streamlit/secrets.toml"
    click DB "https://github.com/pranjalpruthi/dsr/blob/main/sadhna_report.db"
    click DevConfig "https://github.com/pranjalpruthi/dsr/blob/main/.devcontainer/devcontainer.json"
    click Deps "https://github.com/pranjalpruthi/dsr/blob/main/requirements.txt"

    %% Legend
    subgraph Legend
        direction TB
        P1["Application Page"]:::page
        C1["Configuration File"]:::config
        D1[(Database)]:::database
    end
```
