# sakethreddymamidigari/finnect-finance-os architecture

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

- Interactive diagram: https://gitdiagram.com/sakethreddymamidigari/finnect-finance-os
- Repository: https://github.com/sakethreddymamidigari/finnect-finance-os

## Overview

FINNECT is a finance-business loan management system. A finance owner signs in, manages customers and loans, records payments, and follows renewals or settlements; dashboard and report views summarize business activity. The React app calls a FastAPI REST backend, whose services apply business logic and use SQLAlchemy-backed PostgreSQL data. The graph preserves the README’s major capabilities, but many routes and frontend modules were not sampled; those subsystems are represented at their known paths, with only documented or indexed relationships shown.

Main entry points: [`backend/app/api`](https://github.com/sakethreddymamidigari/finnect-finance-os/tree/main/backend/app/api) (API routers), [`frontend/src/routes/AppRouter.tsx`](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/routes/AppRouter.tsx) (App routing), [`backend/app/models`](https://github.com/sakethreddymamidigari/finnect-finance-os/tree/main/backend/app/models) (Finance records), [`frontend/src/api/axios.ts`](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/api/axios.ts) (HTTP client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_router["App routing<br/>[AppRouter.tsx]"]
  node_authui["Owner access<br/>[AuthPage.tsx]"]
  node_customerui["Customer records"]
  node_loanui["Loan workflows<br/>[LoanDetailPage.tsx]"]
  node_dashboardui["Dashboard reports<br/>[DashboardPage.tsx]"]
  node_otherui["Payments settings<br/>[PaymentsPage.tsx]"]
  node_authctx["Session state<br/>[AuthContext.tsx]"]
  node_webapi["HTTP client<br/>[axios.ts]"]
  node_authsvc["Authentication calls<br/>[authService.ts]"]
  node_customersvc["Customer calls<br/>[customerService.ts]"]
  node_loansvcweb["Loan calls<br/>[loanService.ts]"]
  node_dashsvcweb["Dashboard calls"]
end

subgraph group_api["REST API"]
  node_apis["API routers"]
  node_auth["JWT authorization<br/>[auth.py]"]
end

subgraph group_domain["Finance operations"]
  node_ownersvc["Owner management"]
  node_customersvcback["Customer management"]
  node_loansvcback["Loan lifecycle<br/>[loan_service.py]"]
  node_paymentsvc["Payment allocation<br/>[payment_service.py]"]
  node_renewalsvc["Loan renewals"]
  node_dashsvc["Analytics reports"]
  node_settingsvc["Finance settings"]
end

subgraph group_data["Data and calculations"]
  node_interest["Interest calculation"]
  node_models["Finance records"]
  node_store[("PostgreSQL")]
end

node_owner(("Finance owner"))

node_owner -->|"uses"| node_router
node_router -->|"routes to"| node_authui
node_router -->|"routes to"| node_dashboardui
node_router -->|"routes to"| node_customerui
node_router -->|"routes to"| node_loanui
node_router -->|"routes to"| node_otherui
node_authui -->|"updates session"| node_authctx
node_authsvc -->|"sends requests"| node_webapi
node_customersvc -->|"sends requests"| node_webapi
node_loansvcweb -->|"sends requests"| node_webapi
node_dashsvcweb -->|"sends requests"| node_webapi
node_authui -->|"authenticates"| node_authsvc
node_customerui -->|"loads records"| node_customersvc
node_dashboardui -->|"loads reports"| node_dashsvcweb
node_loanui -->|"requests loans"| node_loansvcweb
node_webapi -->|"REST requests"| node_apis
node_apis -.->|"delegates"| node_ownersvc
node_apis -.->|"delegates"| node_customersvcback
node_apis -->|"delegates"| node_loansvcback
node_apis -.->|"delegates"| node_paymentsvc
node_apis -.->|"delegates"| node_renewalsvc
node_apis -->|"delegates"| node_dashsvc
node_apis -.->|"delegates"| node_settingsvc
node_apis -->|"checks identity"| node_auth
node_customersvcback -->|"reads and writes"| node_models
node_loansvcback -->|"reads and writes"| node_models
node_loansvcback -->|"calculates interest"| node_interest
node_paymentsvc -->|"reads and writes"| node_models
node_paymentsvc -->|"calculates interest"| node_interest
node_renewalsvc -->|"updates loan records"| node_models
node_renewalsvc -->|"calculates interest"| node_interest
node_dashsvc -->|"queries metrics"| node_models
node_dashsvc -->|"calculates accrual"| node_interest
node_models -->|"persists records"| node_store

click node_router "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/routes/AppRouter.tsx"
click node_authui "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/auth/AuthPage.tsx"
click node_customerui "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/customers/CustomerLedgerPage.tsx"
click node_loanui "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/loans/LoanDetailPage.tsx"
click node_dashboardui "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/dashboard/DashboardPage.tsx"
click node_otherui "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/payments/PaymentsPage.tsx"
click node_authctx "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/context/AuthContext.tsx"
click node_webapi "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/api/axios.ts"
click node_authsvc "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/services/authService.ts"
click node_customersvc "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/services/customerService.ts"
click node_loansvcweb "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/services/loanService.ts"
click node_dashsvcweb "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/services/dashboardService.ts"
click node_apis "https://github.com/sakethreddymamidigari/finnect-finance-os/tree/main/backend/app/api"
click node_auth "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/core/auth.py"
click node_ownersvc "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/finance_owner_service.py"
click node_customersvcback "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/customer_service.py"
click node_loansvcback "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/loan_service.py"
click node_paymentsvc "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/payment_service.py"
click node_renewalsvc "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/loan_renewal_service.py"
click node_dashsvc "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/dashboard_service.py"
click node_settingsvc "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/finance_settings_service.py"
click node_interest "https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/utils/interest_calculator.py"
click node_models "https://github.com/sakethreddymamidigari/finnect-finance-os/tree/main/backend/app/models"

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_router,node_authui,node_customerui,node_loanui,node_dashboardui,node_otherui,node_authctx,node_webapi,node_authsvc,node_customersvc,node_loansvcweb,node_dashsvcweb toneBlue
class node_apis,node_auth toneAmber
class node_ownersvc,node_customersvcback,node_loansvcback,node_paymentsvc,node_renewalsvc,node_dashsvc,node_settingsvc toneMint
class node_interest,node_models,node_store toneRose
class node_owner toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/routes/AppRouter.tsx): `frontend/src/routes/AppRouter.tsx`
- [Owner access](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/auth/AuthPage.tsx): `frontend/src/pages/auth/AuthPage.tsx`
- [Customer records](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/customers/CustomerLedgerPage.tsx): `frontend/src/pages/customers/CustomerLedgerPage.tsx`
- [Loan workflows](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/loans/LoanDetailPage.tsx): `frontend/src/pages/loans/LoanDetailPage.tsx`
- [Dashboard reports](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/dashboard/DashboardPage.tsx): `frontend/src/pages/dashboard/DashboardPage.tsx`
- [Payments settings](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/pages/payments/PaymentsPage.tsx): `frontend/src/pages/payments/PaymentsPage.tsx`
- [Session state](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [HTTP client](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/api/axios.ts): `frontend/src/api/axios.ts`
- [Authentication calls](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/services/authService.ts): `frontend/src/services/authService.ts`
- [Customer calls](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/services/customerService.ts): `frontend/src/services/customerService.ts`
- [Loan calls](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/services/loanService.ts): `frontend/src/services/loanService.ts`
- [Dashboard calls](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/frontend/src/services/dashboardService.ts): `frontend/src/services/dashboardService.ts`

### REST API

- [API routers](https://github.com/sakethreddymamidigari/finnect-finance-os/tree/main/backend/app/api): `backend/app/api`
- [JWT authorization](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/core/auth.py): `backend/app/core/auth.py`

### Finance operations

- [Owner management](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/finance_owner_service.py): `backend/app/services/finance_owner_service.py`
- [Customer management](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/customer_service.py): `backend/app/services/customer_service.py`
- [Loan lifecycle](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/loan_service.py): `backend/app/services/loan_service.py`
- [Payment allocation](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/payment_service.py): `backend/app/services/payment_service.py`
- [Loan renewals](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/loan_renewal_service.py): `backend/app/services/loan_renewal_service.py`
- [Analytics reports](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/dashboard_service.py): `backend/app/services/dashboard_service.py`
- [Finance settings](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/services/finance_settings_service.py): `backend/app/services/finance_settings_service.py`

### Data and calculations

- [Interest calculation](https://github.com/sakethreddymamidigari/finnect-finance-os/blob/main/backend/app/utils/interest_calculator.py): `backend/app/utils/interest_calculator.py`
- [Finance records](https://github.com/sakethreddymamidigari/finnect-finance-os/tree/main/backend/app/models): `backend/app/models`
- **PostgreSQL**

### Other components

- **Finance owner**

## Connections

- Finance owner → App routing: uses (evidence: `frontend/src/routes/AppRouter.tsx`)
- App routing → Owner access: routes to (evidence: `frontend/src/routes/AppRouter.tsx`)
- App routing → Dashboard reports: routes to (evidence: `frontend/src/routes/AppRouter.tsx`)
- App routing → Customer records: routes to (evidence: `frontend/src/routes/AppRouter.tsx`)
- App routing → Loan workflows: routes to (evidence: `frontend/src/routes/AppRouter.tsx`)
- App routing → Payments settings: routes to (evidence: `frontend/src/routes/AppRouter.tsx`)
- Owner access → Session state: updates session (evidence: `frontend/src/pages/auth/AuthPage.tsx`)
- Authentication calls → HTTP client: sends requests (evidence: `frontend/src/services/authService.ts`)
- Customer calls → HTTP client: sends requests (evidence: `frontend/src/services/customerService.ts`)
- Loan calls → HTTP client: sends requests (evidence: `frontend/src/services/loanService.ts`)
- Dashboard calls → HTTP client: sends requests (evidence: `frontend/src/services/dashboardService.ts`)
- Owner access → Authentication calls: authenticates (evidence: `frontend/src/pages/auth/AuthPage.tsx`)
- Customer records → Customer calls: loads records (evidence: `frontend/src/pages/customers/CustomerLedgerPage.tsx`)
- Dashboard reports → Dashboard calls: loads reports (evidence: `frontend/src/pages/dashboard/DashboardPage.tsx`)
- Loan workflows → Loan calls: requests loans (evidence: `frontend/src/pages/loans/LoanDetailPage.tsx`)
- HTTP client → API routers: REST requests (evidence: `README.md`)
- API routers → Owner management: delegates
- API routers → Customer management: delegates
- API routers → Loan lifecycle: delegates (evidence: `backend/app/api/loan.py`)
- API routers → Payment allocation: delegates
- API routers → Loan renewals: delegates
- API routers → Analytics reports: delegates (evidence: `backend/app/api/dashboard.py`)
- API routers → Finance settings: delegates
- API routers → JWT authorization: checks identity (evidence: `backend/app/api/loan.py`)
- Customer management → Finance records: reads and writes (evidence: `backend/app/services/customer_service.py`)
- Loan lifecycle → Finance records: reads and writes (evidence: `backend/app/services/loan_service.py`)
- Loan lifecycle → Interest calculation: calculates interest (evidence: `backend/app/services/loan_service.py`)
- Payment allocation → Finance records: reads and writes (evidence: `backend/app/services/payment_service.py`)
- Payment allocation → Interest calculation: calculates interest (evidence: `backend/app/services/payment_service.py`)
- Loan renewals → Finance records: updates loan records (evidence: `backend/app/services/loan_renewal_service.py`)
- Loan renewals → Interest calculation: calculates interest (evidence: `backend/app/services/loan_renewal_service.py`)
- Analytics reports → Finance records: queries metrics (evidence: `backend/app/services/dashboard_service.py`)
- Analytics reports → Interest calculation: calculates accrual (evidence: `backend/app/services/dashboard_service.py`)
- Finance records → PostgreSQL: persists records (evidence: `README.md`)
