Skip to main content

Overview

Kaireon is a single Next.js application that serves both the web UI and REST API routes. This monolithic architecture simplifies deployment while maintaining clear module boundaries internally.

System Architecture

┌─────────────────────────────────────────────────────┐
│                    Next.js App                       │
│  ┌──────────────┐  ┌──────────────┐  ┌───────────┐ │
│  │   React UI   │  │  API Routes  │  │  Workers   │ │
│  │  (App Router)│  │  (/api/v1/*) │  │  (queues)  │ │
│  └──────┬───────┘  └──────┬───────┘  └─────┬─────┘ │
│         │                 │                 │        │
│  ┌──────┴─────────────────┴─────────────────┴─────┐ │
│  │              Prisma 7 ORM + pg adapter          │ │
│  └─────────────────────┬───────────────────────────┘ │
└────────────────────────┼─────────────────────────────┘

              ┌──────────┴──────────┐
              │    PostgreSQL       │
              │   (Supabase)       │
              └─────────────────────┘

Key Components

ComponentTechnologyPurpose
FrontendReact 18, Tailwind CSS, React QueryPlatform UI with dark theme
APINext.js API RoutesRESTful endpoints under /api/v1/
DatabasePostgreSQL via Prisma 7All persistent state
CacheRedis (Upstash)Enrichment data caching, rate limiting
Flow EditorReact Flow (@xyflow/react)Visual pipeline and journey editors
AI AssistantVercel AI SDK, multi-providerIn-app AI chat with 40+ tools
AuthNextAuth.jsSession-based authentication with RBAC

Deployment

Production runs on AWS App Runner with Supabase (PostgreSQL) and Upstash (Redis). The platform is available at playground.kaireonai.com. Docker images are pushed to Amazon ECR and tagged with the git SHA.