← projects

case study

VoxForge

Voice AI stacks split across transports and lack production operability (eval, replay, deploy).

problem

Voice AI prototypes usually split across transports (WebSocket demos, REST glue, WebRTC pilots) with no shared pipeline, evaluation, or deploy story. Operators cannot trust what changed between releases.

solution

VoxForge is a modular monolith that routes every transport through one VoicePipelineService: LangGraph agents, pgvector RAG, per-turn evaluation, signed replay, and human handoff behind a single FastAPI core with a Docker + NGINX production path.

requirements

Self-hostable on a single VPS; one-command HTTPS; mock providers for CI without vendor API keys; operator visibility (sessions, latency, alerts); citation-grounded RAG; SAML for enterprise pilots.

architecture

See VoxForge docs: docs/architecture/ and ADRs in the repository. Diagrams are maintained upstream — this site does not duplicate them to avoid drift.

Modular monolith with Clean Architecture boundaries. FastAPI + LangGraph orchestration, PostgreSQL/pgvector for knowledge retrieval, Redis for session state. Single VoicePipelineService unifies WebSocket, REST onboarding, and LiveKit WebRTC. Docker Compose prod stack with NGINX, Certbot, OpenTelemetry, and one-command HTTPS deploy on Ubuntu 24.04.

event & data flow

Client connects via WebSocket, REST onboarding, or LiveKit WebRTC → gateway normalizes audio/text → VoicePipelineService runs STT → LangGraph agent graph (planner, safety, executor, critic) → optional pgvector retrieval → TTS response. Each turn can be evaluated and replayed with a signed link.

reliability

Health and readiness endpoints behind NGINX; session state in Redis; PostgreSQL for knowledge and configuration. Incident runbooks and backup scripts ship with the deploy stack. Mock providers complete the pipeline in CI without external dependencies.

security

JWT, RBAC, API keys, optional SAML SSO. CI runs secret scanning and dependency audit. Production deploy documented for Ubuntu 24.04 with TLS via Certbot.

testing

CI collects 426 tests (407 non-browser passed at last pinned metrics doc). Playwright browser tests run in a separate job. Coverage gate on src/voxforge: 76.4% (see docs/project-metrics.md).

performance

Benchmark documents exist in the VoxForge repo; this page does not quote latency numbers without linking to a pinned benchmark revision. Mock pipeline exercises full path quickly for regression testing.

what i built

  • Transport. WebSocket gateway, REST API, LiveKit WebRTC worker integration
  • Agents. LangGraph orchestration with safety and critic stages
  • Knowledge. Ingestion, chunking, pgvector search, citation grounding
  • Operations. Dashboard, OpenTelemetry, deploy.sh + Docker Compose prod stack
  • Quality. pytest + Playwright CI, coverage and secret scanning gates

key decisions

  • Single VoicePipelineService. All transports call the same service so business logic and tests stay transport-agnostic.
  • Mock STT/LLM/TTS providers. Enables full pipeline tests and demos without paid API keys.
  • Per-turn evaluation. Turns operator trust into code — regressions surface in CI and dashboards, not only in demos.

trade-offs

  • Modular monolith instead of microservices — fewer moving parts for self-hosters, boundaries enforced in code.
  • pgvector on Postgres instead of a dedicated vector DB — simpler ops for pilots.
  • Evaluation every turn — extra compute for operator trust and regression detection.

lessons

  • Unifying transports early prevented three divergent test suites.
  • Signed replay links make voice regressions reviewable without replaying production audio blindly.

verified results

  • 407 non-browser tests passed (426 collected)
  • 76.40% coverage on src/voxforge (non-browser suite)
  • v1.0.0-rc.1 · self-hostable
  • Live demo and status pages at voxforge.brohammad.tech
  • Open source: v1.0.0-rc.1

evidence gaps

  • Republish portfolio figures whenever docs/project-metrics.md is regenerated at a new commit.