ArchitectureOverview

Architecture Overview

Surviva Health is a distributed application with clear separation between frontend, backend, and data layers.

Technology Stack

LayerTechnologyHosting
FrontendNext.js 14 App Router (TypeScript)Vercel
BackendFastAPI (Python)Fly.io
DatabaseSupabase (PostgreSQL + Auth + Realtime + Storage)EU West 1 (Ireland)
AIKORA integration via Kennis OS Assembler moduleKennis OS Platform API
Design Tokens@septimius-technology-group/tokensnpm registry
AuthSupabase Auth + Septimius JWT verificationSupabase

System Diagram

User (Browser / Mobile)
        |
        v
 Vercel (Next.js 14)
   - Server components for data fetching
   - Client components for interactivity
   - Teal wellness-focused UI via design tokens
        |
        v
 Fly.io (FastAPI)
   - REST API endpoints
   - Business logic and validation
   - Health guardrails (KOS-GUARD-HEALTH-001)
        |
        +---> Supabase
        |       - PostgreSQL (data persistence)
        |       - Auth (user identity)
        |       - Realtime (live updates)
        |       - Storage (file uploads)
        |
        +---> Kennis OS Platform API
                - POST /api/platform/v1/assemble
                - KORA-007 / CHT-056 bot instance
                - Health coaching and insights

Key Architectural Decisions

Assembler exclusivity — Surviva never calls the Anthropic SDK directly. All AI interactions route through the Kennis OS Assembler module via the Platform API. This centralises prompt management, guardrails, and audit logging.

KORA bot identity — Surviva uses bot KORA-007 with channel CHT-056. The Assembler applies the KOS-GUARD-HEALTH-001 guardrail to all responses, ensuring health-related output meets safety and accuracy standards.

Supabase in EU West 1 — All user health data resides in Ireland to comply with GDPR and UK data protection requirements. Row-Level Security policies enforce per-user data isolation at the database layer.

Design tokens — The @septimius-technology-group/tokens package provides a teal wellness-focused palette. Surviva extends the base tokens with health-specific semantic colours for assessment scoring and status indicators.