# s-r-enterprises/nepal_lend architecture

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

- Interactive diagram: https://gitdiagram.com/s-r-enterprises/nepal_lend
- Repository: https://github.com/s-r-enterprises/nepal_lend

## Overview

This repository is a Flutter app whose screens suggest a Nepal lending experience: onboarding and identity checks, borrower loan requests and repayment, and lender loan browsing and funding. The README only identifies a starter Flutter project, so the product flow and screen-to-screen navigation are inferred from filenames, not verified in source excerpts. No backend, persistence, or external service integration is evidenced. Native platform files appear to be Flutter hosts; the graph focuses on the Dart UI and notes a few indexed host components.

Main entry points: [`windows/runner/flutter_window.cpp`](https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/flutter_window.cpp) (Windows Flutter host), [`lib/main.dart`](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/main.dart) (App entry), [`windows/runner/win32_window.cpp`](https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/win32_window.cpp) (Windows window), [`linux/runner/my_application.h`](https://github.com/s-r-enterprises/nepal_lend/blob/main/linux/runner/my_application.h) (Linux app interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Flutter app"]
  node_entry["App entry<br/>[main.dart]"]
  node_routing["Screen routing<br/>[routes.dart]"]
  node_ui["UI components<br/>[ui.dart]"]
  node_theme["App theme<br/>[app_colors.dart]"]
end

subgraph group_onboard["Onboarding"]
  node_onboard["Account setup"]
end

subgraph group_borrow["Borrower experience"]
  node_borrow_home["Borrower home"]
  node_loan_request["Loan request"]
  node_risk["Risk review"]
  node_agreement["Loan agreement"]
  node_repayment["Repayment<br/>[repay_screen.dart]"]
end

subgraph group_lend["Lender experience"]
  node_lender_home["Lender home"]
  node_browse["Browse loans"]
  node_funding["Fund a loan"]
  node_portfolio["Lender portfolio"]
  node_wallet["Wallet and transactions<br/>[wallet_screen.dart]"]
end

subgraph group_shared["Shared experience"]
  node_shared_screens["Profile and support"]
end

subgraph group_hosts["Platform hosts"]
  node_win_entry["Windows launcher<br/>[main.cpp]"]
  node_win_flutter["Windows Flutter host<br/>[flutter_window.cpp]"]
  node_win_window["Windows window<br/>[win32_window.cpp]"]
  node_win_header["Windows host interface<br/>[flutter_window.h]"]
  node_win_window_header["Window interface<br/>[win32_window.h]"]
  node_linux_entry["Linux launcher<br/>[main.cc]"]
  node_linux_app["Linux application<br/>[my_application.cc]"]
  node_linux_interface["Linux app interface<br/>[my_application.h]"]
  node_linux_plugins["Linux plugin registry"]
  node_win_plugins["Windows plugin registry"]
  node_mac_plugins["macOS plugin registry"]
end

node_user(("App user"))

node_user -.->|"opens app"| node_entry
node_entry -.->|"routes screens"| node_routing
node_user -.->|"sets up account"| node_onboard
node_user -.->|"uses borrower flow"| node_borrow_home
node_user -.->|"uses lender flow"| node_lender_home
node_win_entry -->|"creates host"| node_win_flutter
node_win_flutter -.->|"inherits window"| node_win_window
node_win_flutter -->|"implements"| node_win_header
node_win_window -->|"implements"| node_win_window_header
node_linux_entry -->|"creates application"| node_linux_interface
node_linux_app -.->|"implements"| node_linux_interface

click node_entry "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/main.dart"
click node_routing "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/routes.dart"
click node_ui "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/widgets/ui.dart"
click node_theme "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/theme/app_colors.dart"
click node_onboard "https://github.com/s-r-enterprises/nepal_lend/tree/main/lib/screens/onboarding"
click node_borrow_home "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/borrower_home_screen.dart"
click node_loan_request "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/request_loan_screen.dart"
click node_risk "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/risk_review_screen.dart"
click node_agreement "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/loan_agreement_screen.dart"
click node_repayment "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/repay_screen.dart"
click node_lender_home "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/lender_home_screen.dart"
click node_browse "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/browse_loans_screen.dart"
click node_funding "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/fund_loan_sheet.dart"
click node_portfolio "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/portfolio_screen.dart"
click node_wallet "https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/wallet_screen.dart"
click node_shared_screens "https://github.com/s-r-enterprises/nepal_lend/tree/main/lib/screens/shared"
click node_win_entry "https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/main.cpp"
click node_win_flutter "https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/flutter_window.cpp"
click node_win_window "https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/win32_window.cpp"
click node_win_header "https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/flutter_window.h"
click node_win_window_header "https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/win32_window.h"
click node_linux_entry "https://github.com/s-r-enterprises/nepal_lend/blob/main/linux/runner/main.cc"
click node_linux_app "https://github.com/s-r-enterprises/nepal_lend/blob/main/linux/runner/my_application.cc"
click node_linux_interface "https://github.com/s-r-enterprises/nepal_lend/blob/main/linux/runner/my_application.h"
click node_linux_plugins "https://github.com/s-r-enterprises/nepal_lend/blob/main/linux/flutter/generated_plugin_registrant.h"
click node_win_plugins "https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/flutter/generated_plugin_registrant.h"
click node_mac_plugins "https://github.com/s-r-enterprises/nepal_lend/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift"

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_entry,node_routing,node_ui,node_theme,node_user toneBlue
class node_onboard toneAmber
class node_borrow_home,node_loan_request,node_risk,node_agreement,node_repayment toneMint
class node_lender_home,node_browse,node_funding,node_portfolio,node_wallet toneRose
class node_shared_screens toneIndigo
class node_win_entry,node_win_flutter,node_win_window,node_win_header,node_win_window_header,node_linux_entry,node_linux_app,node_linux_interface,node_linux_plugins,node_win_plugins,node_mac_plugins toneTeal
```

## Components

### Flutter app

- [App entry](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/main.dart): `lib/main.dart`
- [Screen routing](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/routes.dart): `lib/routes.dart`
- [UI components](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/widgets/ui.dart): `lib/widgets/ui.dart`
- [App theme](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/theme/app_colors.dart): `lib/theme/app_colors.dart`

### Onboarding

- [Account setup](https://github.com/s-r-enterprises/nepal_lend/tree/main/lib/screens/onboarding): `lib/screens/onboarding`

### Borrower experience

- [Borrower home](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/borrower_home_screen.dart): `lib/screens/borrower/borrower_home_screen.dart`
- [Loan request](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/request_loan_screen.dart): `lib/screens/borrower/request_loan_screen.dart`
- [Risk review](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/risk_review_screen.dart): `lib/screens/borrower/risk_review_screen.dart`
- [Loan agreement](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/loan_agreement_screen.dart): `lib/screens/borrower/loan_agreement_screen.dart`
- [Repayment](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/borrower/repay_screen.dart): `lib/screens/borrower/repay_screen.dart`

### Lender experience

- [Lender home](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/lender_home_screen.dart): `lib/screens/lender/lender_home_screen.dart`
- [Browse loans](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/browse_loans_screen.dart): `lib/screens/lender/browse_loans_screen.dart`
- [Fund a loan](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/fund_loan_sheet.dart): `lib/screens/lender/fund_loan_sheet.dart`
- [Lender portfolio](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/portfolio_screen.dart): `lib/screens/lender/portfolio_screen.dart`
- [Wallet and transactions](https://github.com/s-r-enterprises/nepal_lend/blob/main/lib/screens/lender/wallet_screen.dart): `lib/screens/lender/wallet_screen.dart`

### Shared experience

- [Profile and support](https://github.com/s-r-enterprises/nepal_lend/tree/main/lib/screens/shared): `lib/screens/shared`

### Platform hosts

- [Windows launcher](https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Windows Flutter host](https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Windows window](https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [Windows host interface](https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Window interface](https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/runner/win32_window.h): `windows/runner/win32_window.h`
- [Linux launcher](https://github.com/s-r-enterprises/nepal_lend/blob/main/linux/runner/main.cc): `linux/runner/main.cc`
- [Linux application](https://github.com/s-r-enterprises/nepal_lend/blob/main/linux/runner/my_application.cc): `linux/runner/my_application.cc`
- [Linux app interface](https://github.com/s-r-enterprises/nepal_lend/blob/main/linux/runner/my_application.h): `linux/runner/my_application.h`
- [Linux plugin registry](https://github.com/s-r-enterprises/nepal_lend/blob/main/linux/flutter/generated_plugin_registrant.h): `linux/flutter/generated_plugin_registrant.h`
- [Windows plugin registry](https://github.com/s-r-enterprises/nepal_lend/blob/main/windows/flutter/generated_plugin_registrant.h): `windows/flutter/generated_plugin_registrant.h`
- [macOS plugin registry](https://github.com/s-r-enterprises/nepal_lend/blob/main/macos/Flutter/GeneratedPluginRegistrant.swift): `macos/Flutter/GeneratedPluginRegistrant.swift`

### Other components

- **App user**

## Connections

- App user → App entry: opens app
- App entry → Screen routing: routes screens
- App user → Account setup: sets up account
- App user → Borrower home: uses borrower flow
- App user → Lender home: uses lender flow
- Windows launcher → Windows Flutter host: creates host (evidence: `windows/runner/main.cpp`)
- Windows Flutter host → Windows window: inherits window
- Windows Flutter host → Windows host interface: implements (evidence: `windows/runner/flutter_window.cpp`)
- Windows window → Window interface: implements (evidence: `windows/runner/win32_window.cpp`)
- Linux launcher → Linux app interface: creates application (evidence: `linux/runner/main.cc`)
- Linux application → Linux app interface: implements (evidence: `linux/runner/my_application.cc`)
