# samanvitharavikumar/findash architecture

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

- Interactive diagram: https://gitdiagram.com/samanvitharavikumar/findash
- Repository: https://github.com/samanvitharavikumar/findash

## Overview

FinDash is a personal-finance web app: users register or sign in, manage income and expenses, then review summaries and charts, ask questions about their finances, or request a credit rating. The React router exposes these distinct experiences; Django provides transaction, registration, AI-helper, and credit-prediction endpoints, with transaction records as the central persisted state. The sampled backend shows the credit preprocessing and AI prompt/service layers. Several frontend screens and their API calls were not excerpted, so those connections are not asserted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/App.jsx) (Page routing), [`backend/transactions/views.py`](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/views.py) (Account and transactions), [`frontend/src/components/Navbar.jsx`](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/components/Navbar.jsx) (Navigation), [`backend/transactions/ai_views.py`](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/ai_views.py) (AI request handler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web experience"]
  node_app["Page routing<br/>[App.jsx]"]
  node_auth["Sign in / register<br/>[Auth.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_addexpense["Add expense<br/>[AddExpense.jsx]"]
  node_charts["Charts<br/>[ChartsPage.jsx]"]
  node_aihelper["AI helper<br/>[AIHelper.jsx]"]
  node_creditscreen["Credit score<br/>[CreditScore.jsx]"]
  node_welcome["Welcome screen<br/>[SplashScreen.jsx]"]
  node_nav["Navigation<br/>[Navbar.jsx]"]
end

subgraph group_api["Finance API"]
  node_apiurls["API routing<br/>[urls.py]"]
  node_account["Account and transactions<br/>[views.py]"]
  node_serializer["Request serialization<br/>[serializers.py]"]
  node_transaction[("Transaction records<br/>[models.py]")]
end

subgraph group_intelligence["Insights and scoring"]
  node_aiendpoint["AI request handler<br/>[ai_views.py]"]
  node_prompt["Prompt construction<br/>[prompt_builder.py]"]
  node_geminiservice["Gemini client<br/>[ai_Service.py]"]
  node_preprocess["Credit preprocessing<br/>[preprocessing.py]"]
  node_creditprediction["Credit prediction<br/>[views.py]"]
end

node_user(("User"))
node_gemini{{"Google Gemini"}}

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_welcome
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_addexpense
node_app -->|"routes to"| node_charts
node_app -->|"routes to"| node_aihelper
node_app -->|"routes to"| node_creditscreen
node_dashboard -->|"renders"| node_nav
node_addexpense -->|"renders"| node_nav
node_charts -->|"renders"| node_nav
node_aihelper -->|"renders"| node_nav
node_creditscreen -->|"renders"| node_nav
node_auth -.->|"calls API"| node_account
node_dashboard -->|"requests transactions"| node_account
node_app -.->|"API entry"| node_apiurls
node_apiurls -->|"routes to"| node_account
node_apiurls -->|"routes to"| node_aiendpoint
node_account -->|"serializes"| node_serializer
node_account -->|"reads and writes"| node_transaction
node_serializer -->|"maps fields"| node_transaction
node_account -->|"prepares features"| node_preprocess
node_aiendpoint -->|"reads user records"| node_transaction
node_aiendpoint -->|"builds prompt"| node_prompt
node_aiendpoint -->|"requests answer"| node_geminiservice
node_geminiservice -->|"generates content"| node_gemini
node_creditscreen -.->|"requests score"| node_creditprediction

click node_app "https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/App.jsx"
click node_auth "https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/Auth.jsx"
click node_dashboard "https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/Dashboard.jsx"
click node_addexpense "https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/AddExpense.jsx"
click node_charts "https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/ChartsPage.jsx"
click node_aihelper "https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/AIHelper.jsx"
click node_creditscreen "https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/CreditScore.jsx"
click node_welcome "https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/SplashScreen.jsx"
click node_nav "https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/components/Navbar.jsx"
click node_apiurls "https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/urls.py"
click node_account "https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/views.py"
click node_serializer "https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/serializers.py"
click node_transaction "https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/models.py"
click node_aiendpoint "https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/ai_views.py"
click node_prompt "https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/prompt_builder.py"
click node_geminiservice "https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/ai_Service.py"
click node_preprocess "https://github.com/samanvitharavikumar/findash/blob/main/backend/ml/preprocessing.py"
click node_creditprediction "https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/views.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_app,node_auth,node_dashboard,node_addexpense,node_charts,node_aihelper,node_creditscreen,node_welcome,node_nav,node_user toneBlue
class node_apiurls,node_account,node_serializer,node_transaction toneAmber
class node_aiendpoint,node_prompt,node_geminiservice,node_preprocess,node_creditprediction toneMint
class node_gemini toneIndigo
```

## Components

### Web experience

- [Page routing](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Sign in / register](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/Auth.jsx): `frontend/src/pages/Auth.jsx`
- [Dashboard](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Add expense](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/AddExpense.jsx): `frontend/src/pages/AddExpense.jsx`
- [Charts](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/ChartsPage.jsx): `frontend/src/pages/ChartsPage.jsx`
- [AI helper](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/AIHelper.jsx): `frontend/src/pages/AIHelper.jsx`
- [Credit score](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/CreditScore.jsx): `frontend/src/pages/CreditScore.jsx`
- [Welcome screen](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/pages/SplashScreen.jsx): `frontend/src/pages/SplashScreen.jsx`
- [Navigation](https://github.com/samanvitharavikumar/findash/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`

### Finance API

- [API routing](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/urls.py): `backend/transactions/urls.py`
- [Account and transactions](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/views.py): `backend/transactions/views.py`
- [Request serialization](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/serializers.py): `backend/transactions/serializers.py`
- [Transaction records](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/models.py): `backend/transactions/models.py`

### Insights and scoring

- [AI request handler](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/ai_views.py): `backend/transactions/ai_views.py`
- [Prompt construction](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/prompt_builder.py): `backend/transactions/prompt_builder.py`
- [Gemini client](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/ai_Service.py): `backend/transactions/ai_Service.py`
- [Credit preprocessing](https://github.com/samanvitharavikumar/findash/blob/main/backend/ml/preprocessing.py): `backend/ml/preprocessing.py`
- [Credit prediction](https://github.com/samanvitharavikumar/findash/blob/main/backend/transactions/views.py): `backend/transactions/views.py`

### Other components

- **User**
- **Google Gemini**

## Connections

- User → Page routing: uses (evidence: `frontend/src/App.jsx`)
- Page routing → Welcome screen: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Sign in / register: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Add expense: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Charts: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → AI helper: routes to (evidence: `frontend/src/App.jsx`)
- Page routing → Credit score: routes to (evidence: `frontend/src/App.jsx`)
- Dashboard → Navigation: renders (evidence: `frontend/src/pages/Dashboard.jsx`)
- Add expense → Navigation: renders (evidence: `frontend/src/pages/AddExpense.jsx`)
- Charts → Navigation: renders (evidence: `frontend/src/pages/ChartsPage.jsx`)
- AI helper → Navigation: renders (evidence: `frontend/src/pages/AIHelper.jsx`)
- Credit score → Navigation: renders (evidence: `frontend/src/pages/CreditScore.jsx`)
- Sign in / register → Account and transactions: calls API
- Dashboard → Account and transactions: requests transactions (evidence: `frontend/src/pages/Dashboard.jsx`)
- Page routing → API routing: API entry
- API routing → Account and transactions: routes to (evidence: `backend/transactions/urls.py`)
- API routing → AI request handler: routes to (evidence: `backend/transactions/urls.py`)
- Account and transactions → Request serialization: serializes (evidence: `backend/transactions/views.py`)
- Account and transactions → Transaction records: reads and writes (evidence: `backend/transactions/views.py`)
- Request serialization → Transaction records: maps fields (evidence: `backend/transactions/serializers.py`)
- Account and transactions → Credit preprocessing: prepares features (evidence: `backend/transactions/views.py`)
- AI request handler → Transaction records: reads user records (evidence: `backend/transactions/ai_views.py`)
- AI request handler → Prompt construction: builds prompt (evidence: `backend/transactions/ai_views.py`)
- AI request handler → Gemini client: requests answer (evidence: `backend/transactions/ai_views.py`)
- Gemini client → Google Gemini: generates content (evidence: `backend/transactions/ai_Service.py`)
- Credit score → Credit prediction: requests score
