# project-group-ai/i-llm architecture

> Architecture diagram of the GitHub repository project-group-ai/i-llm, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/project-group-ai/i-llm
- Repository: https://github.com/project-group-ai/i-llm

## Overview

##### Main Components
- Frontend Component: Represented by Front.py. This is responsible for handling the Streamlit-based UI that users interact with via their web browser.
- Backend Component: Represented by Back.py. This script likely handles the business logic, data processing, or interactions with any external APIs or LLM-based inference.
- Configuration and Environment: The .streamlit directory (with config.toml) holds streamlit-specific settings, while the .devcontainer folder (and related files) establish a consistent development environment.
- Documentation and Supporting Files: The README.md and I-LLM.pdf (possibly outlining usage or architectural decisions) provide additional context and documentation, while requirements.txt lists dependencies.

##### Relationships and Interactions
- User Interaction: Show an external component for the “User Browser” that accesses the web application.
- Data Flow: Emphasize how user requests hit the Streamlit frontend (Front.py) and then are routed to the backend (Back.py) for processing.
- Configuration Role: Include the Streamlit configuration (from .streamlit) that affects UI behavior, and highlight any environment setup via the dev container.
- External Deployment: Incorporate the deployed URL (linked in the README) demonstrating that this system is hosted on Streamlit’s cloud platform or a similar service.

##### Architectural Patterns
- Separation of Concerns: The clear division between Front.py and Back.py underlines a separation between presentation (UI) and business logic.
- Lightweight, Modular Design: Given the concise file structure, it is designed to be simple yet modular—each component handling a specific piece of the overall functionality.
- DevOps Consideration: The presence of the .devcontainer and configuration files indicates an environment-aware design for smooth development and deployment.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User Interaction
    subgraph "User Interaction"
        U["User Browser"]:::user
    end

    %% Web Application
    subgraph "Web Application"
        F["Streamlit Frontend (Front.py)"]:::frontend
        B["Application Backend (Back.py)"]:::backend
        F -->|"routesRequest"| B
    end

    U -->|"sendsRequest"| F

    %% Configuration and Environment
    C["Streamlit Configuration (.streamlit/config.toml)"]:::config
    D["Development Environment (.devcontainer)"]:::dev

    C -->|"configures"| F
    C -->|"configures"| B
    D -->|"setsEnvFor"| F
    D -->|"setsEnvFor"| B

    %% Deployment
    Dep["Live Deployment (Streamlit Cloud)"]:::external
    F -->|"deployedTo"| Dep

    %% Supporting Files
    subgraph "Supporting Files"
        R["README.md"]:::docs
        P["I-LLM.pdf"]:::docs
        Dpt["Dependencies (requirements.txt)"]:::deps
    end

    R ---|"documents"| F
    P ---|"documents"| F
    Dpt ---|"dependency"| F
    Dpt ---|"dependency"| B

    %% Click Events
    click F "https://github.com/project-group-ai/i-llm/blob/main/Front.py"
    click B "https://github.com/project-group-ai/i-llm/blob/main/Back.py"
    click C "https://github.com/project-group-ai/i-llm/blob/main/.streamlit/config.toml"
    click D "https://github.com/project-group-ai/i-llm/blob/main/.devcontainer/devcontainer.json"
    click R "https://github.com/project-group-ai/i-llm/blob/main/README.md"
    click P "https://github.com/project-group-ai/i-llm/blob/main/I-LLM.pdf"
    click Dpt "https://github.com/project-group-ai/i-llm/blob/main/requirements.txt"

    %% Styles
    classDef user fill:#FFD700,stroke:#000,stroke-width:1.5px;
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:1.5px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:1.5px;
    classDef config fill:#FFA500,stroke:#000,stroke-width:1.5px;
    classDef dev fill:#FFA500,stroke:#000,stroke-width:1.5px;
    classDef docs fill:#D3D3D3,stroke:#000,stroke-width:1.5px;
    classDef deps fill:#F0F0F0,stroke:#000,stroke-width:1.5px;
    classDef external fill:#87CEEB,stroke:#000,stroke-width:1.5px;
```
