# ashoksuthar14/amateur_coders_autotax architecture

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

- Interactive diagram: https://gitdiagram.com/ashoksuthar14/amateur_coders_autotax
- Repository: https://github.com/ashoksuthar14/amateur_coders_autotax

## Overview

##### Project type and purpose
- This is a full-stack, microservices-style suite of AI­powered tax filing and advisory services.
- The static “Tax-Website” directory is the user-facing frontend; the other top-level folders (Crewaiapp, Refund_Payment, Tax_Advice, Tax_refund, inded, peronsalized_Tax_Saving, AnamolyDetection) each implement a specialized backend service or “agent” (form filtering, income/deduction tracking, anomaly detection, refund/payment assistance, personalized saving strategies).

##### File structure
- Top-level directories:
- Tax-Website – static HTML, CSS, JS for the browser UI
- Crewaiapp – form filter service (Flask, JS/CSS, templates)
- Refund_Payment – refund & payment calculation (Flask components)
- Tax_Advice – advanced advisory agent (Streamlit app + agent modules)
- Tax_refund – alternative refund/tracker service with HuggingFace integration
- inded – income/deduction tracker (database.py, IncomeDeduction logic)
- peronsalized_Tax_Saving – personalized saving strategist (Flask, OpenAI API)
- AnamolyDetection – error/anomaly detection (Streamlit app + pickled ML model)
- Each service has its own requirements.txt and entry point (app.py or streamlit_app.py), indicating independent deployments.

##### README for additional insights
- The README emphasizes a “Tax Bot” conversational interface, a “Manager Agent” orchestration layer, and features mapping directly to the microservices above.
- External integrations: OpenAI API, HuggingFace models.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Frontend Layer
    subgraph "Tax-Website (Static Frontend)"
        direction TB
        UI_HTML["index.html"]:::frontend
        UI_CSS["style.css"]:::frontend
        UI_JS["script.js"]:::frontend
    end

    %% API Gateway / Manager Agent
    AG["API Gateway / Manager Agent"]:::gateway

    %% Microservices
    subgraph "Microservices"
        direction TB
        FF["Form Filter Service"]:::service
        ID["Income & Deduction Service"]:::service
        AD["Anomaly Detection Service"]:::service
        RPC["Refund/Payment Calculator Service"]:::service
        ALT_RPC["Alt Refund/Tracker Service"]:::service
        TA["Tax Advisory Service"]:::service
        PS["Personalized Saving Strategy Service"]:::service
    end

    %% Data Stores
    DB[(SQL Database)]:::datastore
    CSV[(User CSV Data)]:::datastore
    MLModel[(Pickled Model)]:::datastore

    %% External APIs
    OA["OpenAI API"]:::external
    HF["HuggingFace API"]:::external

    %% Flows
    UI_HTML -->|"HTTP/REST"| AG
    UI_CSS --> AG
    UI_JS --> AG

    AG -->|"filter forms"| FF
    AG -->|"track income/deductions"| ID
    AG -->|"detect anomalies"| AD
    AG -->|"calculate refunds/payments"| RPC
    AG -->|"alternative refund flow"| ALT_RPC
    AG -->|"tax advice"| TA
    AG -->|"save strategies"| PS

    FF -->|reads/writes| DB
    ID -->|reads/writes| DB
    ID -->|loads CSV| CSV
    AD -->|loads model| MLModel
    RPC -->|reads data| DB
    ALT_RPC -->|calls| HF
    PS -->|calls| OA
    TA -->|calls| OA

    %% Click Events
    click UI_HTML "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/Tax-Website/index.html"
    click UI_CSS "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/Tax-Website/css/style.css"
    click UI_JS "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/Tax-Website/js/script.js"
    click FF "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/Crewaiapp/src/app.py"
    click ID "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/inded/database.py"
    click AD "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/AnamolyDetection/Appscreamlit.py"
    click RPC "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/Refund_Payment/app.py"
    click ALT_RPC "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/Tax_refund/main.py"
    click TA "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/Tax_Advice/streamlit_app.py"
    click PS "https://github.com/ashoksuthar14/amateur_coders_autotax/blob/main/peronsalized_Tax_Saving/app.py"

    %% Styles
    classDef frontend fill:#e0f7e9,stroke:#2e7d32,stroke-width:2px
    classDef gateway fill:#e3f2fd,stroke:#1565c0,stroke-width:2px
    classDef service fill:#fff9c4,stroke:#f9a825,stroke-width:2px
    classDef datastore fill:#eceff1,stroke:#455a64,stroke-width:2px
    classDef external fill:#f3e5f5,stroke:#6a1b9a,stroke-width:2px
```
