# vaghasiyasujal106/tally-live-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/vaghasiyasujal106/tally-live-dashboard
- Repository: https://github.com/vaghasiyasujal106/tally-live-dashboard

## Overview

##### Project Type and Purpose
- This is a lightweight full-stack dashboard application.
- Purpose: connect to Tally ERP via its ODBC interface, pull accounting/transactional data in real time, process it with Python (pandas), and render it to end users through a simple web frontend (HTML templates).

##### File Structure Analysis
- Top level:
- app.py – main Python application, acts as the web server (Flask or similar).
- requirements – lists Python dependencies (e.g., Flask, pandas, pyodbc).
- templates/ – holds HTML templates (views) used by the backend to render pages.
- No persistent database; Tally ERP (external system) is the primary data source via ODBC.

##### README Insights
- Describes integration with Tally’s ODBC, use of pandas for data processing, and rendering via HTML/CSS.
- No additional microservices or third-party APIs beyond Tally and standard Python libs.

a. Main Components
1. User’s Browser (UI)
2. Web Server / Backend (app.py)
– HTTP server (Flask)
– Controller/Router layer
– Service layer for data processing
3. Data Access Layer
– ODBC Connector to Tally ERP
4. External System: Tally ERP
5. Presentation Layer
– HTML templates in templates/
– (Optional) Static assets: CSS/JS
b. Relationships & Interactions
- User → HTTP request → Web Server
- Web Server Controller calls Service Layer
- Service Layer:
- Fetch raw data → pandas DataFrame
- Transform/filter data
- Processed data passed back to Controller → view renderer
- HTML generated from templates → HTTP response → User’s Browser
c. Architectural Patterns & Principles
- MVC-style separation:
- Models: DataFrame objects in memory (no persistent DB)
- Views: Jinja2 (or equivalent) HTML templates
- Controllers: Flask routes in app.py
- Single-process, synchronous request handling (unless you add async/WSGI).
- Layered design: Presentation → Application → Data Access → External System
d. Key Technologies & Frameworks
- Python 3
- Flask (or minimal WSGI framework)
- pandas (data processing)
- pyodbc or pypyodbc (ODBC connectivity)
- Jinja2 templates (built-in with Flask)
- HTML/CSS (and optional JS) for frontend

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Frontend UI
    Browser["User's Browser (UI)"]:::frontend
    Static["Static Assets (CSS/JS)"]:::presentation

    subgraph "HTML Templates"
        Home["Home / Index View"]:::template
        CompanyList["Company List View"]:::template
        CompanyDetails["Company Details View"]:::template
    end

    %% Backend Layer
    subgraph "Backend Layer"
        Flask["Flask Server"]:::backend
        Router["Controller / Router Layer"]:::backend
        Service["Service Layer (pandas)"]:::backend
        DataAccess["ODBC Connector"]:::backend
    end

    %% External System
    Tally["Tally ERP"]:::external

    %% Dependencies
    Requirements["requirements"]:::docs
    Readme["README.md"]:::docs

    %% Connections
    Browser -->|"HTTP Request"| Flask
    Flask --> Router
    Router --> Service
    Service --> DataAccess
    DataAccess -->|ODBC Query| Tally
    Tally -->|Raw Data| DataAccess
    DataAccess -->|DataFrame| Service
    Service -->|Processed Data| Router
    Router -->|Render View| Home
    Router -->|Render View| CompanyList
    Router -->|Render View| CompanyDetails
    Home -->|"HTML Response"| Browser
    CompanyList -->|"HTML Response"| Browser
    CompanyDetails -->|"HTML Response"| Browser
    Static -->|"Loaded by"| Browser

    Flask --> Requirements
    Flask --> Readme

    %% Click Events
    click Flask "https://github.com/vaghasiyasujal106/tally-live-dashboard/blob/main/app.py"
    click Router "https://github.com/vaghasiyasujal106/tally-live-dashboard/blob/main/app.py"
    click Service "https://github.com/vaghasiyasujal106/tally-live-dashboard/blob/main/app.py"
    click DataAccess "https://github.com/vaghasiyasujal106/tally-live-dashboard/blob/main/app.py"
    click Home "https://github.com/vaghasiyasujal106/tally-live-dashboard/blob/main/templates/index.html"
    click CompanyList "https://github.com/vaghasiyasujal106/tally-live-dashboard/blob/main/templates/company_list.html"
    click CompanyDetails "https://github.com/vaghasiyasujal106/tally-live-dashboard/blob/main/templates/company_details.html"
    click Static "https://github.com/vaghasiyasujal106/tally-live-dashboard/tree/main/templates/"
    click Requirements "https://github.com/vaghasiyasujal106/tally-live-dashboard/tree/main/requirements"
    click Readme "https://github.com/vaghasiyasujal106/tally-live-dashboard/blob/main/README.md"

    %% Styles
    classDef frontend fill:#FAD165,stroke:#EAA637,color:#000
    classDef backend fill:#6FA8DC,stroke:#3A75C4,color:#000
    classDef external fill:#93C47D,stroke:#6AA84F,color:#000
    classDef presentation fill:#F9CB9C,stroke:#E69138,color:#000
    classDef template fill:#F9CB9C,stroke:#E69138,color:#000
    classDef docs fill:#B4A7D6,stroke:#8E7CC3,color:#000
```
