# haileamlak/conca architecture

> Architecture diagram of the GitHub repository haileamlak/conca, 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/haileamlak/conca
- Repository: https://github.com/haileamlak/conca

## Overview

Conca is a self-hosted AI content platform: creators configure brands and trigger or schedule work in the dashboard; the Go API queues jobs, workers run brand-specific agent cycles, and results are persisted for review, calendar planning, publishing, and analytics. README capabilities define the Plan → Generate → Evaluate → Publish loop and semantic memory; sampled code confirms API routing, queue dispatch, worker actions, and integrations, but the agent implementation and several UI/API paths were not sampled, so those links are limited to documented behavior.

Main entry points: [`agent/agent.go`](https://github.com/haileamlak/conca/blob/main/agent/agent.go) (Brand agent), [`memory/store.go`](https://github.com/haileamlak/conca/blob/main/memory/store.go) (Content and brand store), [`scheduler/worker.go`](https://github.com/haileamlak/conca/blob/main/scheduler/worker.go) (Job worker), [`api/handlers.go`](https://github.com/haileamlak/conca/blob/main/api/handlers.go) (REST handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Creator Dashboard"]
  node_dashboard["Mission Control UI<br/>[App.tsx]"]
  node_authui["Authentication<br/>[Auth.tsx]"]
  node_uiclient["Dashboard API client<br/>[api.ts]"]
end

subgraph group_backend["API and Control"]
  node_server["HTTP server<br/>[server.go]"]
  node_handlers["REST handlers<br/>[handlers.go]"]
  node_scheduler["Job scheduler<br/>[scheduler.go]"]
  node_queue["Job queue<br/>[queue.go]"]
  node_worker["Job worker<br/>[worker.go]"]
end

subgraph group_agent["Content Agent"]
  node_agent["Brand agent<br/>[agent.go]"]
  node_planning["Plan and research<br/>[agent.go]"]
  node_generation["Generate and evaluate<br/>[agent.go]"]
  node_publishing["Publish content<br/>[agent.go]"]
end

subgraph group_integrations["AI and Platforms"]
  node_search["Trend search<br/>[search.go]"]
  node_llm["Gemini generation<br/>[llm.go]"]
  node_embeddings["Embedding client<br/>[embeddings.go]"]
  node_social["Social publishing<br/>[social.go]"]
  node_analytics["Engagement analytics<br/>[analytics.go]"]
end

subgraph group_persistence["Persistence"]
  node_memory[("Content and brand store<br/>[store.go]")]
  node_vectors[("Semantic memory<br/>[vector.go]")]
end

node_creator(("Creator"))
node_mongodb[("MongoDB")]
node_geminisvc{{"Gemini service"}}
node_searchsvc{{"Search providers"}}
node_platforms{{"LinkedIn and X"}}

node_creator -->|"uses"| node_dashboard
node_creator -->|"signs in"| node_authui
node_authui -->|"submits credentials"| node_uiclient
node_dashboard -->|"requests data"| node_uiclient
node_uiclient -->|"calls API"| node_server
node_server -->|"routes requests"| node_handlers
node_handlers -->|"reads and writes"| node_memory
node_handlers -->|"enqueues actions"| node_queue
node_scheduler -->|"enqueues scheduled jobs"| node_queue
node_worker -->|"dequeues and acknowledges"| node_queue
node_worker -->|"loads brand"| node_memory
node_worker -->|"dispatches job"| node_agent
node_agent -->|"runs cycle"| node_planning
node_planning -->|"finds trends"| node_search
node_planning -->|"retrieves context"| node_vectors
node_generation -->|"generates content"| node_llm
node_generation -->|"creates vectors"| node_embeddings
node_agent -->|"stores content"| node_memory
node_agent -->|"stores memory"| node_vectors
node_agent -->|"syncs performance"| node_analytics
node_agent -->|"publishes approved content"| node_publishing
node_publishing -->|"dispatches posts"| node_social
node_analytics -->|"fetches engagement"| node_social
node_memory -->|"persists data"| node_mongodb
node_vectors -->|"persists vectors"| node_mongodb
node_llm -->|"calls API"| node_geminisvc
node_embeddings -->|"calls API"| node_geminisvc
node_search -->|"queries providers"| node_searchsvc
node_social -->|"publishes posts"| node_platforms
node_analytics -->|"reads engagement"| node_platforms

click node_dashboard "https://github.com/haileamlak/conca/blob/main/web/src/App.tsx"
click node_authui "https://github.com/haileamlak/conca/blob/main/web/src/pages/Auth.tsx"
click node_uiclient "https://github.com/haileamlak/conca/blob/main/web/src/lib/api.ts"
click node_server "https://github.com/haileamlak/conca/blob/main/api/server.go"
click node_handlers "https://github.com/haileamlak/conca/blob/main/api/handlers.go"
click node_scheduler "https://github.com/haileamlak/conca/blob/main/scheduler/scheduler.go"
click node_queue "https://github.com/haileamlak/conca/blob/main/scheduler/queue.go"
click node_worker "https://github.com/haileamlak/conca/blob/main/scheduler/worker.go"
click node_agent "https://github.com/haileamlak/conca/blob/main/agent/agent.go"
click node_planning "https://github.com/haileamlak/conca/blob/main/agent/agent.go"
click node_generation "https://github.com/haileamlak/conca/blob/main/agent/agent.go"
click node_publishing "https://github.com/haileamlak/conca/blob/main/agent/agent.go"
click node_memory "https://github.com/haileamlak/conca/blob/main/memory/store.go"
click node_vectors "https://github.com/haileamlak/conca/blob/main/memory/vector.go"
click node_search "https://github.com/haileamlak/conca/blob/main/tools/search.go"
click node_llm "https://github.com/haileamlak/conca/blob/main/tools/llm.go"
click node_embeddings "https://github.com/haileamlak/conca/blob/main/tools/embeddings.go"
click node_social "https://github.com/haileamlak/conca/blob/main/tools/social.go"
click node_analytics "https://github.com/haileamlak/conca/blob/main/tools/analytics.go"

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_dashboard,node_authui,node_uiclient toneBlue
class node_server,node_handlers,node_scheduler,node_queue,node_worker,node_mongodb toneAmber
class node_agent,node_planning,node_generation,node_publishing toneMint
class node_search,node_llm,node_embeddings,node_social,node_analytics toneRose
class node_memory,node_vectors,node_creator,node_geminisvc,node_searchsvc,node_platforms toneIndigo
```

## Components

### Creator Dashboard

- [Mission Control UI](https://github.com/haileamlak/conca/blob/main/web/src/App.tsx): `web/src/App.tsx`
- [Authentication](https://github.com/haileamlak/conca/blob/main/web/src/pages/Auth.tsx): `web/src/pages/Auth.tsx`
- [Dashboard API client](https://github.com/haileamlak/conca/blob/main/web/src/lib/api.ts): `web/src/lib/api.ts`

### API and Control

- [HTTP server](https://github.com/haileamlak/conca/blob/main/api/server.go): `api/server.go`
- [REST handlers](https://github.com/haileamlak/conca/blob/main/api/handlers.go): `api/handlers.go`
- [Job scheduler](https://github.com/haileamlak/conca/blob/main/scheduler/scheduler.go): `scheduler/scheduler.go`
- [Job queue](https://github.com/haileamlak/conca/blob/main/scheduler/queue.go): `scheduler/queue.go`
- [Job worker](https://github.com/haileamlak/conca/blob/main/scheduler/worker.go): `scheduler/worker.go`

### Content Agent

- [Brand agent](https://github.com/haileamlak/conca/blob/main/agent/agent.go): `agent/agent.go`
- [Plan and research](https://github.com/haileamlak/conca/blob/main/agent/agent.go): `agent/agent.go`
- [Generate and evaluate](https://github.com/haileamlak/conca/blob/main/agent/agent.go): `agent/agent.go`
- [Publish content](https://github.com/haileamlak/conca/blob/main/agent/agent.go): `agent/agent.go`

### AI and Platforms

- [Trend search](https://github.com/haileamlak/conca/blob/main/tools/search.go): `tools/search.go`
- [Gemini generation](https://github.com/haileamlak/conca/blob/main/tools/llm.go): `tools/llm.go`
- [Embedding client](https://github.com/haileamlak/conca/blob/main/tools/embeddings.go): `tools/embeddings.go`
- [Social publishing](https://github.com/haileamlak/conca/blob/main/tools/social.go): `tools/social.go`
- [Engagement analytics](https://github.com/haileamlak/conca/blob/main/tools/analytics.go): `tools/analytics.go`

### Persistence

- [Content and brand store](https://github.com/haileamlak/conca/blob/main/memory/store.go): `memory/store.go`
- [Semantic memory](https://github.com/haileamlak/conca/blob/main/memory/vector.go): `memory/vector.go`

### Other components

- **Creator**
- **MongoDB**
- **Gemini service**
- **Search providers**
- **LinkedIn and X**

## Connections

- Creator → Mission Control UI: uses
- Creator → Authentication: signs in
- Authentication → Dashboard API client: submits credentials
- Mission Control UI → Dashboard API client: requests data
- Dashboard API client → HTTP server: calls API
- HTTP server → REST handlers: routes requests
- REST handlers → Content and brand store: reads and writes
- REST handlers → Job queue: enqueues actions
- Job scheduler → Job queue: enqueues scheduled jobs
- Job worker → Job queue: dequeues and acknowledges
- Job worker → Content and brand store: loads brand
- Job worker → Brand agent: dispatches job
- Brand agent → Plan and research: runs cycle
- Plan and research → Trend search: finds trends
- Plan and research → Semantic memory: retrieves context
- Generate and evaluate → Gemini generation: generates content
- Generate and evaluate → Embedding client: creates vectors
- Brand agent → Content and brand store: stores content
- Brand agent → Semantic memory: stores memory
- Brand agent → Engagement analytics: syncs performance
- Brand agent → Publish content: publishes approved content
- Publish content → Social publishing: dispatches posts
- Engagement analytics → Social publishing: fetches engagement
- Content and brand store → MongoDB: persists data
- Semantic memory → MongoDB: persists vectors
- Gemini generation → Gemini service: calls API
- Embedding client → Gemini service: calls API
- Trend search → Search providers: queries providers
- Social publishing → LinkedIn and X: publishes posts
- Engagement analytics → LinkedIn and X: reads engagement
