# hasnain0420/finora architecture

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

- Interactive diagram: https://gitdiagram.com/hasnain0420/finora
- Repository: https://github.com/hasnain0420/finora

## Overview

Finora is a React personal-finance tracker. Users enter through the landing page and sign-in, then manage income and expenses on the dashboard or transaction page and review reports. Shared context caches page-specific transaction data; Supabase provides authentication, storage, and documented real-time synchronization. The graph follows relationships visible in excerpts, source-index references, or README statements; unsampled implementations are represented only where their subsystem is supported by the tree and documentation.

Main entry points: [`src/layout/MainLayout.jsx`](https://github.com/hasnain0420/finora/blob/main/src/layout/MainLayout.jsx) (Authenticated layout), [`src/pages/dashboard/Dashboard.jsx`](https://github.com/hasnain0420/finora/blob/main/src/pages/dashboard/Dashboard.jsx) (Finance dashboard), [`src/lib/supabase.js`](https://github.com/hasnain0420/finora/blob/main/src/lib/supabase.js) (Supabase client), [`src/pages/transaction/Transaction.jsx`](https://github.com/hasnain0420/finora/blob/main/src/pages/transaction/Transaction.jsx) (Transaction manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App and navigation"]
  node_app["Router and shared state<br/>[App.jsx]"]
  node_landing["Landing page<br/>[Landing.jsx]"]
  node_login["Sign-in page<br/>[Login.jsx]"]
  node_layout["Authenticated layout<br/>[MainLayout.jsx]"]
  node_header["Account header<br/>[Header.jsx]"]
  node_sidebar["Navigation sidebar<br/>[Sidebar.jsx]"]
  node_settings["Account settings<br/>[Setting.jsx]"]
end

subgraph group_transactions["Transaction management"]
  node_transactions["Transaction manager<br/>[Transaction.jsx]"]
  node_form["Transaction form"]
  node_controls["Filter controls"]
  node_list["Transaction list"]
  node_card["Summary card<br/>[Card.jsx]"]
end

subgraph group_insights["Financial insights"]
  node_dashboard["Finance dashboard<br/>[Dashboard.jsx]"]
  node_quickstats["Quick statistics<br/>[QuickStats.jsx]"]
  node_incomechart["Income expense chart"]
  node_categorychart["Category spending chart"]
  node_reports["Financial reports<br/>[Report.jsx]"]
  node_cashflow["Monthly cash flow"]
  node_trends["Monthly trends<br/>[MonthlyTrends.jsx]"]
end

subgraph group_services["State and services"]
  node_context["Cached page state<br/>[DataContext.jsx]"]
  node_transactionservice["Transaction operations<br/>[transactions.js]"]
  node_supabaseclient["Supabase client<br/>[supabase.js]"]
end

node_user(("Finance user"))
node_supabase[("Supabase backend")]

node_user -->|"opens"| node_landing
node_landing -->|"starts sign-in"| node_login
node_login -->|"authenticates with"| node_supabaseclient
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_login
node_app -->|"routes dashboard through"| node_layout
node_app -->|"provides state"| node_context
node_layout -->|"checks auth and subscribes"| node_supabaseclient
node_layout -->|"invalidates cached data"| node_context
node_layout -->|"renders"| node_header
node_layout -->|"renders"| node_sidebar
node_layout -->|"renders route"| node_dashboard
node_layout -->|"renders route"| node_transactions
node_layout -->|"renders route"| node_reports
node_layout -->|"renders route"| node_settings
node_dashboard -->|"fetches and adds"| node_transactionservice
node_dashboard -->|"reads and updates"| node_context
node_dashboard -->|"renders"| node_form
node_form -->|"submits transaction to"| node_dashboard
node_dashboard -->|"renders summaries"| node_card
node_dashboard -->|"renders"| node_incomechart
node_dashboard -->|"renders"| node_categorychart
node_dashboard -->|"renders"| node_quickstats
node_transactions -->|"fetches and deletes"| node_transactionservice
node_transactions -->|"reads and updates"| node_context
node_transactions -->|"renders filters"| node_controls
node_transactions -->|"renders filtered entries"| node_list
node_transactions -->|"renders totals"| node_card
node_transactionservice -->|"queries"| node_supabaseclient
node_supabaseclient -->|"connects to"| node_supabase
node_reports -->|"queries report data"| node_supabaseclient
node_reports -->|"reads and updates"| node_context
node_reports -->|"renders"| node_cashflow
node_reports -->|"renders"| node_categorychart
node_reports -->|"renders"| node_trends
node_trends -->|"queries data"| node_supabaseclient
node_supabase -.->|"notifies changes"| node_supabaseclient

click node_app "https://github.com/hasnain0420/finora/blob/main/src/App.jsx"
click node_landing "https://github.com/hasnain0420/finora/blob/main/src/pages/landing/Landing.jsx"
click node_login "https://github.com/hasnain0420/finora/blob/main/src/pages/login/Login.jsx"
click node_layout "https://github.com/hasnain0420/finora/blob/main/src/layout/MainLayout.jsx"
click node_header "https://github.com/hasnain0420/finora/blob/main/src/components/header/Header.jsx"
click node_sidebar "https://github.com/hasnain0420/finora/blob/main/src/components/sidebar/Sidebar.jsx"
click node_dashboard "https://github.com/hasnain0420/finora/blob/main/src/pages/dashboard/Dashboard.jsx"
click node_quickstats "https://github.com/hasnain0420/finora/blob/main/src/components/common/QuickStats/QuickStats.jsx"
click node_incomechart "https://github.com/hasnain0420/finora/blob/main/src/components/common/charts/IncomeExpenseChart/IncomeExpenseChart.jsx"
click node_categorychart "https://github.com/hasnain0420/finora/blob/main/src/components/common/charts/SpendingByCategory/SpendingByCategory.jsx"
click node_reports "https://github.com/hasnain0420/finora/blob/main/src/pages/report/Report.jsx"
click node_cashflow "https://github.com/hasnain0420/finora/blob/main/src/components/common/charts/MonthlyCashFlow/MonthlyCashFlow.jsx"
click node_trends "https://github.com/hasnain0420/finora/blob/main/src/components/common/charts/MonthlyTrends/MonthlyTrends.jsx"
click node_transactions "https://github.com/hasnain0420/finora/blob/main/src/pages/transaction/Transaction.jsx"
click node_form "https://github.com/hasnain0420/finora/blob/main/src/components/common/TransactionForm/TransactionForm.jsx"
click node_controls "https://github.com/hasnain0420/finora/blob/main/src/components/common/TransactionControlPanel/TransactionControlPanel.jsx"
click node_list "https://github.com/hasnain0420/finora/blob/main/src/components/common/TransactionList/TransactionList.jsx"
click node_card "https://github.com/hasnain0420/finora/blob/main/src/components/common/card/Card.jsx"
click node_context "https://github.com/hasnain0420/finora/blob/main/src/context/DataContext.jsx"
click node_transactionservice "https://github.com/hasnain0420/finora/blob/main/src/lib/transactions.js"
click node_supabaseclient "https://github.com/hasnain0420/finora/blob/main/src/lib/supabase.js"
click node_settings "https://github.com/hasnain0420/finora/blob/main/src/pages/setting/Setting.jsx"

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_landing,node_login,node_layout,node_header,node_sidebar,node_settings,node_user toneBlue
class node_transactions,node_form,node_controls,node_list,node_card,node_supabase toneAmber
class node_dashboard,node_quickstats,node_incomechart,node_categorychart,node_reports,node_cashflow,node_trends toneMint
class node_context,node_transactionservice,node_supabaseclient toneRose
```

## Components

### App and navigation

- [Router and shared state](https://github.com/hasnain0420/finora/blob/main/src/App.jsx): `src/App.jsx`
- [Landing page](https://github.com/hasnain0420/finora/blob/main/src/pages/landing/Landing.jsx): `src/pages/landing/Landing.jsx`
- [Sign-in page](https://github.com/hasnain0420/finora/blob/main/src/pages/login/Login.jsx): `src/pages/login/Login.jsx`
- [Authenticated layout](https://github.com/hasnain0420/finora/blob/main/src/layout/MainLayout.jsx): `src/layout/MainLayout.jsx`
- [Account header](https://github.com/hasnain0420/finora/blob/main/src/components/header/Header.jsx): `src/components/header/Header.jsx`
- [Navigation sidebar](https://github.com/hasnain0420/finora/blob/main/src/components/sidebar/Sidebar.jsx): `src/components/sidebar/Sidebar.jsx`
- [Account settings](https://github.com/hasnain0420/finora/blob/main/src/pages/setting/Setting.jsx): `src/pages/setting/Setting.jsx`

### Transaction management

- [Transaction manager](https://github.com/hasnain0420/finora/blob/main/src/pages/transaction/Transaction.jsx): `src/pages/transaction/Transaction.jsx`
- [Transaction form](https://github.com/hasnain0420/finora/blob/main/src/components/common/TransactionForm/TransactionForm.jsx): `src/components/common/TransactionForm/TransactionForm.jsx`
- [Filter controls](https://github.com/hasnain0420/finora/blob/main/src/components/common/TransactionControlPanel/TransactionControlPanel.jsx): `src/components/common/TransactionControlPanel/TransactionControlPanel.jsx`
- [Transaction list](https://github.com/hasnain0420/finora/blob/main/src/components/common/TransactionList/TransactionList.jsx): `src/components/common/TransactionList/TransactionList.jsx`
- [Summary card](https://github.com/hasnain0420/finora/blob/main/src/components/common/card/Card.jsx): `src/components/common/card/Card.jsx`

### Financial insights

- [Finance dashboard](https://github.com/hasnain0420/finora/blob/main/src/pages/dashboard/Dashboard.jsx): `src/pages/dashboard/Dashboard.jsx`
- [Quick statistics](https://github.com/hasnain0420/finora/blob/main/src/components/common/QuickStats/QuickStats.jsx): `src/components/common/QuickStats/QuickStats.jsx`
- [Income expense chart](https://github.com/hasnain0420/finora/blob/main/src/components/common/charts/IncomeExpenseChart/IncomeExpenseChart.jsx): `src/components/common/charts/IncomeExpenseChart/IncomeExpenseChart.jsx`
- [Category spending chart](https://github.com/hasnain0420/finora/blob/main/src/components/common/charts/SpendingByCategory/SpendingByCategory.jsx): `src/components/common/charts/SpendingByCategory/SpendingByCategory.jsx`
- [Financial reports](https://github.com/hasnain0420/finora/blob/main/src/pages/report/Report.jsx): `src/pages/report/Report.jsx`
- [Monthly cash flow](https://github.com/hasnain0420/finora/blob/main/src/components/common/charts/MonthlyCashFlow/MonthlyCashFlow.jsx): `src/components/common/charts/MonthlyCashFlow/MonthlyCashFlow.jsx`
- [Monthly trends](https://github.com/hasnain0420/finora/blob/main/src/components/common/charts/MonthlyTrends/MonthlyTrends.jsx): `src/components/common/charts/MonthlyTrends/MonthlyTrends.jsx`

### State and services

- [Cached page state](https://github.com/hasnain0420/finora/blob/main/src/context/DataContext.jsx): `src/context/DataContext.jsx`
- [Transaction operations](https://github.com/hasnain0420/finora/blob/main/src/lib/transactions.js): `src/lib/transactions.js`
- [Supabase client](https://github.com/hasnain0420/finora/blob/main/src/lib/supabase.js): `src/lib/supabase.js`

### Other components

- **Finance user**
- **Supabase backend**

## Connections

- Finance user → Landing page: opens (evidence: `src/pages/landing/Landing.jsx`)
- Landing page → Sign-in page: starts sign-in (evidence: `src/pages/landing/Landing.jsx`)
- Sign-in page → Supabase client: authenticates with (evidence: `src/pages/login/Login.jsx`)
- Router and shared state → Landing page: routes to (evidence: `src/App.jsx`)
- Router and shared state → Sign-in page: routes to (evidence: `src/App.jsx`)
- Router and shared state → Authenticated layout: routes dashboard through (evidence: `src/App.jsx`)
- Router and shared state → Cached page state: provides state (evidence: `src/App.jsx`)
- Authenticated layout → Supabase client: checks auth and subscribes (evidence: `src/layout/MainLayout.jsx`)
- Authenticated layout → Cached page state: invalidates cached data (evidence: `src/layout/MainLayout.jsx`)
- Authenticated layout → Account header: renders (evidence: `src/layout/MainLayout.jsx`)
- Authenticated layout → Navigation sidebar: renders (evidence: `src/layout/MainLayout.jsx`)
- Authenticated layout → Finance dashboard: renders route (evidence: `src/App.jsx`)
- Authenticated layout → Transaction manager: renders route (evidence: `src/App.jsx`)
- Authenticated layout → Financial reports: renders route (evidence: `src/App.jsx`)
- Authenticated layout → Account settings: renders route (evidence: `src/App.jsx`)
- Finance dashboard → Transaction operations: fetches and adds (evidence: `src/pages/dashboard/Dashboard.jsx`)
- Finance dashboard → Cached page state: reads and updates (evidence: `src/pages/dashboard/Dashboard.jsx`)
- Finance dashboard → Transaction form: renders (evidence: `src/pages/dashboard/Dashboard.jsx`)
- Transaction form → Finance dashboard: submits transaction to (evidence: `src/components/common/TransactionForm/TransactionForm.jsx`)
- Finance dashboard → Summary card: renders summaries (evidence: `src/pages/dashboard/Dashboard.jsx`)
- Finance dashboard → Income expense chart: renders (evidence: `src/pages/dashboard/Dashboard.jsx`)
- Finance dashboard → Category spending chart: renders (evidence: `src/pages/dashboard/Dashboard.jsx`)
- Finance dashboard → Quick statistics: renders (evidence: `src/pages/dashboard/Dashboard.jsx`)
- Transaction manager → Transaction operations: fetches and deletes (evidence: `src/pages/transaction/Transaction.jsx`)
- Transaction manager → Cached page state: reads and updates (evidence: `src/pages/transaction/Transaction.jsx`)
- Transaction manager → Filter controls: renders filters (evidence: `src/pages/transaction/Transaction.jsx`)
- Transaction manager → Transaction list: renders filtered entries (evidence: `src/pages/transaction/Transaction.jsx`)
- Transaction manager → Summary card: renders totals (evidence: `src/pages/transaction/Transaction.jsx`)
- Transaction operations → Supabase client: queries (evidence: `src/lib/transactions.js`)
- Supabase client → Supabase backend: connects to (evidence: `src/lib/supabase.js`)
- Financial reports → Supabase client: queries report data (evidence: `src/pages/report/Report.jsx`)
- Financial reports → Cached page state: reads and updates (evidence: `src/pages/report/Report.jsx`)
- Financial reports → Monthly cash flow: renders (evidence: `src/pages/report/Report.jsx`)
- Financial reports → Category spending chart: renders (evidence: `src/pages/report/Report.jsx`)
- Financial reports → Monthly trends: renders (evidence: `src/pages/report/Report.jsx`)
- Monthly trends → Supabase client: queries data (evidence: `src/components/common/charts/MonthlyTrends/MonthlyTrends.jsx`)
- Supabase backend → Supabase client: notifies changes (evidence: `README.md`)
