# hernyyan/opstream architecture

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

- Interactive diagram: https://gitdiagram.com/hernyyan/opstream
- Repository: https://github.com/hernyyan/opstream

## Overview

Opstream is a private-investment and CRM platform, with an Odoo backend and React frontend. The visible user workflows include managing investor opportunities and reviewing investment-pipeline analytics; backend modules also cover AI-assisted deal intake, cap-table modeling, and email interactions. The graph preserves these distinct capabilities and the sampled internal calculation layer. The README is empty, and several backend integrations and frontend-to-backend routes are not shown, so uncertain relationships are omitted.

Main entry points: [`opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineDashboard.tsx`](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineDashboard.tsx) (Pipeline analytics), [`opstream_backend/smc_addons/op_deal_intake/models/pipeline.py`](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/models/pipeline.py) (AI deal pipeline), [`opstream_frontend/src/pages/firm/crm-investor-opportunities/[id]/useOpportunityForm.ts`](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/crm-investor-opportunities/%5Bid%5D/useOpportunityForm.ts) (Opportunity editor), [`opstream_backend/smc_addons/op_deal_intake/services/anthropic_client.py`](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/services/anthropic_client.py) (AI client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Investment frontend"]
  node_app["Web application<br/>[App.tsx]"]
  node_analytics["Pipeline analytics"]
  node_analytics_filters["Analytics filters"]
  node_analytics_query["Analytics GraphQL<br/>[graphql.ts]"]
  node_deal_chart["Deal breakdown chart"]
  node_deal_drilldown["Deal drilldown"]
  node_simple_chart["Metric chart<br/>[SimpleBarChart.tsx]"]
end

subgraph group_opportunity["Opportunity workflows"]
  node_opp_form["Opportunity editor"]
  node_opp_stages["Stage indicators"]
  node_opp_api["Opportunity GraphQL<br/>[graphql.ts]"]
  node_fundraiser["Fundraiser pipeline"]
  node_pipeline_defs["Mandated pipelines"]
  node_unmandated["Unmandated wizard"]
  node_wizard_fields["Wizard fields"]
  node_opportunity_api["Opportunity controller<br/>[controllers.py]"]
  node_vote_page["IC vote page<br/>[ic_vote_page.py]"]
end

subgraph group_deal["Deal processing"]
  node_deal_pipeline["AI deal pipeline<br/>[pipeline.py]"]
  node_ai_client["AI client"]
  node_ai_config["AI configuration<br/>[config.py]"]
  node_ai_pricing["AI pricing<br/>[pricing.py]"]
end

subgraph group_investment["Investment modeling"]
  node_cap_table["Cap-table engine"]
  node_tranche_projector["Tranche projector"]
  node_taxonomy["Cap-table taxonomy"]
  node_waterfall["Waterfall engine"]
end

subgraph group_interactions["CRM interactions"]
  node_interaction["Interaction records<br/>[interaction.py]"]
  node_email_ingest["Outlook ingestion"]
end

node_user(("Platform user"))

node_user -.->|"uses"| node_app
node_opp_form -->|"queries and saves"| node_opp_api
node_opp_stages -->|"renders stage dates"| node_opp_form
node_fundraiser -.->|"presents pipeline"| node_opp_api
node_unmandated -->|"renders fields"| node_wizard_fields
node_analytics -.->|"queries metrics"| node_analytics_query
node_analytics -.->|"uses filters"| node_analytics_filters
node_analytics -->|"renders breakdown"| node_deal_chart
node_analytics -->|"renders drilldown"| node_deal_drilldown
node_analytics -->|"renders metrics"| node_simple_chart
node_deal_pipeline -->|"runs AI stages"| node_ai_client
node_deal_pipeline -->|"loads configuration"| node_ai_config
node_ai_client -->|"uses pricing"| node_ai_pricing
node_cap_table -->|"projects tranches"| node_tranche_projector
node_tranche_projector -->|"uses taxonomy"| node_taxonomy
node_email_ingest -->|"creates records"| node_interaction
node_opportunity_api -->|"routes voting"| node_vote_page

click node_app "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/App.tsx"
click node_opp_form "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/crm-investor-opportunities/%5Bid%5D/useOpportunityForm.ts"
click node_opp_stages "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/crm-investor-opportunities/%5Bid%5D/PipelineStageIndicator.tsx"
click node_opp_api "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/crm-investor-opportunities/graphql.ts"
click node_fundraiser "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/crm-investor-opportunities/fundraiser-dashboard/components/ProductPipeline.tsx"
click node_pipeline_defs "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/data/mandated_pipeline_defs.py"
click node_unmandated "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/pipelines/unmandated-pipeline/UnmandatedPipelineWizard.tsx"
click node_wizard_fields "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/pipelines/unmandated-pipeline/UnmandatedWizardFieldsPanel.tsx"
click node_opportunity_api "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/controllers/controllers.py"
click node_vote_page "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/controllers/ic_vote_page.py"
click node_analytics "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineDashboard.tsx"
click node_analytics_filters "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineFilters.tsx"
click node_analytics_query "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/graphql.ts"
click node_deal_chart "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/DealBreakdownChart.tsx"
click node_deal_drilldown "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/DealBreakdownDrilldownDialog.tsx"
click node_simple_chart "https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/SimpleBarChart.tsx"
click node_deal_pipeline "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/models/pipeline.py"
click node_ai_client "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/services/anthropic_client.py"
click node_ai_config "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/services/config.py"
click node_ai_pricing "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/services/pricing.py"
click node_cap_table "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/services/cap_table_engine.py"
click node_tranche_projector "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/services/cap_table_tranche_projector.py"
click node_taxonomy "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/data/cap_table_taxonomy_map.py"
click node_waterfall "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/services/waterfall_engine.py"
click node_interaction "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_interactions/models/interaction.py"
click node_email_ingest "https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_interactions/models/outlook_email_ingestion_service.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_app,node_analytics,node_analytics_filters,node_analytics_query,node_deal_chart,node_deal_drilldown,node_simple_chart,node_user toneBlue
class node_opp_form,node_opp_stages,node_opp_api,node_fundraiser,node_pipeline_defs,node_unmandated,node_wizard_fields,node_opportunity_api,node_vote_page toneAmber
class node_deal_pipeline,node_ai_client,node_ai_config,node_ai_pricing toneMint
class node_cap_table,node_tranche_projector,node_taxonomy,node_waterfall toneRose
class node_interaction,node_email_ingest toneIndigo
```

## Components

### Investment frontend

- [Web application](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/App.tsx): `opstream_frontend/src/App.tsx`
- [Pipeline analytics](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineDashboard.tsx): `opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineDashboard.tsx`
- [Analytics filters](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineFilters.tsx): `opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineFilters.tsx`
- [Analytics GraphQL](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/graphql.ts): `opstream_frontend/src/pages/investments/pipeline-analytics/graphql.ts`
- [Deal breakdown chart](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/DealBreakdownChart.tsx): `opstream_frontend/src/pages/investments/pipeline-analytics/components/DealBreakdownChart.tsx`
- [Deal drilldown](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/DealBreakdownDrilldownDialog.tsx): `opstream_frontend/src/pages/investments/pipeline-analytics/components/DealBreakdownDrilldownDialog.tsx`
- [Metric chart](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/investments/pipeline-analytics/components/SimpleBarChart.tsx): `opstream_frontend/src/pages/investments/pipeline-analytics/components/SimpleBarChart.tsx`

### Opportunity workflows

- [Opportunity editor](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/crm-investor-opportunities/%5Bid%5D/useOpportunityForm.ts): `opstream_frontend/src/pages/firm/crm-investor-opportunities/[id]/useOpportunityForm.ts`
- [Stage indicators](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/crm-investor-opportunities/%5Bid%5D/PipelineStageIndicator.tsx): `opstream_frontend/src/pages/firm/crm-investor-opportunities/[id]/PipelineStageIndicator.tsx`
- [Opportunity GraphQL](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/crm-investor-opportunities/graphql.ts): `opstream_frontend/src/pages/firm/crm-investor-opportunities/graphql.ts`
- [Fundraiser pipeline](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/crm-investor-opportunities/fundraiser-dashboard/components/ProductPipeline.tsx): `opstream_frontend/src/pages/firm/crm-investor-opportunities/fundraiser-dashboard/components/ProductPipeline.tsx`
- [Mandated pipelines](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/data/mandated_pipeline_defs.py): `opstream_backend/smc_addons/op_opportunities/data/mandated_pipeline_defs.py`
- [Unmandated wizard](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/pipelines/unmandated-pipeline/UnmandatedPipelineWizard.tsx): `opstream_frontend/src/pages/firm/pipelines/unmandated-pipeline/UnmandatedPipelineWizard.tsx`
- [Wizard fields](https://github.com/hernyyan/opstream/blob/main/opstream_frontend/src/pages/firm/pipelines/unmandated-pipeline/UnmandatedWizardFieldsPanel.tsx): `opstream_frontend/src/pages/firm/pipelines/unmandated-pipeline/UnmandatedWizardFieldsPanel.tsx`
- [Opportunity controller](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/controllers/controllers.py): `opstream_backend/smc_addons/op_opportunities/controllers/controllers.py`
- [IC vote page](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/controllers/ic_vote_page.py): `opstream_backend/smc_addons/op_opportunities/controllers/ic_vote_page.py`

### Deal processing

- [AI deal pipeline](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/models/pipeline.py): `opstream_backend/smc_addons/op_deal_intake/models/pipeline.py`
- [AI client](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/services/anthropic_client.py): `opstream_backend/smc_addons/op_deal_intake/services/anthropic_client.py`
- [AI configuration](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/services/config.py): `opstream_backend/smc_addons/op_deal_intake/services/config.py`
- [AI pricing](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_deal_intake/services/pricing.py): `opstream_backend/smc_addons/op_deal_intake/services/pricing.py`

### Investment modeling

- [Cap-table engine](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/services/cap_table_engine.py): `opstream_backend/smc_addons/op_opportunities/services/cap_table_engine.py`
- [Tranche projector](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/services/cap_table_tranche_projector.py): `opstream_backend/smc_addons/op_opportunities/services/cap_table_tranche_projector.py`
- [Cap-table taxonomy](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/data/cap_table_taxonomy_map.py): `opstream_backend/smc_addons/op_opportunities/data/cap_table_taxonomy_map.py`
- [Waterfall engine](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_opportunities/services/waterfall_engine.py): `opstream_backend/smc_addons/op_opportunities/services/waterfall_engine.py`

### CRM interactions

- [Interaction records](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_interactions/models/interaction.py): `opstream_backend/smc_addons/op_interactions/models/interaction.py`
- [Outlook ingestion](https://github.com/hernyyan/opstream/blob/main/opstream_backend/smc_addons/op_interactions/models/outlook_email_ingestion_service.py): `opstream_backend/smc_addons/op_interactions/models/outlook_email_ingestion_service.py`

### Other components

- **Platform user**

## Connections

- Platform user → Web application: uses
- Opportunity editor → Opportunity GraphQL: queries and saves (evidence: `opstream_frontend/src/pages/firm/crm-investor-opportunities/[id]/useOpportunityForm.ts`)
- Stage indicators → Opportunity editor: renders stage dates (evidence: `opstream_frontend/src/pages/firm/crm-investor-opportunities/[id]/PipelineStageIndicator.tsx`)
- Fundraiser pipeline → Opportunity GraphQL: presents pipeline
- Unmandated wizard → Wizard fields: renders fields (evidence: `opstream_frontend/src/pages/firm/pipelines/unmandated-pipeline/UnmandatedPipelineWizard.tsx`)
- Pipeline analytics → Analytics GraphQL: queries metrics (evidence: `opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineDashboard.tsx`)
- Pipeline analytics → Analytics filters: uses filters
- Pipeline analytics → Deal breakdown chart: renders breakdown (evidence: `opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineDashboard.tsx`)
- Pipeline analytics → Deal drilldown: renders drilldown (evidence: `opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineDashboard.tsx`)
- Pipeline analytics → Metric chart: renders metrics (evidence: `opstream_frontend/src/pages/investments/pipeline-analytics/components/PipelineDashboard.tsx`)
- AI deal pipeline → AI client: runs AI stages (evidence: `opstream_backend/smc_addons/op_deal_intake/models/pipeline.py`)
- AI deal pipeline → AI configuration: loads configuration (evidence: `opstream_backend/smc_addons/op_deal_intake/models/pipeline.py`)
- AI client → AI pricing: uses pricing (evidence: `opstream_backend/smc_addons/op_deal_intake/services/anthropic_client.py`)
- Cap-table engine → Tranche projector: projects tranches (evidence: `opstream_backend/smc_addons/op_opportunities/services/cap_table_engine.py`)
- Tranche projector → Cap-table taxonomy: uses taxonomy (evidence: `opstream_backend/smc_addons/op_opportunities/services/cap_table_tranche_projector.py`)
- Outlook ingestion → Interaction records: creates records (evidence: `opstream_backend/smc_addons/op_interactions/models/outlook_email_ingestion_service.py`)
- Opportunity controller → IC vote page: routes voting (evidence: `opstream_backend/smc_addons/op_opportunities/controllers/controllers.py`)
