# winfry/founderslink architecture

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

- Interactive diagram: https://gitdiagram.com/winfry/founderslink
- Repository: https://github.com/winfry/founderslink

## Overview

FounderLink is a platform for early-stage and under-networked African founders, with mobile founder/investor experiences and a web admin console. The main journey is account creation and profile setup, followed by vetting and compliance readiness; founders then discover funders, connect, and progress deals, with messaging and savings circles supporting that work. Backend APIs coordinate persistent state and call an internal AI service for matching, document analysis, moderation, vetting signals, and compliance answers. The README and source index establish the product capabilities; several client-to-API links and unsampled subsystems are shown as unverified where implementation excerpts were unavailable.

Main entry points: [`ai/service/main.py`](https://github.com/winfry/founderslink/blob/main/ai/service/main.py) (AI service API), [`backend/src/shared/db.ts`](https://github.com/winfry/founderslink/blob/main/backend/src/shared/db.ts) (Application database), [`backend/src/modules/network/network.routes.ts`](https://github.com/winfry/founderslink/blob/main/backend/src/modules/network/network.routes.ts) (Discovery and connections), [`backend/src/modules/messaging/messaging.service.ts`](https://github.com/winfry/founderslink/blob/main/backend/src/modules/messaging/messaging.service.ts) (Messaging and safety)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User applications"]
  node_founders["Founder app<br/>[matches.tsx]"]
  node_investors["Investor app<br/>[discover.tsx]"]
  node_admin["Admin console"]
end

subgraph group_platform["Platform API"]
  node_auth["Identity and access<br/>[auth.service.ts]"]
  node_profiles["Profiles and onboarding<br/>[profile.routes.ts]"]
  node_vetting["Member vetting<br/>[vetting.service.ts]"]
  node_readiness["Compliance readiness"]
  node_network["Discovery and connections<br/>[network.routes.ts]"]
  node_deals["Deals and diligence<br/>[deals.routes.ts]"]
  node_circles["Savings circles<br/>[circles.routes.ts]"]
  node_messaging["Messaging and safety"]
  node_notifications["Notifications"]
  node_admin_ops["Admin operations<br/>[admin.service.ts]"]
end

subgraph group_ai["AI capabilities"]
  node_ai_api["AI service API<br/>[main.py]"]
  node_matching["Funder matching<br/>[pipeline.py]"]
  node_compliance_ai["Compliance answers<br/>[answer.py]"]
  node_document_ai["Document analysis<br/>[precheck.py]"]
end

subgraph group_integrations["State and services"]
  node_database[("Application database<br/>[db.ts]")]
  node_realtime["Realtime delivery<br/>[realtime.ts]"]
end

node_external_users(("Founders and investors"))
node_external_admin(("Administrators"))

node_external_users -.->|"use"| node_founders
node_external_users -.->|"use"| node_investors
node_external_admin -.->|"review"| node_admin
node_founders -.->|"sign in"| node_auth
node_investors -.->|"sign in"| node_auth
node_auth -->|"reads"| node_database
node_profiles -->|"writes"| node_database
node_profiles -->|"requests extraction"| node_ai_api
node_vetting -->|"reads and writes"| node_database
node_vetting -->|"requests risk analysis"| node_ai_api
node_readiness -.->|"reads and writes"| node_database
node_network -->|"reads and writes"| node_database
node_network -->|"flags recheck"| node_vetting
node_network -.->|"requests matches"| node_matching
node_deals -.->|"manages deal state"| node_database
node_deals -->|"uses connections"| node_network
node_deals -->|"uses document rules"| node_vetting
node_circles -.->|"manages circle state"| node_database
node_messaging -->|"reads and writes"| node_database
node_messaging -->|"checks connections"| node_network
node_messaging -->|"triggers"| node_notifications
node_messaging -->|"publishes updates"| node_realtime
node_admin -.->|"manages"| node_admin_ops
node_admin_ops -.->|"reads and writes"| node_database
node_ai_api -->|"routes to"| node_matching
node_ai_api -->|"routes to"| node_compliance_ai
node_ai_api -->|"routes to"| node_document_ai
node_matching -->|"returns fit results"| node_ai_api
node_ai_api -->|"loads retriever"| node_compliance_ai
node_ai_api -.->|"serves matching"| node_investors
node_ai_api -.->|"supports compliance"| node_founders

click node_founders "https://github.com/winfry/founderslink/blob/main/mobile/app/(founder)/(tabs)/matches.tsx"
click node_investors "https://github.com/winfry/founderslink/blob/main/mobile/app/(investor)/(tabs)/discover.tsx"
click node_admin "https://github.com/winfry/founderslink/blob/main/admin/src/app/(dashboard)/deal-reviews/deal-reviews-view.tsx"
click node_auth "https://github.com/winfry/founderslink/blob/main/backend/src/modules/auth/auth.service.ts"
click node_profiles "https://github.com/winfry/founderslink/blob/main/backend/src/modules/profile/profile.routes.ts"
click node_vetting "https://github.com/winfry/founderslink/blob/main/backend/src/modules/vetting/vetting.service.ts"
click node_readiness "https://github.com/winfry/founderslink/blob/main/backend/src/modules/compliance/compliance.service.ts"
click node_network "https://github.com/winfry/founderslink/blob/main/backend/src/modules/network/network.routes.ts"
click node_deals "https://github.com/winfry/founderslink/blob/main/backend/src/modules/deals/deals.routes.ts"
click node_circles "https://github.com/winfry/founderslink/blob/main/backend/src/modules/circles/circles.routes.ts"
click node_messaging "https://github.com/winfry/founderslink/blob/main/backend/src/modules/messaging/messaging.service.ts"
click node_notifications "https://github.com/winfry/founderslink/blob/main/backend/src/modules/notifications/notifications.service.ts"
click node_admin_ops "https://github.com/winfry/founderslink/blob/main/backend/src/modules/admin/admin.service.ts"
click node_ai_api "https://github.com/winfry/founderslink/blob/main/ai/service/main.py"
click node_matching "https://github.com/winfry/founderslink/blob/main/ai/matching/pipeline.py"
click node_compliance_ai "https://github.com/winfry/founderslink/blob/main/ai/compliance_rag/answer.py"
click node_document_ai "https://github.com/winfry/founderslink/blob/main/ai/documents/precheck.py"
click node_database "https://github.com/winfry/founderslink/blob/main/backend/src/shared/db.ts"
click node_realtime "https://github.com/winfry/founderslink/blob/main/backend/src/realtime.ts"

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_founders,node_investors,node_admin toneBlue
class node_auth,node_profiles,node_vetting,node_readiness,node_network,node_deals,node_circles,node_messaging,node_notifications,node_admin_ops toneAmber
class node_ai_api,node_matching,node_compliance_ai,node_document_ai toneMint
class node_database,node_realtime toneRose
class node_external_users,node_external_admin toneIndigo
```

## Components

### User applications

- [Founder app](https://github.com/winfry/founderslink/blob/main/mobile/app/(founder)/(tabs)/matches.tsx): `mobile/app/(founder)/(tabs)/matches.tsx`
- [Investor app](https://github.com/winfry/founderslink/blob/main/mobile/app/(investor)/(tabs)/discover.tsx): `mobile/app/(investor)/(tabs)/discover.tsx`
- [Admin console](https://github.com/winfry/founderslink/blob/main/admin/src/app/(dashboard)/deal-reviews/deal-reviews-view.tsx): `admin/src/app/(dashboard)/deal-reviews/deal-reviews-view.tsx`

### Platform API

- [Identity and access](https://github.com/winfry/founderslink/blob/main/backend/src/modules/auth/auth.service.ts): `backend/src/modules/auth/auth.service.ts`
- [Profiles and onboarding](https://github.com/winfry/founderslink/blob/main/backend/src/modules/profile/profile.routes.ts): `backend/src/modules/profile/profile.routes.ts`
- [Member vetting](https://github.com/winfry/founderslink/blob/main/backend/src/modules/vetting/vetting.service.ts): `backend/src/modules/vetting/vetting.service.ts`
- [Compliance readiness](https://github.com/winfry/founderslink/blob/main/backend/src/modules/compliance/compliance.service.ts): `backend/src/modules/compliance/compliance.service.ts`
- [Discovery and connections](https://github.com/winfry/founderslink/blob/main/backend/src/modules/network/network.routes.ts): `backend/src/modules/network/network.routes.ts`
- [Deals and diligence](https://github.com/winfry/founderslink/blob/main/backend/src/modules/deals/deals.routes.ts): `backend/src/modules/deals/deals.routes.ts`
- [Savings circles](https://github.com/winfry/founderslink/blob/main/backend/src/modules/circles/circles.routes.ts): `backend/src/modules/circles/circles.routes.ts`
- [Messaging and safety](https://github.com/winfry/founderslink/blob/main/backend/src/modules/messaging/messaging.service.ts): `backend/src/modules/messaging/messaging.service.ts`
- [Notifications](https://github.com/winfry/founderslink/blob/main/backend/src/modules/notifications/notifications.service.ts): `backend/src/modules/notifications/notifications.service.ts`
- [Admin operations](https://github.com/winfry/founderslink/blob/main/backend/src/modules/admin/admin.service.ts): `backend/src/modules/admin/admin.service.ts`

### AI capabilities

- [AI service API](https://github.com/winfry/founderslink/blob/main/ai/service/main.py): `ai/service/main.py`
- [Funder matching](https://github.com/winfry/founderslink/blob/main/ai/matching/pipeline.py): `ai/matching/pipeline.py`
- [Compliance answers](https://github.com/winfry/founderslink/blob/main/ai/compliance_rag/answer.py): `ai/compliance_rag/answer.py`
- [Document analysis](https://github.com/winfry/founderslink/blob/main/ai/documents/precheck.py): `ai/documents/precheck.py`

### State and services

- [Application database](https://github.com/winfry/founderslink/blob/main/backend/src/shared/db.ts): `backend/src/shared/db.ts`
- [Realtime delivery](https://github.com/winfry/founderslink/blob/main/backend/src/realtime.ts): `backend/src/realtime.ts`

### Other components

- **Founders and investors**
- **Administrators**

## Connections

- Founders and investors → Founder app: use
- Founders and investors → Investor app: use
- Administrators → Admin console: review
- Founder app → Identity and access: sign in
- Investor app → Identity and access: sign in
- Identity and access → Application database: reads (evidence: `backend/src/modules/auth/auth.service.ts`)
- Profiles and onboarding → Application database: writes (evidence: `backend/src/modules/profile/profile.routes.ts`)
- Profiles and onboarding → AI service API: requests extraction (evidence: `backend/src/modules/profile/profile.routes.ts`)
- Member vetting → Application database: reads and writes (evidence: `backend/src/modules/vetting/vetting.service.ts`)
- Member vetting → AI service API: requests risk analysis (evidence: `backend/src/modules/vetting/vetting.service.ts`)
- Compliance readiness → Application database: reads and writes
- Discovery and connections → Application database: reads and writes (evidence: `backend/src/modules/network/network.routes.ts`)
- Discovery and connections → Member vetting: flags recheck (evidence: `backend/src/modules/network/network.routes.ts`)
- Discovery and connections → Funder matching: requests matches
- Deals and diligence → Application database: manages deal state
- Deals and diligence → Discovery and connections: uses connections (evidence: `backend/src/modules/deals/deals.routes.ts`)
- Deals and diligence → Member vetting: uses document rules (evidence: `backend/src/modules/deals/deals.routes.ts`)
- Savings circles → Application database: manages circle state
- Messaging and safety → Application database: reads and writes (evidence: `backend/src/modules/messaging/messaging.service.ts`)
- Messaging and safety → Discovery and connections: checks connections (evidence: `backend/src/modules/messaging/messaging.service.ts`)
- Messaging and safety → Notifications: triggers (evidence: `backend/src/modules/messaging/messaging.service.ts`)
- Messaging and safety → Realtime delivery: publishes updates (evidence: `backend/src/modules/messaging/messaging.service.ts`)
- Admin console → Admin operations: manages
- Admin operations → Application database: reads and writes
- AI service API → Funder matching: routes to (evidence: `ai/service/main.py`)
- AI service API → Compliance answers: routes to (evidence: `ai/service/main.py`)
- AI service API → Document analysis: routes to (evidence: `ai/service/main.py`)
- Funder matching → AI service API: returns fit results (evidence: `ai/matching/pipeline.py`)
- AI service API → Compliance answers: loads retriever (evidence: `ai/service/main.py`)
- AI service API → Investor app: serves matching
- AI service API → Founder app: supports compliance
