# annepuuday111/ai_powered_personal_finance_management architecture

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

- Interactive diagram: https://gitdiagram.com/annepuuday111/ai_powered_personal_finance_management
- Repository: https://github.com/annepuuday111/ai_powered_personal_finance_management

## Overview

FinanceAI is a Django personal-finance application. Users sign up or log in, complete the documented email-OTP flow, then manage accounts, transactions, budgets, and goals through the accounts app; dashboard and analytics views summarize that data, while AI insights and notifications add guidance and alerts. A separate chat app calls Groq for conversational assistance. The source excerpts show the core services and models, but not every view implementation, so some feature-to-storage links are omitted where caller evidence is unavailable.

Main entry points: [`accounts/views.py`](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/views.py) (Finance views), [`accounts/models.py`](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/models.py) (Finance records), [`financeai/urls.py`](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/financeai/urls.py) (Django routing), [`accounts/ai_service.py`](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/ai_service.py) (Insight generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web and identity"]
  node_routing["Django routing<br/>[urls.py]"]
  node_auth["Login and OTP<br/>[views.py]"]
  node_forms["Finance forms<br/>[forms.py]"]
end

subgraph group_finance["Finance management"]
  node_finance_views["Finance views<br/>[views.py]"]
  node_ledger[("Finance records<br/>[models.py]")]
  node_dashboard["Dashboard summary"]
  node_analytics["Financial analytics<br/>[views.py]"]
end

subgraph group_insights["Insights and alerts"]
  node_ai_service["Insight generation<br/>[ai_service.py]"]
  node_notifications["Notification service"]
  node_signals["Account setup signals<br/>[signals.py]"]
  node_news_command["Finance news import"]
  node_news_feed{{"Google News RSS"}}
end

subgraph group_assistant["AI assistant"]
  node_chat_views["Chat endpoint<br/>[views.py]"]
  node_groq{{"Groq API"}}
end

node_user(("Finance user"))

node_user -->|"uses"| node_routing
node_routing -->|"routes auth"| node_auth
node_routing -->|"routes finance"| node_finance_views
node_routing -->|"routes chat"| node_chat_views
node_auth -->|"uses signup form"| node_forms
node_user -->|"manages finances"| node_finance_views
node_finance_views -->|"validates input"| node_forms
node_finance_views -->|"reads and writes"| node_ledger
node_dashboard -->|"reads totals"| node_ledger
node_user -->|"reviews trends"| node_analytics
node_finance_views -->|"requests insights"| node_ai_service
node_ai_service -->|"analyzes records"| node_ledger
node_ai_service -->|"fetches RSS"| node_news_feed
node_news_command -->|"creates news insights"| node_ai_service
node_signals -->|"sends welcome alert"| node_notifications
node_signals -->|"creates profile and categories"| node_ledger
node_notifications -->|"stores notifications"| node_ledger
node_user -->|"asks questions"| node_chat_views
node_chat_views -->|"sends chat request"| node_groq

click node_routing "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/financeai/urls.py"
click node_auth "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/views.py"
click node_forms "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/forms.py"
click node_finance_views "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/views.py"
click node_ledger "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/models.py"
click node_dashboard "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/context_processors.py"
click node_analytics "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/views.py"
click node_ai_service "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/ai_service.py"
click node_notifications "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/notification_service.py"
click node_signals "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/signals.py"
click node_news_command "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/management/commands/fetch_google_news.py"
click node_chat_views "https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/chat/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_routing,node_auth,node_forms,node_user toneBlue
class node_finance_views,node_ledger,node_dashboard,node_analytics toneAmber
class node_ai_service,node_notifications,node_signals,node_news_command,node_news_feed toneMint
class node_chat_views,node_groq toneRose
```

## Components

### Web and identity

- [Django routing](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/financeai/urls.py): `financeai/urls.py`
- [Login and OTP](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/views.py): `accounts/views.py`
- [Finance forms](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/forms.py): `accounts/forms.py`

### Finance management

- [Finance views](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/views.py): `accounts/views.py`
- [Finance records](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/models.py): `accounts/models.py`
- [Dashboard summary](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/context_processors.py): `accounts/context_processors.py`
- [Financial analytics](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/views.py): `accounts/views.py`

### Insights and alerts

- [Insight generation](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/ai_service.py): `accounts/ai_service.py`
- [Notification service](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/notification_service.py): `accounts/notification_service.py`
- [Account setup signals](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/signals.py): `accounts/signals.py`
- [Finance news import](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/accounts/management/commands/fetch_google_news.py): `accounts/management/commands/fetch_google_news.py`
- **Google News RSS**

### AI assistant

- [Chat endpoint](https://github.com/annepuuday111/ai_powered_personal_finance_management/blob/main/chat/views.py): `chat/views.py`
- **Groq API**

### Other components

- **Finance user**

## Connections

- Finance user → Django routing: uses (evidence: `README.md`)
- Django routing → Login and OTP: routes auth (evidence: `financeai/urls.py`)
- Django routing → Finance views: routes finance (evidence: `financeai/urls.py`)
- Django routing → Chat endpoint: routes chat (evidence: `financeai/urls.py`)
- Login and OTP → Finance forms: uses signup form (evidence: `accounts/views.py`)
- Finance user → Finance views: manages finances (evidence: `README.md`)
- Finance views → Finance forms: validates input (evidence: `accounts/views.py`)
- Finance views → Finance records: reads and writes (evidence: `accounts/views.py`)
- Dashboard summary → Finance records: reads totals (evidence: `accounts/context_processors.py`)
- Finance user → Financial analytics: reviews trends (evidence: `README.md`)
- Finance views → Insight generation: requests insights (evidence: `accounts/views.py`)
- Insight generation → Finance records: analyzes records (evidence: `accounts/ai_service.py`)
- Insight generation → Google News RSS: fetches RSS (evidence: `accounts/ai_service.py`)
- Finance news import → Insight generation: creates news insights (evidence: `accounts/management/commands/fetch_google_news.py`)
- Account setup signals → Notification service: sends welcome alert (evidence: `accounts/signals.py`)
- Account setup signals → Finance records: creates profile and categories (evidence: `accounts/signals.py`)
- Notification service → Finance records: stores notifications (evidence: `accounts/notification_service.py`)
- Finance user → Chat endpoint: asks questions (evidence: `chat/views.py`)
- Chat endpoint → Groq API: sends chat request (evidence: `chat/views.py`)
