# pronghorn-red/pronghorn architecture

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

- Interactive diagram: https://gitdiagram.com/pronghorn-red/pronghorn
- Repository: https://github.com/pronghorn-red/pronghorn

## Overview

Pronghorn is an AI-assisted software development platform. Users create projects, turn ideas into structured requirements and standards-linked designs, then use agents to audit and generate code that can be managed in a repository and deployed. The app also provides database management, collaboration, artifact handling, presentations, and reusable Build Books. The README documents these capabilities; sampled source confirms app routing, authentication, repository operations, and database-page composition. Several feature links below are documented product relationships rather than inspected call paths.

Main entry points: [`supabase/functions/orchestrate-agents/index.ts`](https://github.com/pronghorn-red/pronghorn/blob/main/supabase/functions/orchestrate-agents/index.ts) (Agent orchestration), [`src/App.tsx`](https://github.com/pronghorn-red/pronghorn/blob/main/src/App.tsx) (Application routes), [`src/pages/project/Requirements.tsx`](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Requirements.tsx) (Requirements), [`src/pages/project/Repository.tsx`](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Repository.tsx) (Git repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and Projects"]
  node_app["Application routes<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_dashboard["Project dashboard<br/>[Dashboard.tsx]"]
  node_supabase[("Supabase services<br/>[client.ts]")]
end

subgraph group_design["Design and Governance"]
  node_requirements["Requirements<br/>[Requirements.tsx]"]
  node_standards["Standards library<br/>[Standards.tsx]"]
  node_canvas["Architecture canvas<br/>[Canvas.tsx]"]
  node_audit["Multi-agent audit<br/>[Audit.tsx]"]
  node_specifications["Specifications<br/>[Specifications.tsx]"]
end

subgraph group_agents["AI Workflows"]
  node_agent["Agent orchestration<br/>[index.ts]"]
  node_coding["Coding agent<br/>[index.ts]"]
  node_collaboration["Collaborative editing"]
end

subgraph group_delivery["Code and Delivery"]
  node_repository["Git repository<br/>[Repository.tsx]"]
  node_database["Database management<br/>[Database.tsx]"]
  node_deployment["Deployment<br/>[Deploy.tsx]"]
  node_artifacts["Project artifacts<br/>[Artifacts.tsx]"]
  node_presentation["Presentations<br/>[Present.tsx]"]
end

subgraph group_knowledge["Shared Knowledge"]
  node_buildbooks["Build Books<br/>[BuildBooks.tsx]"]
  node_gallery["Project gallery<br/>[Gallery.tsx]"]
end

node_user(("Project user"))

node_user -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"routes to"| node_dashboard
node_dashboard -.->|"opens project"| node_requirements
node_requirements -.->|"links standards"| node_standards
node_requirements -.->|"decomposes with AI"| node_agent
node_canvas -.->|"requests design"| node_agent
node_canvas -.->|"compares datasets"| node_audit
node_audit -.->|"informs documents"| node_specifications
node_agent -.->|"generates documents"| node_specifications
node_agent -.->|"orchestrates agents"| node_coding
node_coding -.->|"edits files"| node_repository
node_repository -.->|"ships software"| node_deployment
node_database -->|"reads and writes"| node_supabase
node_repository -->|"invokes functions"| node_supabase
node_collaboration -.->|"merges changes"| node_artifacts
node_presentation -.->|"exports output"| node_artifacts
node_buildbooks -.->|"applies collections"| node_standards
node_gallery -.->|"discovers templates"| node_buildbooks

click node_app "https://github.com/pronghorn-red/pronghorn/blob/main/src/App.tsx"
click node_auth "https://github.com/pronghorn-red/pronghorn/blob/main/src/contexts/AuthContext.tsx"
click node_dashboard "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/Dashboard.tsx"
click node_requirements "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Requirements.tsx"
click node_standards "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Standards.tsx"
click node_canvas "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Canvas.tsx"
click node_audit "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Audit.tsx"
click node_specifications "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Specifications.tsx"
click node_agent "https://github.com/pronghorn-red/pronghorn/blob/main/supabase/functions/orchestrate-agents/index.ts"
click node_coding "https://github.com/pronghorn-red/pronghorn/blob/main/supabase/functions/coding-agent-orchestrator/index.ts"
click node_collaboration "https://github.com/pronghorn-red/pronghorn/blob/main/src/components/collaboration/CollaborationEditor.tsx"
click node_repository "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Repository.tsx"
click node_database "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Database.tsx"
click node_deployment "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Deploy.tsx"
click node_artifacts "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Artifacts.tsx"
click node_presentation "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Present.tsx"
click node_supabase "https://github.com/pronghorn-red/pronghorn/blob/main/src/integrations/supabase/client.ts"
click node_buildbooks "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/BuildBooks.tsx"
click node_gallery "https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/Gallery.tsx"

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_auth,node_dashboard,node_supabase,node_user toneBlue
class node_requirements,node_standards,node_canvas,node_audit,node_specifications toneAmber
class node_agent,node_coding,node_collaboration toneMint
class node_repository,node_database,node_deployment,node_artifacts,node_presentation toneRose
class node_buildbooks,node_gallery toneIndigo
```

## Components

### Access and Projects

- [Application routes](https://github.com/pronghorn-red/pronghorn/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/pronghorn-red/pronghorn/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Project dashboard](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/Dashboard.tsx): `src/pages/Dashboard.tsx`
- [Supabase services](https://github.com/pronghorn-red/pronghorn/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`

### Design and Governance

- [Requirements](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Requirements.tsx): `src/pages/project/Requirements.tsx`
- [Standards library](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Standards.tsx): `src/pages/project/Standards.tsx`
- [Architecture canvas](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Canvas.tsx): `src/pages/project/Canvas.tsx`
- [Multi-agent audit](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Audit.tsx): `src/pages/project/Audit.tsx`
- [Specifications](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Specifications.tsx): `src/pages/project/Specifications.tsx`

### AI Workflows

- [Agent orchestration](https://github.com/pronghorn-red/pronghorn/blob/main/supabase/functions/orchestrate-agents/index.ts): `supabase/functions/orchestrate-agents/index.ts`
- [Coding agent](https://github.com/pronghorn-red/pronghorn/blob/main/supabase/functions/coding-agent-orchestrator/index.ts): `supabase/functions/coding-agent-orchestrator/index.ts`
- [Collaborative editing](https://github.com/pronghorn-red/pronghorn/blob/main/src/components/collaboration/CollaborationEditor.tsx): `src/components/collaboration/CollaborationEditor.tsx`

### Code and Delivery

- [Git repository](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Repository.tsx): `src/pages/project/Repository.tsx`
- [Database management](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Database.tsx): `src/pages/project/Database.tsx`
- [Deployment](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Deploy.tsx): `src/pages/project/Deploy.tsx`
- [Project artifacts](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Artifacts.tsx): `src/pages/project/Artifacts.tsx`
- [Presentations](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/project/Present.tsx): `src/pages/project/Present.tsx`

### Shared Knowledge

- [Build Books](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/BuildBooks.tsx): `src/pages/BuildBooks.tsx`
- [Project gallery](https://github.com/pronghorn-red/pronghorn/blob/main/src/pages/Gallery.tsx): `src/pages/Gallery.tsx`

### Other components

- **Project user**

## Connections

- Project user → Application routes: uses (evidence: `src/App.tsx`)
- Application routes → Authentication: provides auth (evidence: `src/contexts/AuthContext.tsx`)
- Application routes → Project dashboard: routes to (evidence: `src/App.tsx`)
- Project dashboard → Requirements: opens project
- Requirements → Standards library: links standards
- Requirements → Agent orchestration: decomposes with AI
- Architecture canvas → Agent orchestration: requests design
- Architecture canvas → Multi-agent audit: compares datasets
- Multi-agent audit → Specifications: informs documents
- Agent orchestration → Specifications: generates documents
- Agent orchestration → Coding agent: orchestrates agents
- Coding agent → Git repository: edits files
- Git repository → Deployment: ships software
- Database management → Supabase services: reads and writes (evidence: `src/pages/project/Database.tsx`)
- Git repository → Supabase services: invokes functions (evidence: `src/pages/project/Repository.tsx`)
- Collaborative editing → Project artifacts: merges changes
- Presentations → Project artifacts: exports output
- Build Books → Standards library: applies collections
- Project gallery → Build Books: discovers templates
