Skip to content

Architecture reference

This page is a reference for how Obics is built. You don’t need it to use Obics, but it’s useful if you self-host, or if you want to understand exactly what happens between clicking “scan” and seeing a recommendation.

Obics runs as a set of services alongside a Kafka message bus and a PostgreSQL database (provided by Supabase). It talks to four kinds of external system:

External systemDirectionPurpose
Observability vendor (Datadog, Grafana, CloudWatch, Coralogix)ReadDiscover logs, metrics, volume and cardinality; read dashboards and monitors.
Source code host (GitHub, GitLab, Azure DevOps)Read + WriteClone repos to match telemetry to code; create branches, commits and PRs.
LLM provider (Vertex AI / Gemini, OpenAI, Anthropic, Bedrock, Azure)OutboundTurn log/metric + code context into optimization suggestions and fix code.
Container registry (gcr.io)PullPull Obics service images on install/update.
ServiceLanguageRole
obics-serverNode/TypeScript (Fastify)The main API and scan scheduler; everything the frontend talks to.
frontendReact (Vite)The web UI.
siftrPythonGroups raw logs into clusters.
matchrPythonExtracts log patterns from clusters.
rmatchrRustRegex-matches log patterns against source code.
optirPythonGenerates optimization suggestions for log clusters (via LLM).
symmetryPythonDiscovers metrics and their cardinality.
meteorPythonDetects where each metric is emitted in code.
outlinePythonGenerates optimization recommendations for metrics (via LLM).
fixrPythonCreates the actual code fix and opens the pull request.

A scan begins when obics-server creates a scan record and publishes one Kafka message. That single message fans out into two pipelines that run in parallel.

obics-server → siftr → matchr → rmatchr → optir
  1. siftr groups logs into clusters, emits schedule.match_logs.
  2. matchr extracts patterns from clusters, emits schedule.log_patterns_ready.
  3. rmatchr matches patterns to source code, emits schedule.match_logs_finished.
  4. optir asks the LLM for an optimization per cluster and stores the suggestions.
obics-server → symmetry → meteor → outline
  1. symmetry discovers metrics and cardinality, emits schedule.metric_analysis.
  2. meteor finds each metric’s source in code, emits schedule.metric_analysis_finished.
  3. outline asks the LLM which metrics are redundant/reducible and stores the recommendations.

The results of both land in the database and show up on the Optimize Logs and Optimize Metrics pages.

Creating a pull request is a separate, user-triggered flow. When you approve a suggestion, obics-server sends a message to fixr, which reads the recommendation from the database, clones your repo, generates the fix with an LLM, creates a branch + commit + PR on your provider, and updates the fix record. A webhook from your source host notifies Obics when the PR merges or closes.

Every organization’s data is isolated: rows are keyed by organization and protected by PostgreSQL row-level security, every API call carries a JWT, and repositories are cloned into ephemeral temporary directories that are discarded after each scan. Credentials for external systems live in environment variables, never in the database.

Obics can run:

  • Managed cloud (Obics-hosted).
  • Self-hosted on Kubernetes, via the provided Helm chart.
  • Self-hosted with Docker Compose, which bundles Kafka and Supabase.

Self-hosted deployments show selfhost as their environment in logs.