Skip to content

Service Topology

How CookieHub's services connect and depend on each other.

Request Flows

Customer using the dashboard

sequenceDiagram
    participant User as Customer
    participant Core as Core API
    participant DB as MariaDB
    participant Vault as Vault API
    participant CH as ClickHouse

    User->>Core: Dashboard API calls
    Core->>DB: Domain/consent/subscription data
    Core->>Vault: GET analytics (consent rates, sessions)
    Vault->>CH: Query aggregated metrics
    CH-->>Vault: Results
    Vault-->>Core: Analytics response
    Core-->>User: Dashboard data

End user visiting a customer's website

sequenceDiagram
    participant Browser as End user
    participant Edge as Edge (CloudFront / Scaleway)
    participant SQS as SQS
    participant Vault as Vault API
    participant CH as ClickHouse

    Browser->>Edge: Load widget
    Edge-->>Browser: Widget JS + config
    Browser->>Edge: Consent event (accept/deny)
    Edge->>SQS: Queue consent event
    SQS->>Vault: Ingest event
    Vault->>CH: Store

Scan triggered from the dashboard

sequenceDiagram
    participant User as Customer
    participant Core as Core API
    participant Atrax as Atrax API
    participant Node as Atrax Node
    participant S3 as S3

    User->>Core: POST /domains/:id/scans
    Core->>Atrax: Dispatch scan job
    Atrax->>Node: Assign crawl task
    Node->>Node: Headless browser crawl
    Node->>S3: Upload screenshots
    Node->>Atrax: Return cookies/scripts found

Dependency Map

Service Depends On Called By
Core API MariaDB, Vault API (optional) Customer dashboard
Vault API ClickHouse, PostgreSQL Core API, Edge (via SQS)
Vault ETL ClickHouse Scheduled/triggered
Atrax API PostgreSQL, S3 Core API
Atrax Node Atrax API, S3 Atrax API
Edge (CloudFront) SQS, S3 End users
Edge (Scaleway) Core API End users
Grafana ClickHouse Engineers (monitoring)

Databases

Database Engine Used By Data
MariaDB MariaDB 10.x (RDS) Core API, Laravel monolith Domains, users, subscriptions, consent config
PostgreSQL PostgreSQL 17 (RDS) Vault API, Atrax API Vault metadata, scan job state
ClickHouse ClickHouse (EC2) Vault API, ETL, Grafana Consent events, session analytics