# cs25b1074-stack/aiwp_project architecture

> Architecture diagram of the GitHub repository cs25b1074-stack/aiwp_project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cs25b1074-stack/aiwp_project
- Repository: https://github.com/cs25b1074-stack/aiwp_project

## Overview

This is a debt-repayment planner that compares search strategies for paying down a loan and credit-card balance. Users enter income, savings, balances, and rates; the planner models monthly interest and repayment choices, searches for repayment paths, then reports interest, duration, and explored states. The CLI comparison is implemented in compare_all.py, while the Streamlit app has its own in-file solver and presents comparisons and repayment schedules. Individual algorithm scripts are standalone implementations, not modules called by the comparison runner. The UI wiring is only partly shown in the excerpts.

Main entry points: [`main.py`](https://github.com/cs25b1074-stack/aiwp_project/blob/main/main.py) (CLI Launcher), [`compare_all.py`](https://github.com/cs25b1074-stack/aiwp_project/blob/main/compare_all.py) (CLI Comparison), [`streamlit_app.py`](https://github.com/cs25b1074-stack/aiwp_project/blob/main/streamlit_app.py) (Streamlit Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry Points"]
  node_runner["CLI Launcher<br/>[main.py]"]
  node_comparison["CLI Comparison<br/>[compare_all.py]"]
end

subgraph group_search["Search Implementations"]
  node_websolver["Web Search Solver<br/>[streamlit_app.py]"]
  node_astar["A* Search<br/>[astar_debt.py]"]
  node_ucs["UCS Search<br/>[ucs_debt.py]"]
  node_bfs["BFS Search<br/>[bfs_debt.py]"]
  node_dfs["DFS Search<br/>[dfs_debt.py]"]
  node_greedy["Greedy Search<br/>[greedy_debt.py]"]
  node_bfs_search["BFS Variant<br/>[bfs_search.py]"]
  node_starter["Search Template<br/>[starter.py]"]
end

subgraph group_presentation["Results and Visualization"]
  node_webapp["Streamlit Application<br/>[streamlit_app.py]"]
  node_results["Comparison and Plans<br/>[streamlit_app.py]"]
end

node_user(("Planner User"))

node_user -->|"selects mode"| node_runner
node_runner -->|"imports for CLI"| node_comparison
node_runner -->|"launches UI"| node_webapp
node_user -->|"enters debt inputs"| node_webapp
node_webapp -.->|"runs comparison"| node_websolver
node_websolver -->|"provides paths and metrics"| node_results
node_user -->|"enters debt inputs"| node_comparison
node_comparison -->|"prints algorithm comparison"| node_results

click node_runner "https://github.com/cs25b1074-stack/aiwp_project/blob/main/main.py"
click node_comparison "https://github.com/cs25b1074-stack/aiwp_project/blob/main/compare_all.py"
click node_webapp "https://github.com/cs25b1074-stack/aiwp_project/blob/main/streamlit_app.py"
click node_websolver "https://github.com/cs25b1074-stack/aiwp_project/blob/main/streamlit_app.py"
click node_astar "https://github.com/cs25b1074-stack/aiwp_project/blob/main/astar_debt.py"
click node_ucs "https://github.com/cs25b1074-stack/aiwp_project/blob/main/ucs_debt.py"
click node_bfs "https://github.com/cs25b1074-stack/aiwp_project/blob/main/bfs_debt.py"
click node_dfs "https://github.com/cs25b1074-stack/aiwp_project/blob/main/dfs_debt.py"
click node_greedy "https://github.com/cs25b1074-stack/aiwp_project/blob/main/greedy_debt.py"
click node_bfs_search "https://github.com/cs25b1074-stack/aiwp_project/blob/main/bfs_search.py"
click node_starter "https://github.com/cs25b1074-stack/aiwp_project/blob/main/starter.py"
click node_results "https://github.com/cs25b1074-stack/aiwp_project/blob/main/streamlit_app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner,node_comparison,node_user toneBlue
class node_websolver,node_astar,node_ucs,node_bfs,node_dfs,node_greedy,node_bfs_search,node_starter toneAmber
class node_webapp,node_results toneMint
```

## Components

### Entry Points

- [CLI Launcher](https://github.com/cs25b1074-stack/aiwp_project/blob/main/main.py): `main.py`
- [CLI Comparison](https://github.com/cs25b1074-stack/aiwp_project/blob/main/compare_all.py): `compare_all.py`

### Search Implementations

- [Web Search Solver](https://github.com/cs25b1074-stack/aiwp_project/blob/main/streamlit_app.py): `streamlit_app.py`
- [A* Search](https://github.com/cs25b1074-stack/aiwp_project/blob/main/astar_debt.py): `astar_debt.py`
- [UCS Search](https://github.com/cs25b1074-stack/aiwp_project/blob/main/ucs_debt.py): `ucs_debt.py`
- [BFS Search](https://github.com/cs25b1074-stack/aiwp_project/blob/main/bfs_debt.py): `bfs_debt.py`
- [DFS Search](https://github.com/cs25b1074-stack/aiwp_project/blob/main/dfs_debt.py): `dfs_debt.py`
- [Greedy Search](https://github.com/cs25b1074-stack/aiwp_project/blob/main/greedy_debt.py): `greedy_debt.py`
- [BFS Variant](https://github.com/cs25b1074-stack/aiwp_project/blob/main/bfs_search.py): `bfs_search.py`
- [Search Template](https://github.com/cs25b1074-stack/aiwp_project/blob/main/starter.py): `starter.py`

### Results and Visualization

- [Streamlit Application](https://github.com/cs25b1074-stack/aiwp_project/blob/main/streamlit_app.py): `streamlit_app.py`
- [Comparison and Plans](https://github.com/cs25b1074-stack/aiwp_project/blob/main/streamlit_app.py): `streamlit_app.py`

### Other components

- **Planner User**

## Connections

- Planner User → CLI Launcher: selects mode (evidence: `README.md`)
- CLI Launcher → CLI Comparison: imports for CLI (evidence: `main.py`)
- CLI Launcher → Streamlit Application: launches UI (evidence: `main.py`)
- Planner User → Streamlit Application: enters debt inputs (evidence: `README.md`)
- Streamlit Application → Web Search Solver: runs comparison (evidence: `streamlit_app.py`)
- Web Search Solver → Comparison and Plans: provides paths and metrics (evidence: `streamlit_app.py`)
- Planner User → CLI Comparison: enters debt inputs (evidence: `compare_all.py`)
- CLI Comparison → Comparison and Plans: prints algorithm comparison (evidence: `compare_all.py`)
