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 / edge-api)
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
Staff using the admin portal
sequenceDiagram
participant Staff
participant Admin as Admin Portal
participant DB as MariaDB
participant SES as Amazon SES
Staff->>Admin: Sign in (core credentials + 2FA)
Admin->>DB: Validate user, write session row (tokens)
Staff->>Admin: Accounts, invoices, subscriptions, quotes
Admin->>DB: Read and write core tables directly
Admin->>SES: Customer mail (SMTP)
Admin-->>Staff: Pages, PDFs
Dependency Map
| Service |
Depends On |
Called By |
| Core API |
MariaDB, Vault API (optional) |
Customer dashboard |
| Admin Portal |
MariaDB, Amazon SES; Borgun and ChartMogul optional |
Staff |
| 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-api |
SQS, ClickHouse (read-only) |
End users (via CloudFront) |
| Grafana |
ClickHouse |
Engineers (monitoring) |
Databases
| Database |
Engine |
Used By |
Data |
| MariaDB |
MariaDB 10.x (RDS) |
Core API, Laravel monolith, Admin Portal |
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 |