# arnavbits26/multi_lender_marketplace architecture

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

- Interactive diagram: https://gitdiagram.com/arnavbits26/multi_lender_marketplace
- Repository: https://github.com/arnavbits26/multi_lender_marketplace

## Overview

This is a student-financing marketplace case study with a FastAPI backend, a standalone interactive demo, partner-specific eligibility and rate ranking, and event-based funnel analytics. The principal journey is to inspect partners, submit an applicant profile, compare ranked offers, select a partner, and initiate an application. The backend excerpt supports the API, matching, and analytics links shown; the README describes the demo, but its implementation was not sampled.

Main entry points: [`backend/main.py`](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py) (Event logging), [`backend/matching_engine.py`](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/matching_engine.py) (Eligibility evaluation), [`demo/index.html`](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/demo/index.html) (Interactive demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Applicant experience"]
  node_demo["Interactive demo<br/>[index.html]"]
  node_partner_listing["Partner listing<br/>[main.py]"]
  node_match_api["Match API<br/>[main.py]"]
end

subgraph group_matching["Offer matching"]
  node_partner_rules["Partner rules<br/>[matching_engine.py]"]
  node_offer_evaluation["Eligibility evaluation<br/>[matching_engine.py]"]
  node_offer_ranking["Rate ranking<br/>[matching_engine.py]"]
end

subgraph group_journey["Application journey"]
  node_partner_selection["Partner selection<br/>[main.py]"]
  node_application_start["Application initiation<br/>[main.py]"]
end

subgraph group_analytics["Funnel analytics"]
  node_event_logging["Event logging<br/>[main.py]"]
  node_event_store[("SQLite event log<br/>[main.py]")]
  node_funnel_analytics["Funnel analytics<br/>[main.py]"]
end

node_applicant(("Applicant"))

node_applicant -->|"tries demo"| node_demo
node_applicant -->|"views partners"| node_partner_listing
node_applicant -->|"submits profile"| node_match_api
node_applicant -->|"selects offer"| node_partner_selection
node_applicant -->|"starts application"| node_application_start
node_partner_listing -->|"returns partners"| node_partner_rules
node_match_api -->|"requests offers"| node_offer_ranking
node_offer_ranking -->|"evaluates partners"| node_offer_evaluation
node_offer_evaluation -->|"checks rules"| node_partner_rules
node_offer_evaluation -->|"returns offers"| node_offer_ranking
node_match_api -->|"logs journey"| node_event_logging
node_partner_selection -->|"logs selection"| node_event_logging
node_application_start -->|"logs initiation"| node_event_logging
node_event_logging -->|"writes events"| node_event_store
node_funnel_analytics -->|"queries counts"| node_event_store

click node_demo "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/demo/index.html"
click node_partner_listing "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py"
click node_match_api "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py"
click node_partner_rules "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/matching_engine.py"
click node_offer_evaluation "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/matching_engine.py"
click node_offer_ranking "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/matching_engine.py"
click node_partner_selection "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py"
click node_application_start "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py"
click node_event_logging "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py"
click node_event_store "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py"
click node_funnel_analytics "https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.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_demo,node_partner_listing,node_match_api toneBlue
class node_partner_rules,node_offer_evaluation,node_offer_ranking toneAmber
class node_partner_selection,node_application_start toneMint
class node_event_logging,node_event_store,node_funnel_analytics toneRose
class node_applicant toneIndigo
```

## Components

### Applicant experience

- [Interactive demo](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/demo/index.html): `demo/index.html`
- [Partner listing](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py): `backend/main.py`
- [Match API](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py): `backend/main.py`

### Offer matching

- [Partner rules](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/matching_engine.py): `backend/matching_engine.py`
- [Eligibility evaluation](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/matching_engine.py): `backend/matching_engine.py`
- [Rate ranking](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/matching_engine.py): `backend/matching_engine.py`

### Application journey

- [Partner selection](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py): `backend/main.py`
- [Application initiation](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py): `backend/main.py`

### Funnel analytics

- [Event logging](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py): `backend/main.py`
- [SQLite event log](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py): `backend/main.py`
- [Funnel analytics](https://github.com/arnavbits26/multi_lender_marketplace/blob/main/backend/main.py): `backend/main.py`

### Other components

- **Applicant**

## Connections

- Applicant → Interactive demo: tries demo (evidence: `README.md`)
- Applicant → Partner listing: views partners (evidence: `README.md`)
- Applicant → Match API: submits profile (evidence: `README.md`)
- Applicant → Partner selection: selects offer (evidence: `README.md`)
- Applicant → Application initiation: starts application (evidence: `README.md`)
- Partner listing → Partner rules: returns partners (evidence: `backend/main.py`)
- Match API → Rate ranking: requests offers (evidence: `backend/main.py`)
- Rate ranking → Eligibility evaluation: evaluates partners (evidence: `backend/matching_engine.py`)
- Eligibility evaluation → Partner rules: checks rules (evidence: `backend/matching_engine.py`)
- Eligibility evaluation → Rate ranking: returns offers (evidence: `backend/matching_engine.py`)
- Match API → Event logging: logs journey (evidence: `backend/main.py`)
- Partner selection → Event logging: logs selection (evidence: `backend/main.py`)
- Application initiation → Event logging: logs initiation (evidence: `backend/main.py`)
- Event logging → SQLite event log: writes events (evidence: `backend/main.py`)
- Funnel analytics → SQLite event log: queries counts (evidence: `backend/main.py`)
