# aadityaparse/swiss-strategy-hub architecture

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

- Interactive diagram: https://gitdiagram.com/aadityaparse/swiss-strategy-hub
- Repository: https://github.com/aadityaparse/swiss-strategy-hub

## Overview

Hindsight Strategy Co-Pilot is a strategic decision-support workspace: executives review organizational and competitor context, inspect deterministic financials, simulate strategy levers, receive memory-grounded explanations, and make decisions whose outcomes are retained. The graph preserves the README’s documented stages and major dashboard capabilities. Backend implementation files were not excerpted, so their documented relationships cite the README; unverified implementation details are omitted.

Main entry points: [`src/pages/Dashboard.tsx`](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/pages/Dashboard.tsx) (Workspace dashboard), [`src/convex/actions.ts`](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/actions.ts) (Workflow actions), [`src/convex/api.ts`](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/api.ts) (Queries and mutations), [`src/components/copilot/ExecutiveAI.tsx`](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/ExecutiveAI.tsx) (Executive AI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Executive workspace"]
  node_landing["Product entry<br/>[Landing.tsx]"]
  node_dashboard["Workspace dashboard<br/>[Dashboard.tsx]"]
  node_financial_view["Financial journey"]
  node_strategic_radar["Strategic radar<br/>[StrategicRadar.tsx]"]
  node_strategy_canvas["Strategy canvas<br/>[StrategyCanvas.tsx]"]
  node_competitor_monitor["Competitor monitor"]
  node_decision_memory["Decision memory<br/>[DecisionMemory.tsx]"]
  node_memory_inspector["Memory inspector"]
  node_executive_ai["Executive AI<br/>[ExecutiveAI.tsx]"]
  node_evidence_ui["Evidence labels<br/>[evidence.tsx]"]
end

subgraph group_orchestration["Decision orchestration"]
  node_convex_api["Queries and mutations<br/>[api.ts]"]
  node_actions["Workflow actions<br/>[actions.ts]"]
  node_agent["Memory-grounded agent<br/>[agent.ts]"]
  node_financials["Financial analysis<br/>[financials.ts]"]
  node_simulation["What-if engine<br/>[simulation.ts]"]
  node_competitors["Competitor intelligence<br/>[hypotheses.ts]"]
  node_demo_data["Demo organization data<br/>[mockdata.ts]"]
end

subgraph group_memory["Persistent memory"]
  node_memory_client["Hindsight client"]
  node_memory_state["Memory operations<br/>[memory.ts]"]
  node_hindsight[("Hindsight server")]
end

subgraph group_identity["Identity and access"]
  node_auth_page["Sign-in flow<br/>[Auth.tsx]"]
  node_auth_hook["Auth state hook<br/>[use-auth.ts]"]
  node_auth_backend["Convex authentication<br/>[auth.ts]"]
end

node_executive(("Executive"))
node_human_auth(("User"))

node_executive -->|"opens"| node_landing
node_landing -->|"signs in"| node_auth_page
node_human_auth -->|"submits OTP"| node_auth_page
node_auth_page -->|"requests sign-in"| node_auth_hook
node_auth_hook -.->|"uses auth actions"| node_auth_backend
node_auth_page -->|"redirects after sign-in"| node_dashboard
node_dashboard -->|"renders"| node_financial_view
node_dashboard -->|"renders"| node_strategic_radar
node_dashboard -->|"renders"| node_strategy_canvas
node_dashboard -->|"renders"| node_competitor_monitor
node_dashboard -->|"renders"| node_decision_memory
node_dashboard -->|"renders"| node_memory_inspector
node_dashboard -->|"renders"| node_executive_ai
node_executive_ai -->|"renders evidence labels"| node_evidence_ui
node_dashboard -->|"ingests demo data"| node_actions
node_dashboard -->|"reads and sets seed state"| node_memory_state
node_executive_ai -->|"queries chat"| node_convex_api
node_executive_ai -->|"asks and builds briefs"| node_actions
node_financial_view -.->|"loads financial view"| node_convex_api
node_strategy_canvas -.->|"requests simulations"| node_convex_api
node_convex_api -->|"serves financials"| node_financials
node_convex_api -->|"serves competitor data"| node_competitors
node_actions -->|"delegates questions and briefs"| node_agent
node_actions -->|"computes KPIs"| node_financials
node_actions -->|"runs scenarios"| node_simulation
node_actions -->|"ingests and queries memory"| node_memory_client
node_agent -->|"recalls and reflects"| node_memory_client
node_agent -->|"simulates when requested"| node_simulation
node_memory_client -->|"retains, recalls, reflects"| node_hindsight
node_memory_client -->|"uses fallback data"| node_demo_data
node_actions -.->|"seeds demo records"| node_demo_data
node_human_auth -->|"reviews and decides"| node_dashboard
node_agent -.->|"returns grounded answer"| node_actions

click node_landing "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/pages/Landing.tsx"
click node_dashboard "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/pages/Dashboard.tsx"
click node_financial_view "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/FinancialJourney.tsx"
click node_strategic_radar "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/StrategicRadar.tsx"
click node_strategy_canvas "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/StrategyCanvas.tsx"
click node_competitor_monitor "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/CompetitorMonitor.tsx"
click node_decision_memory "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/DecisionMemory.tsx"
click node_memory_inspector "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/MemoryInspector.tsx"
click node_executive_ai "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/ExecutiveAI.tsx"
click node_evidence_ui "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/evidence.tsx"
click node_convex_api "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/api.ts"
click node_actions "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/actions.ts"
click node_agent "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/agent.ts"
click node_financials "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/financials.ts"
click node_simulation "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/simulation.ts"
click node_competitors "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/hypotheses.ts"
click node_demo_data "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/mockdata.ts"
click node_memory_client "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/hindsight_client.ts"
click node_memory_state "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/memory.ts"
click node_auth_page "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/pages/Auth.tsx"
click node_auth_hook "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/hooks/use-auth.ts"
click node_auth_backend "https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/auth.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_landing,node_dashboard,node_financial_view,node_strategic_radar,node_strategy_canvas,node_competitor_monitor,node_decision_memory,node_memory_inspector,node_executive_ai,node_evidence_ui,node_human_auth toneBlue
class node_convex_api,node_actions,node_agent,node_financials,node_simulation,node_competitors,node_demo_data toneAmber
class node_memory_client,node_memory_state,node_hindsight toneMint
class node_auth_page,node_auth_hook,node_auth_backend toneRose
class node_executive toneIndigo
```

## Components

### Executive workspace

- [Product entry](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/pages/Landing.tsx): `src/pages/Landing.tsx`
- [Workspace dashboard](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Financial journey](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/FinancialJourney.tsx): `src/components/copilot/FinancialJourney.tsx`
- [Strategic radar](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/StrategicRadar.tsx): `src/components/copilot/StrategicRadar.tsx`
- [Strategy canvas](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/StrategyCanvas.tsx): `src/components/copilot/StrategyCanvas.tsx`
- [Competitor monitor](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/CompetitorMonitor.tsx): `src/components/copilot/CompetitorMonitor.tsx`
- [Decision memory](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/DecisionMemory.tsx): `src/components/copilot/DecisionMemory.tsx`
- [Memory inspector](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/MemoryInspector.tsx): `src/components/copilot/MemoryInspector.tsx`
- [Executive AI](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/ExecutiveAI.tsx): `src/components/copilot/ExecutiveAI.tsx`
- [Evidence labels](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/components/copilot/evidence.tsx): `src/components/copilot/evidence.tsx`

### Decision orchestration

- [Queries and mutations](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/api.ts): `src/convex/api.ts`
- [Workflow actions](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/actions.ts): `src/convex/actions.ts`
- [Memory-grounded agent](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/agent.ts): `src/convex/agent.ts`
- [Financial analysis](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/financials.ts): `src/convex/financials.ts`
- [What-if engine](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/simulation.ts): `src/convex/simulation.ts`
- [Competitor intelligence](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/hypotheses.ts): `src/convex/hypotheses.ts`
- [Demo organization data](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/mockdata.ts): `src/convex/mockdata.ts`

### Persistent memory

- [Hindsight client](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/hindsight_client.ts): `src/convex/hindsight_client.ts`
- [Memory operations](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/memory.ts): `src/convex/memory.ts`
- **Hindsight server**

### Identity and access

- [Sign-in flow](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/pages/Auth.tsx): `src/pages/Auth.tsx`
- [Auth state hook](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/hooks/use-auth.ts): `src/hooks/use-auth.ts`
- [Convex authentication](https://github.com/aadityaparse/swiss-strategy-hub/blob/main/src/convex/auth.ts): `src/convex/auth.ts`

### Other components

- **Executive**
- **User**

## Connections

- Executive → Product entry: opens
- Product entry → Sign-in flow: signs in (evidence: `src/pages/Landing.tsx`)
- User → Sign-in flow: submits OTP (evidence: `src/pages/Auth.tsx`)
- Sign-in flow → Auth state hook: requests sign-in (evidence: `src/pages/Auth.tsx`)
- Auth state hook → Convex authentication: uses auth actions
- Sign-in flow → Workspace dashboard: redirects after sign-in (evidence: `src/main.tsx`)
- Workspace dashboard → Financial journey: renders (evidence: `src/pages/Dashboard.tsx`)
- Workspace dashboard → Strategic radar: renders (evidence: `src/pages/Dashboard.tsx`)
- Workspace dashboard → Strategy canvas: renders (evidence: `src/pages/Dashboard.tsx`)
- Workspace dashboard → Competitor monitor: renders (evidence: `src/pages/Dashboard.tsx`)
- Workspace dashboard → Decision memory: renders (evidence: `src/pages/Dashboard.tsx`)
- Workspace dashboard → Memory inspector: renders (evidence: `src/pages/Dashboard.tsx`)
- Workspace dashboard → Executive AI: renders (evidence: `src/pages/Dashboard.tsx`)
- Executive AI → Evidence labels: renders evidence labels (evidence: `src/components/copilot/ExecutiveAI.tsx`)
- Workspace dashboard → Workflow actions: ingests demo data (evidence: `src/pages/Dashboard.tsx`)
- Workspace dashboard → Memory operations: reads and sets seed state (evidence: `src/pages/Dashboard.tsx`)
- Executive AI → Queries and mutations: queries chat (evidence: `src/components/copilot/ExecutiveAI.tsx`)
- Executive AI → Workflow actions: asks and builds briefs (evidence: `src/components/copilot/ExecutiveAI.tsx`)
- Financial journey → Queries and mutations: loads financial view
- Strategy canvas → Queries and mutations: requests simulations
- Queries and mutations → Financial analysis: serves financials
- Queries and mutations → Competitor intelligence: serves competitor data
- Workflow actions → Memory-grounded agent: delegates questions and briefs
- Workflow actions → Financial analysis: computes KPIs
- Workflow actions → What-if engine: runs scenarios
- Workflow actions → Hindsight client: ingests and queries memory
- Memory-grounded agent → Hindsight client: recalls and reflects
- Memory-grounded agent → What-if engine: simulates when requested
- Hindsight client → Hindsight server: retains, recalls, reflects
- Hindsight client → Demo organization data: uses fallback data (evidence: `src/convex/hindsight_client.ts`)
- Workflow actions → Demo organization data: seeds demo records
- User → Workspace dashboard: reviews and decides
- Memory-grounded agent → Workflow actions: returns grounded answer
