Skip to content

System architecture

A single Viite Platform API (Hono, port 3000) fronts every vertical. Clients — the React dashboard and the CLI — talk to it through @abeauvois/platform-sdk. A durable pg-boss queue drives the unified Job engine, and everything persists to PostgreSQL.

flowchart TD
    dash["Dashboard — React + Vite<br/>platform-sdk · platform-ui"]
    cli["CLI — cleye<br/>platform-sdk · platform-sdk-cli"]

    subgraph api ["Viite Platform API · Hono :3000"]
        direction TB
        verticals["Auth · Config / Settings · Jobs<br/>(presets · schedules · workers · StepRegistry)<br/>Ingestion (Gmail / web / CDP)<br/>Social · Blog · Tasks · Quotes<br/>Classifieds · Notion export · Gamification<br/>Skills · Triage · Activity · Observation"]
        pgboss[["pg-boss · durable job queue"]]
        verticals --> pgboss
    end

    db[("PostgreSQL<br/>Users & Sessions · Jobs & Schedules<br/>Tasks (unified — social / blog drafts live here too)<br/>Quotes · Settings<br/>Ingestion watermarks · Observations<br/>pgboss.* (runtime-managed)")]

    dash --> api
    cli --> api
    api --> db
CategoryTechnology
RuntimeBun
LanguageTypeScript
BackendHono (lightweight HTTP framework)
FrontendReact 19 + Vite + TailwindCSS
RoutingTanStack Router
StateTanStack React Query
DatabasePostgreSQL + Drizzle ORM
Authbetter-auth (with bearer plugin)
Job queuepg-boss (drives the unified Job engine)

The Viite Platform API is the central auth provider. On sign-in it issues a session cookie (same-origin web apps) and a bearer token (CLI / cross-origin). userId is threaded through every vertical’s repositories for multi-tenancy — see Tenancy.

Continue with the hexagonal model that keeps the domain infrastructure-free.