← Back to docs

architecture

Architecture Overview

Synkora is a full-stack monorepo. The same codebase contains the public site, docs, blog, dashboard, API, background workers, and supporting runtime services.

Architecture Overview

Synkora is a full-stack monorepo. The same codebase contains the public site, docs, blog, dashboard, API, background workers, and supporting runtime services.

At a high level, the platform splits into four operating planes:

  • a frontend control plane in web/
  • an API and runtime plane in api/
  • an async execution plane built on Celery and dedicated bot workers
  • a data plane built around PostgreSQL, Redis, object storage, and retrieval backends

Production Deployment HLD

Synkora production deployment high-level architecture diagram.
Synkora production deployment high-level architecture diagram.

This view is the production-shaped diagram:

  • AWS ALB-style ingress from the Helm chart
  • horizontally scaled web and API tiers
  • Redis as the shared coordination layer
  • PgBouncer in front of PostgreSQL for the production Kubernetes path referenced in the repo
  • dedicated Celery worker groups plus beat and bot worker
  • internal synkora-ml, synkora-scraper, and synkora-sandbox services
  • managed-style external services for PostgreSQL, S3-compatible object storage, vector databases, Elasticsearch, Langfuse, and multiple LLM providers

The repo also supports local/self-hosted equivalents for many of these services, but this is the higher-level production topology.

System Diagram

Synkora high-level system architecture diagram.
Synkora high-level system architecture diagram.

Major Runtime Components

LayerImplementationMain Role
FrontendNext.js app in web/Dashboard, public site, blog, docs, share pages, agent management UI
APIFastAPI app in api/src/app.pyAuth, agent APIs, chat flows, integrations, admin and public endpoints
RealtimeWebSocket manager in api/src/core/websocket.pyStreaming and cross-pod message delivery
Background workCelery app in api/src/celery_app.pyLong-running jobs, ingestion, notifications, billing, scheduled work
Bot executionapi/src/bot_workerDedicated long-lived messaging bot workloads
System of recordPostgreSQL with pgvectorTenants, users, agents, conversations, billing, configuration
CoordinationRedisCache, pub/sub, rate limiting, token revocation state, Celery broker
Retrieval and searchPostgreSQL pgvector, Qdrant, Pinecone, ElasticsearchKnowledge retrieval and search workloads
File storageMinIO or S3-compatible storageUploaded files, binary assets, document storage
Supporting servicesLangfuse, synkora-ml, synkora-scraperObservability, embeddings/reranking, scraping/browser automation

Repo Shape

PathPurpose
web/appNext.js routes for auth, dashboard, docs, blog, and public pages
web/componentsDomain UI for agents, chat, widgets, billing, integrations, public site
web/libAPI client, auth helpers, stores, types, shared utilities
api/src/controllersHTTP route handlers
api/src/servicesBusiness logic and integration orchestration
api/src/modelsSQLAlchemy models
api/src/schemasPydantic request and response schemas
api/src/tasksCelery task modules
services/Supporting runtime services such as ML and scraping

Current Tech Stack

AreaCurrent Stack
FrontendNext 16.2.6, React 19, Tailwind CSS 3.4.14, Zustand, React Query, Axios, React Hook Form, Zod
BackendPython >=3.11,<3.13, FastAPI, Uvicorn, Gunicorn, SQLAlchemy 2, Alembic, LiteLLM
Async and messagingCelery, Redis, Flower, dedicated bot worker services
DataPostgreSQL, pgvector, Redis, Elasticsearch, Qdrant, Pinecone
IntegrationsOpenAI, Anthropic, Google GenAI, FastMCP, Slack, Telegram, Stripe, Firebase, ElevenLabs, SendGrid
ObservabilityLangfuse, Sentry, Prometheus metrics
DeliveryDocker Compose, Kubernetes, S3 or MinIO-compatible object storage

How The Pieces Fit Together

  1. The Next.js app acts as the operator-facing control plane and also serves public product pages, /blog, and /docs.
  2. The FastAPI backend owns authenticated APIs, public APIs, chat runtime, and tenant-aware business logic.
  3. Redis coordinates rate limiting, caching, token state, Celery, and distributed WebSocket delivery.
  4. PostgreSQL stores the durable product state.
  5. Celery and bot workers handle slow or scheduled work outside the request path.
  6. Retrieval, storage, and observability services support knowledge-heavy and production workloads.

The rest of the architecture pages break these parts down in more detail.