Skip to content

System graph

How the 12 apps and 13 shared packages fit together. Edges point from consumer to dependency. Services that share a data store are linked via that store node.

graph TD
    subgraph Sites["Customer-facing sites"]
        SM["site-main"]
        SS["site-shop"]
        SH["site-hypno"]
    end

    subgraph Portals["Portals"]
        P["portal\nadmin"]
        PBW["portal-business-web\nCaddy proxy"]
        PB["portal-business\nSPA + Fastify BFF"]
        DOCS["docs\nAstro Starlight"]
    end

    subgraph APIs["API servers"]
        SA["scheduler-api\nFastify - tRPC - Temporal"]
        VS["vendure-server\nNestJS - GraphQL"]
        D["directus\nHeadless CMS"]
    end

    subgraph Workers["Background workers"]
        SW["scheduler-worker\nBullMQ consumer"]
        VW["vendure-worker\nBullMQ consumer"]
    end

    subgraph Packages["Shared packages"]
        SCon["scheduler-contracts\nZod source of truth"]
        SDK["scheduler-sdk\nPublic API hooks"]
        SClient["scheduler-client\ntRPC client"]
        SPClient["scheduler-platform-client\nServer/e2e client"]
        BC["business-client\nCustomer-facing hooks"]
        VSK["vendure-sdk\nVendure GraphQL hooks"]
        DSK["directus-sdk\nDirectus hooks"]
        AC["auth-client\nWorkOS AuthKit primitives"]
        WA["workos-auth\nServer JWT gates"]
        PE["platform-events\nBullMQ typed events"]
        REG["registrar\nPorkbun domain client"]
        UI["ui\nshadcn + Radix + Tailwind"]
        ST["shared-types"]
    end

    subgraph Stores["Data stores"]
        NS[("Neon\nscheduler DB")]
        NV[("Neon\nvendure DB")]
        ND[("Neon\ndirectus DB")]
        RD[("Redis\nBullMQ + cache")]
        R2[("Cloudflare R2\nassets")]
        TMP[("Temporal\nworkflow state")]
    end

    subgraph External["External services"]
        WOS["WorkOS"]
        STR["Stripe"]
        PB_EXT["Porkbun"]
    end

    %% Site dependencies
    SM --> BC & VSK & DSK & UI
    SS --> BC & VSK & DSK & UI
    SH --> SDK & VSK & DSK & UI
    BC --> SDK
    SDK --> SCon

    %% Portal dependencies
    P --> SClient & AC & UI
    PBW --> PB
    PB --> SClient & AC & UI

    %% API dependencies
    SA --> SCon & WA & PE & REG & NS & RD & TMP & WOS & STR & PB_EXT
    SW --> PE & RD
    VS --> VSK & NV & RD & R2 & STR & SPClient
    VW --> PE & RD
    D --> ND & R2 & WOS
Layer Packages Consumed by
Contracts scheduler-contracts scheduler-sdk, scheduler-api, scheduler-client
Public SDK scheduler-sdk, vendure-sdk, directus-sdk business-client, vendure-server, sites
Customer client business-client sites
Admin client scheduler-client portal, portal-business, e2e tests
Platform client scheduler-platform-client vendure-server (ops scripts), e2e tests (M2M / server-to-server)
Auth auth-client, workos-auth portals, scheduler-api, directus
Events platform-events scheduler-api, scheduler-worker, vendure-worker
UI @nexus/ui all React apps
Infra registrar, shared-types scheduler-api, infra tooling