# justlovemaki/prismflowagent architecture

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

- Interactive diagram: https://gitdiagram.com/justlovemaki/prismflowagent
- Repository: https://github.com/justlovemaki/prismflowagent

## Overview

PrismFlowAgent is an information-ingestion, AI content-production, and publishing system with a React administration UI, a Fastify service, and a native DeepSeek Harness integration. The main user workflow is configure sources and AI, run ingestion, select items, generate content, then publish. The README also documents agent interoperability, knowledge and memory features, scheduling, and a distinct DSH workflow with review and audited, approval-bound publishing. Some DSH internals and frontend pages were not sampled, so their relationships are included only where the README documents them.

Main entry points: [`frontend/src/App.tsx`](https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/App.tsx) (React application), [`src/api/server.ts`](https://github.com/justlovemaki/prismflowagent/blob/main/src/api/server.ts) (Fastify server), [`src/core/scheduling/IngestionScheduler.ts`](https://github.com/justlovemaki/prismflowagent/blob/main/src/core/scheduling/IngestionScheduler.ts) (Source ingestion), [`src/core/production/ContentProduction.ts`](https://github.com/justlovemaki/prismflowagent/blob/main/src/core/production/ContentProduction.ts) (AI content production)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Administration UI"]
  node_webapp["React application<br/>[App.tsx]"]
  node_taskui["Task management<br/>[TaskManagement.tsx]"]
  node_selectionui["Content selection<br/>[Selection.tsx]"]
  node_generationui["Content generation<br/>[Generation.tsx]"]
  node_historyui["History and preview<br/>[History.tsx]"]
  node_agentui["Agent management<br/>[Agents.tsx]"]
  node_knowledgeui["Knowledge base<br/>[KnowledgeBase.tsx]"]
  node_settingsui["Settings and plugins<br/>[Settings.tsx]"]
end

subgraph group_api["Application API"]
  node_server["Fastify server<br/>[server.ts]"]
  node_routes["API route handlers"]
  node_localstore[("SQLite local store<br/>[LocalStore.ts]")]
end

subgraph group_content["Content workflow"]
  node_ingestion["Source ingestion"]
  node_sources["Source adapters"]
  node_contentstore["Content selection store<br/>[ContentStore.ts]"]
  node_production["AI content production"]
end

subgraph group_agents["Agents and knowledge"]
  node_ai["AI providers<br/>[AIProvider.ts]"]
  node_agentsvc["Agent execution<br/>[AgentService.ts]"]
  node_workflow["Workflow engine<br/>[WorkflowEngine.ts]"]
  node_knowledge["Knowledge services"]
  node_interop["Agent interoperability<br/>[InteropService.ts]"]
end

subgraph group_dsh["DSH integration"]
  node_dshplugin["DSH native plugin<br/>[client.js]"]
  node_dshcontent["DSH content workflow"]
  node_dshreview["Draft review and audit"]
  node_dshpublish["DSH publishers<br/>[publisher-core.js]"]
end

node_operator(("Operator"))

node_operator -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_taskui
node_webapp -->|"routes to"| node_selectionui
node_webapp -->|"routes to"| node_generationui
node_webapp -->|"routes to"| node_historyui
node_webapp -->|"routes to"| node_agentui
node_webapp -->|"routes to"| node_knowledgeui
node_webapp -->|"routes to"| node_settingsui
node_operator -->|"starts tasks"| node_taskui
node_operator -->|"selects content"| node_selectionui
node_operator -->|"requests generation"| node_generationui
node_operator -->|"reviews results"| node_historyui
node_taskui -.->|"requests API"| node_server
node_selectionui -.->|"requests API"| node_server
node_generationui -.->|"requests API"| node_server
node_settingsui -.->|"configures"| node_server
node_server -->|"registers"| node_routes
node_server -->|"creates"| node_localstore
node_routes -.->|"reads and writes"| node_localstore
node_ingestion -->|"fetches from"| node_sources
node_operator -->|"starts ingestion"| node_ingestion
node_ingestion -->|"persists items"| node_contentstore
node_operator -->|"selects items"| node_contentstore
node_operator -->|"requests generation"| node_production
node_production -->|"generates with"| node_ai
node_production -.->|"uses selected content"| node_contentstore
node_operator -->|"configures agents"| node_agentsvc
node_agentsvc -->|"calls provider"| node_ai
node_agentsvc -.->|"runs workflows"| node_workflow
node_operator -->|"manages knowledge"| node_knowledge
node_operator -->|"connects external agents"| node_interop
node_operator -->|"uses native plugin"| node_dshplugin
node_dshplugin -->|"provides workflow"| node_dshcontent
node_dshcontent -->|"creates review drafts"| node_dshreview
node_operator -->|"approves drafts"| node_dshreview
node_dshreview -->|"releases approved artifacts"| node_dshpublish
node_operator -->|"publishes approved work"| node_dshpublish

click node_webapp "https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/App.tsx"
click node_taskui "https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/TaskManagement.tsx"
click node_selectionui "https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/Selection.tsx"
click node_generationui "https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/Generation.tsx"
click node_historyui "https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/History.tsx"
click node_agentui "https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/Agents.tsx"
click node_knowledgeui "https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/KnowledgeBase.tsx"
click node_settingsui "https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/Settings.tsx"
click node_server "https://github.com/justlovemaki/prismflowagent/blob/main/src/api/server.ts"
click node_routes "https://github.com/justlovemaki/prismflowagent/tree/main/src/api/routes"
click node_localstore "https://github.com/justlovemaki/prismflowagent/blob/main/src/services/LocalStore.ts"
click node_ingestion "https://github.com/justlovemaki/prismflowagent/blob/main/src/core/scheduling/IngestionScheduler.ts"
click node_sources "https://github.com/justlovemaki/prismflowagent/tree/main/src/core/sources"
click node_contentstore "https://github.com/justlovemaki/prismflowagent/blob/main/src/core/content/ContentStore.ts"
click node_production "https://github.com/justlovemaki/prismflowagent/blob/main/src/core/production/ContentProduction.ts"
click node_ai "https://github.com/justlovemaki/prismflowagent/blob/main/src/services/AIProvider.ts"
click node_agentsvc "https://github.com/justlovemaki/prismflowagent/blob/main/src/services/agents/AgentService.ts"
click node_workflow "https://github.com/justlovemaki/prismflowagent/blob/main/src/services/agents/WorkflowEngine.ts"
click node_knowledge "https://github.com/justlovemaki/prismflowagent/blob/main/src/services/knowledge/HierarchicalKnowledgeService.ts"
click node_interop "https://github.com/justlovemaki/prismflowagent/blob/main/src/services/interop/InteropService.ts"
click node_dshplugin "https://github.com/justlovemaki/prismflowagent/blob/main/integrations/dsh/lib/client.js"
click node_dshcontent "https://github.com/justlovemaki/prismflowagent/blob/main/integrations/dsh/lib/shared/content-production.js"
click node_dshreview "https://github.com/justlovemaki/prismflowagent/blob/main/integrations/dsh/lib/shared/publication-receipt.js"
click node_dshpublish "https://github.com/justlovemaki/prismflowagent/blob/main/integrations/dsh/lib/publisher-core.js"

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_webapp,node_taskui,node_selectionui,node_generationui,node_historyui,node_agentui,node_knowledgeui,node_settingsui toneBlue
class node_server,node_routes,node_localstore toneAmber
class node_ingestion,node_sources,node_contentstore,node_production toneMint
class node_ai,node_agentsvc,node_workflow,node_knowledge,node_interop toneRose
class node_dshplugin,node_dshcontent,node_dshreview,node_dshpublish,node_operator toneIndigo
```

## Components

### Administration UI

- [React application](https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Task management](https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/TaskManagement.tsx): `frontend/src/pages/TaskManagement.tsx`
- [Content selection](https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/Selection.tsx): `frontend/src/pages/Selection.tsx`
- [Content generation](https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/Generation.tsx): `frontend/src/pages/Generation.tsx`
- [History and preview](https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/History.tsx): `frontend/src/pages/History.tsx`
- [Agent management](https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/Agents.tsx): `frontend/src/pages/Agents.tsx`
- [Knowledge base](https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/KnowledgeBase.tsx): `frontend/src/pages/KnowledgeBase.tsx`
- [Settings and plugins](https://github.com/justlovemaki/prismflowagent/blob/main/frontend/src/pages/Settings.tsx): `frontend/src/pages/Settings.tsx`

### Application API

- [Fastify server](https://github.com/justlovemaki/prismflowagent/blob/main/src/api/server.ts): `src/api/server.ts`
- [API route handlers](https://github.com/justlovemaki/prismflowagent/tree/main/src/api/routes): `src/api/routes`
- [SQLite local store](https://github.com/justlovemaki/prismflowagent/blob/main/src/services/LocalStore.ts): `src/services/LocalStore.ts`

### Content workflow

- [Source ingestion](https://github.com/justlovemaki/prismflowagent/blob/main/src/core/scheduling/IngestionScheduler.ts): `src/core/scheduling/IngestionScheduler.ts`
- [Source adapters](https://github.com/justlovemaki/prismflowagent/tree/main/src/core/sources): `src/core/sources`
- [Content selection store](https://github.com/justlovemaki/prismflowagent/blob/main/src/core/content/ContentStore.ts): `src/core/content/ContentStore.ts`
- [AI content production](https://github.com/justlovemaki/prismflowagent/blob/main/src/core/production/ContentProduction.ts): `src/core/production/ContentProduction.ts`

### Agents and knowledge

- [AI providers](https://github.com/justlovemaki/prismflowagent/blob/main/src/services/AIProvider.ts): `src/services/AIProvider.ts`
- [Agent execution](https://github.com/justlovemaki/prismflowagent/blob/main/src/services/agents/AgentService.ts): `src/services/agents/AgentService.ts`
- [Workflow engine](https://github.com/justlovemaki/prismflowagent/blob/main/src/services/agents/WorkflowEngine.ts): `src/services/agents/WorkflowEngine.ts`
- [Knowledge services](https://github.com/justlovemaki/prismflowagent/blob/main/src/services/knowledge/HierarchicalKnowledgeService.ts): `src/services/knowledge/HierarchicalKnowledgeService.ts`
- [Agent interoperability](https://github.com/justlovemaki/prismflowagent/blob/main/src/services/interop/InteropService.ts): `src/services/interop/InteropService.ts`

### DSH integration

- [DSH native plugin](https://github.com/justlovemaki/prismflowagent/blob/main/integrations/dsh/lib/client.js): `integrations/dsh/lib/client.js`
- [DSH content workflow](https://github.com/justlovemaki/prismflowagent/blob/main/integrations/dsh/lib/shared/content-production.js): `integrations/dsh/lib/shared/content-production.js`
- [Draft review and audit](https://github.com/justlovemaki/prismflowagent/blob/main/integrations/dsh/lib/shared/publication-receipt.js): `integrations/dsh/lib/shared/publication-receipt.js`
- [DSH publishers](https://github.com/justlovemaki/prismflowagent/blob/main/integrations/dsh/lib/publisher-core.js): `integrations/dsh/lib/publisher-core.js`

### Other components

- **Operator**

## Connections

- Operator → React application: uses (evidence: `README.md`)
- React application → Task management: routes to (evidence: `frontend/src/App.tsx`)
- React application → Content selection: routes to (evidence: `frontend/src/App.tsx`)
- React application → Content generation: routes to (evidence: `frontend/src/App.tsx`)
- React application → History and preview: routes to (evidence: `frontend/src/App.tsx`)
- React application → Agent management: routes to (evidence: `frontend/src/App.tsx`)
- React application → Knowledge base: routes to (evidence: `frontend/src/App.tsx`)
- React application → Settings and plugins: routes to (evidence: `frontend/src/App.tsx`)
- Operator → Task management: starts tasks (evidence: `README.md`)
- Operator → Content selection: selects content (evidence: `README.md`)
- Operator → Content generation: requests generation (evidence: `README.md`)
- Operator → History and preview: reviews results (evidence: `README.md`)
- Task management → Fastify server: requests API
- Content selection → Fastify server: requests API
- Content generation → Fastify server: requests API
- Settings and plugins → Fastify server: configures
- Fastify server → API route handlers: registers (evidence: `src/api/server.ts`)
- Fastify server → SQLite local store: creates (evidence: `src/api/server.ts`)
- API route handlers → SQLite local store: reads and writes
- Source ingestion → Source adapters: fetches from (evidence: `README.md`)
- Operator → Source ingestion: starts ingestion (evidence: `README.md`)
- Source ingestion → Content selection store: persists items (evidence: `README.md`)
- Operator → Content selection store: selects items (evidence: `README.md`)
- Operator → AI content production: requests generation (evidence: `README.md`)
- AI content production → AI providers: generates with (evidence: `README.md`)
- AI content production → Content selection store: uses selected content
- Operator → Agent execution: configures agents (evidence: `README.md`)
- Agent execution → AI providers: calls provider (evidence: `src/services/agents/AgentService.ts`)
- Agent execution → Workflow engine: runs workflows (evidence: `src/services/agents/WorkflowEngine.ts`)
- Operator → Knowledge services: manages knowledge (evidence: `README.md`)
- Operator → Agent interoperability: connects external agents (evidence: `README.md`)
- Operator → DSH native plugin: uses native plugin (evidence: `README.md`)
- DSH native plugin → DSH content workflow: provides workflow (evidence: `README.md`)
- DSH content workflow → Draft review and audit: creates review drafts (evidence: `README.md`)
- Operator → Draft review and audit: approves drafts (evidence: `README.md`)
- Draft review and audit → DSH publishers: releases approved artifacts (evidence: `README.md`)
- Operator → DSH publishers: publishes approved work (evidence: `README.md`)
