📋Frontier AI System Architecture Documentation - Technical reference and development guide
🏗️ System Architecture

System Architecture

Overview

Frontier AI is a real-time AI-powered sales coaching platform built as a Turborepo monorepo optimized for fast AI processing during live sales calls. The system integrates with major video conferencing platforms and leverages Cloudflare's edge network for real-time AI coaching.

Key Architectural Principles

  • Full TypeScript Stack - Type-safe development across frontend and backend
  • React Everywhere - Unified React codebase for web and desktop applications
  • Cloudflare Edge Network - Distributed infrastructure with Durable Objects for real-time processing
  • AI-First Architecture - Integrated AI workflows for real-time coaching and post-call analysis
  • Serverless & Scalable - Pay-per-use infrastructure that scales automatically

System Overview

The platform consists of multiple client applications connecting to a unified API backend, with specialized services for real-time AI processing and post-call analysis.

Core Applications & Data Flow

This simplified view shows how the main applications interact through the API backend:

Key Architectural Decisions

Real-Time vs Post-Processing AI

The system uses two distinct AI processing paths:

  1. Real-Time Processing (OpenAI Queue)

    • Direct OpenAI API calls during live calls
    • Fast response times for live coaching
    • Rate limiting and connection pooling
    • Used by Durable Objects for immediate AI responses
  2. Post-Call Processing (Humanloop)

    • Transcript analysis after calls end
    • Complex multi-step AI workflows
    • Prompt versioning and A/B testing
    • Managed by Inngest for reliable processing

Monorepo Architecture

  • apps/dash - Next.js dashboard with API routes
  • apps/web - Desktop app with Neutralino.js
  • apps/server - Cloudflare Worker API backend
  • packages/ - Shared libraries for types, UI components, database client

Technology Stack Summary

LayerTechnologyPurpose
FrontendReact 18, TypeScript, ViteType-safe UI development
DesktopNeutralino.jsCross-platform desktop wrapper
BackendCloudflare Workers, HonoServerless API with edge computing
Real-timePartyServer, Durable ObjectsWebSocket connections and state
DatabaseNeon PostgreSQL, Drizzle ORMServerless SQL with type safety
AI ProcessingOpenAI GPT-4, HumanloopReal-time and post-call AI
OrchestrationInngestBackground job processing
AuthenticationClerkUser management and OAuth
OperationsGitHub Actions, DopplerCI/CD and secrets management