Skip to main content

Clari Content Platform

Enterprise content coordination platform with intelligent sync, refinement, tagging, and real-time collaboration capabilities.

Platform Overview

Clari is a microservices-based content platform built on Go, designed for high-throughput content processing and real-time collaboration.

Core Services

ServicePurposeTechnology
EngineCore backend API and orchestrationGo + Fiber
STITCHContent coordination - two-way sync, conflict resolution, change trackingGo
SIFTDocument refinement - duplicate detection, semantic enrichment, quality metricsGo
SPAWNHydration and metadata - content injection, MDX generation, JSON serializationGo
CASTTagging and linking - tag parsing, resolver dispatch, cross-repo link resolutionPython
RELAYReal-time presence, activity events, WebSocket connectionsGo + gorilla/websocket
GatewayAPI gateway with routing, rate limiting, reverse proxyGo

Architecture

┌─────────────────────────────────────────────────────────┐
│                      GATEWAY                             │
│              (Routing, Rate Limiting)                    │
└────────────────────┬────────────────────────────────────┘

        ┌────────────┼────────────┐
        │            │            │
   ┌────▼───┐   ┌───▼────┐  ┌───▼────┐
   │ ENGINE │   │ RELAY  │  │ STITCH │
   │  (API) │   │  (WS)  │  │ (Sync) │
   └────┬───┘   └────────┘  └───┬────┘
        │                       │
   ┌────▼───┐   ┌────────┐  ┌──▼─────┐
   │  SIFT  │   │ SPAWN  │  │  CAST  │
   │(Refine)│   │(Hydrate)│  │ (Tags) │
   └────────┘   └────────┘  └────────┘
        │            │           │
        └────────────┼───────────┘

              ┌──────▼──────┐
              │ PostgreSQL  │
              └─────────────┘

Technology Stack

  • Primary Language: Go 1.21+
  • Web Framework: Fiber (Express-like)
  • Database: PostgreSQL + GORM
  • Real-time: gorilla/websocket
  • Deployment: Docker, Kubernetes, Railway
  • Observability: Prometheus, Grafana, structured logging

Key Features

  1. Content Synchronization
    • Two-way sync with conflict resolution
    • Change tracking and version control
    • Multi-source content coordination
  2. Document Refinement
    • Duplicate detection with semantic analysis
    • Quality metrics and scoring
    • Metadata enrichment
  3. Real-time Collaboration
    • Presence tracking across documents
    • Activity event streaming
    • WebSocket connection management
  4. Tag Resolution
    • Declarative tag parsing
    • Cross-repository link resolution
    • Metadata enrichment pipeline

Performance Characteristics

  • Throughput: 10,000+ requests/second per service
  • Latency: P95 < 50ms for API calls
  • WebSocket: 10,000+ concurrent connections per RELAY instance
  • Scaling: Horizontal scaling across all services

Repository Structure

  • clari-tools/engine - Core backend and API
  • clari-tools/stitch-service - Content sync service
  • clari-tools/sift-service - Document refinement
  • clari-tools/spawn-service - Content hydration
  • clari-tools/cast-service - Tag resolution
  • clari-tools/web - Frontend application
  • clari-tools/kubernetes-manifests - K8s deployment configs
  • clari-tools/helm-charts - Helm charts
  • clari-tools/terraform-infrastructure - Infrastructure as code

Deployment

Clari supports multiple deployment models:
  • Development: Docker Compose
  • Staging: Railway (managed PaaS)
  • Production: Kubernetes (self-hosted or managed)

Getting Started

Each service can be run independently:
# Engine (Go)
go run cmd/server/main.go

# Stitch/Sift/Spawn (Go)
go run main.go

# Cast (Python)
poetry install
poetry run uvicorn cast.main:app --reload

Documentation

  • Architecture analysis and technical decisions
  • Sprint completion reports and taskset summaries
  • Integration testing and deployment plans
  • Production readiness documentation

Organization: clari-tools
Primary Stack: Go, PostgreSQL, Docker, Kubernetes