# tahreem014/pitchbridge-ventures architecture

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

- Interactive diagram: https://gitdiagram.com/tahreem014/pitchbridge-ventures
- Repository: https://github.com/tahreem014/pitchbridge-ventures

## Overview

PitchBridge is a role-based startup investing platform. The main user journey runs from signing in and discovering ideas to requesting pitch access, proposing investment terms, and managing an agreement; investors can also track deals in a portfolio. The graph preserves documented public pages and admin routes, plus messaging, analytics, and portfolio capabilities. Evidence is limited to the README, source index, and sampled excerpts; unsampled implementation details are not assumed.

Main entry points: [`src/App.tsx`](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/App.tsx) (Route application), [`src/lib/agreements.ts`](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/agreements.ts) (Agreement operations), [`src/components/proposals/ProposalsView.tsx`](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/proposals/ProposalsView.tsx) (Proposal management), [`src/hooks/useAuth.tsx`](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/hooks/useAuth.tsx) (Session and roles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and access"]
  node_app["Route application<br/>[App.tsx]"]
  node_public["Public pages"]
  node_authpage["Sign-in and signup<br/>[Auth.tsx]"]
  node_auth["Session and roles<br/>[useAuth.tsx]"]
  node_shell["Authenticated app shell<br/>[AppShell.tsx]"]
end

subgraph group_venture["Ideas and pitch access"]
  node_ideas["Idea creation and details"]
  node_discovery["Idea discovery<br/>[Explore.tsx]"]
  node_pitch["Pitch access<br/>[AccessView.tsx]"]
  node_pitchdocs["Pitch documents<br/>[pitchDocuments.ts]"]
end

subgraph group_deal["Deal workflow"]
  node_proposalui["Proposal management<br/>[ProposalsView.tsx]"]
  node_proposaldata["Proposal operations<br/>[proposals.ts]"]
  node_agreementpage["Agreement details"]
  node_agreements["Agreement operations<br/>[agreements.ts]"]
  node_agreementpdf["Agreement PDF<br/>[agreementPdf.ts]"]
end

subgraph group_insights["Communication and insights"]
  node_messages["Messaging<br/>[Messages.tsx]"]
  node_messageops["Message helpers<br/>[messages.ts]"]
  node_analytics["Founder analytics<br/>[Analytics.tsx]"]
  node_portfolio["Investor portfolio<br/>[PortfolioView.tsx]"]
  node_charts["Chart components<br/>[kit.tsx]"]
  node_admin["Admin routes<br/>[Placeholder.tsx]"]
end

subgraph group_platform["Platform services"]
  node_supabase["Supabase client<br/>[client.ts]"]
  node_database[("Supabase data")]
  node_ui["Shared UI components"]
end

node_visitor(("Platform visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_public
node_app -->|"routes to"| node_authpage
node_app -->|"provides context"| node_auth
node_app -->|"routes to"| node_ideas
node_app -->|"routes to"| node_discovery
node_app -->|"routes to"| node_messages
node_app -->|"routes to"| node_proposalui
node_app -->|"routes to"| node_agreementpage
node_app -->|"routes to"| node_analytics
node_app -->|"routes to"| node_portfolio
node_app -->|"routes to"| node_admin
node_authpage -->|"uses auth"| node_auth
node_auth -->|"auth and roles"| node_supabase
node_auth -->|"queries roles"| node_database
node_supabase -->|"connects"| node_database
node_ideas -.->|"opens access"| node_pitch
node_pitch -->|"uses access rules"| node_pitchdocs
node_proposalui -->|"uses proposals"| node_proposaldata
node_proposalui -->|"uses messaging"| node_messageops
node_proposalui -->|"uses deal data"| node_portfolio
node_agreementpage -->|"saves terms"| node_agreements
node_agreements -->|"reads agreements"| node_supabase
node_agreements -->|"uses names"| node_messageops
node_agreements -->|"uses money formats"| node_portfolio
node_agreementpdf -->|"uses agreement data"| node_agreements
node_messages -->|"reads and sends"| node_supabase
node_messages -->|"uses helpers"| node_messageops
node_analytics -.->|"renders charts"| node_charts
node_portfolio -->|"renders charts"| node_charts
node_authpage -->|"renders controls"| node_ui

click node_app "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/App.tsx"
click node_public "https://github.com/tahreem014/pitchbridge-ventures/tree/main/src/pages"
click node_authpage "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/Auth.tsx"
click node_auth "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/hooks/useAuth.tsx"
click node_shell "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/AppShell.tsx"
click node_ideas "https://github.com/tahreem014/pitchbridge-ventures/tree/main/src/pages/app"
click node_discovery "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/Explore.tsx"
click node_pitch "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/pitch/AccessView.tsx"
click node_pitchdocs "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/pitchDocuments.ts"
click node_proposalui "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/proposals/ProposalsView.tsx"
click node_proposaldata "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/proposals.ts"
click node_agreementpage "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/app/AgreementDetail.tsx"
click node_agreements "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/agreements.ts"
click node_agreementpdf "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/agreementPdf.ts"
click node_messages "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/app/Messages.tsx"
click node_messageops "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/messages.ts"
click node_analytics "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/app/Analytics.tsx"
click node_portfolio "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/portfolio/PortfolioView.tsx"
click node_charts "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/charts/kit.tsx"
click node_admin "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/app/Placeholder.tsx"
click node_supabase "https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/integrations/supabase/client.ts"
click node_ui "https://github.com/tahreem014/pitchbridge-ventures/tree/main/src/components/ui"

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_public,node_authpage,node_auth,node_shell toneBlue
class node_ideas,node_discovery,node_pitch,node_pitchdocs toneAmber
class node_proposalui,node_proposaldata,node_agreementpage,node_agreements,node_agreementpdf toneMint
class node_messages,node_messageops,node_analytics,node_portfolio,node_charts,node_admin toneRose
class node_supabase,node_database,node_ui,node_visitor toneIndigo
```

## Components

### Entry and access

- [Route application](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/App.tsx): `src/App.tsx`
- [Public pages](https://github.com/tahreem014/pitchbridge-ventures/tree/main/src/pages): `src/pages`
- [Sign-in and signup](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/Auth.tsx): `src/pages/Auth.tsx`
- [Session and roles](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/hooks/useAuth.tsx): `src/hooks/useAuth.tsx`
- [Authenticated app shell](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/AppShell.tsx): `src/components/AppShell.tsx`

### Ideas and pitch access

- [Idea creation and details](https://github.com/tahreem014/pitchbridge-ventures/tree/main/src/pages/app): `src/pages/app`
- [Idea discovery](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/Explore.tsx): `src/pages/Explore.tsx`
- [Pitch access](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/pitch/AccessView.tsx): `src/components/pitch/AccessView.tsx`
- [Pitch documents](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/pitchDocuments.ts): `src/lib/pitchDocuments.ts`

### Deal workflow

- [Proposal management](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/proposals/ProposalsView.tsx): `src/components/proposals/ProposalsView.tsx`
- [Proposal operations](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/proposals.ts): `src/lib/proposals.ts`
- [Agreement details](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/app/AgreementDetail.tsx): `src/pages/app/AgreementDetail.tsx`
- [Agreement operations](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/agreements.ts): `src/lib/agreements.ts`
- [Agreement PDF](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/agreementPdf.ts): `src/lib/agreementPdf.ts`

### Communication and insights

- [Messaging](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/app/Messages.tsx): `src/pages/app/Messages.tsx`
- [Message helpers](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/lib/messages.ts): `src/lib/messages.ts`
- [Founder analytics](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/app/Analytics.tsx): `src/pages/app/Analytics.tsx`
- [Investor portfolio](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/portfolio/PortfolioView.tsx): `src/components/portfolio/PortfolioView.tsx`
- [Chart components](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/components/charts/kit.tsx): `src/components/charts/kit.tsx`
- [Admin routes](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/pages/app/Placeholder.tsx): `src/pages/app/Placeholder.tsx`

### Platform services

- [Supabase client](https://github.com/tahreem014/pitchbridge-ventures/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- **Supabase data**
- [Shared UI components](https://github.com/tahreem014/pitchbridge-ventures/tree/main/src/components/ui): `src/components/ui`

### Other components

- **Platform visitor**

## Connections

- Platform visitor → Route application: opens (evidence: `src/App.tsx`)
- Route application → Public pages: routes to (evidence: `src/App.tsx`)
- Route application → Sign-in and signup: routes to (evidence: `src/App.tsx`)
- Route application → Session and roles: provides context (evidence: `src/App.tsx`)
- Route application → Idea creation and details: routes to (evidence: `src/App.tsx`)
- Route application → Idea discovery: routes to (evidence: `src/App.tsx`)
- Route application → Messaging: routes to (evidence: `src/App.tsx`)
- Route application → Proposal management: routes to (evidence: `src/App.tsx`)
- Route application → Agreement details: routes to (evidence: `src/App.tsx`)
- Route application → Founder analytics: routes to (evidence: `src/App.tsx`)
- Route application → Investor portfolio: routes to (evidence: `src/App.tsx`)
- Route application → Admin routes: routes to (evidence: `src/App.tsx`)
- Sign-in and signup → Session and roles: uses auth (evidence: `src/pages/Auth.tsx`)
- Session and roles → Supabase client: auth and roles (evidence: `src/hooks/useAuth.tsx`)
- Session and roles → Supabase data: queries roles (evidence: `src/hooks/useAuth.tsx`)
- Supabase client → Supabase data: connects (evidence: `src/integrations/supabase/client.ts`)
- Idea creation and details → Pitch access: opens access
- Pitch access → Pitch documents: uses access rules (evidence: `src/components/pitch/AccessView.tsx`)
- Proposal management → Proposal operations: uses proposals (evidence: `src/components/proposals/ProposalsView.tsx`)
- Proposal management → Message helpers: uses messaging (evidence: `src/components/proposals/ProposalsView.tsx`)
- Proposal management → Investor portfolio: uses deal data (evidence: `src/components/proposals/ProposalsView.tsx`)
- Agreement details → Agreement operations: saves terms (evidence: `src/pages/app/AgreementDetail.tsx`)
- Agreement operations → Supabase client: reads agreements (evidence: `src/lib/agreements.ts`)
- Agreement operations → Message helpers: uses names (evidence: `src/lib/agreements.ts`)
- Agreement operations → Investor portfolio: uses money formats (evidence: `src/lib/agreements.ts`)
- Agreement PDF → Agreement operations: uses agreement data (evidence: `src/lib/agreementPdf.ts`)
- Messaging → Supabase client: reads and sends (evidence: `src/pages/app/Messages.tsx`)
- Messaging → Message helpers: uses helpers (evidence: `src/pages/app/Messages.tsx`)
- Founder analytics → Chart components: renders charts
- Investor portfolio → Chart components: renders charts (evidence: `src/components/portfolio/PortfolioView.tsx`)
- Sign-in and signup → Shared UI components: renders controls (evidence: `src/pages/Auth.tsx`)
