System & Information Architecture
Kaupvik Keel 4-Layer Architecture
Kaupvik separates shared B2B engineering infrastructure from each Shopify product’s store-scoped business rules, credentials, and native writes.
┌──────────────────────────────────────────────────────────────────────┐ │ Layer 4 · Future Open Ecosystem (ERPs, Headless B2B, 3rd-Party Apps) │ ├──────────────────────────────────────────────────────────────────────┤ │ Layer 3 · Four Specialized Vertical App SDKs (CLOSED SOURCE) │ │ ├─ Company Onboard SDK (Profiles, Locations, Contacts, Graph) │ │ ├─ Quick Order SDK (7-Language Parser, Aliases, Lists) │ │ ├─ Wholesale & Reps SDK (Rep PWA, Quoting, Quotas, Attribution) │ │ └─ Credit & Terms SDK (Checkout Credit Gate, AR Aging, Terms) │ ├──────────────────────────────────────────────────────────────────────┤ │ Layer 2 · Kaupvik Keel Capability Runtime (/api/keel/v1/*) │ │ ├─ FastAPI Spine Service + Neon Postgres (keel_* tables only) │ │ ├─ Dual-Runtime Core (@kaupvik/keel + kaupvik_keel) │ │ └─ Rotating kid HS256 Tokens + Optional R2 Artifact Mirror │ ├──────────────────────────────────────────────────────────────────────┤ │ Layer 1 · Open-Source UI System (@kaupvik/polaris · MIT License) │ │ └─ 25 React 19 Compositions & Polaris 2 Spec -> GitHub Kaupvik │ ├──────────────────────────────────────────────────────────────────────┤ │ Layer 0 · Shopify Native Authority (Companies, DraftOrders, Orders) │ └──────────────────────────────────────────────────────────────────────┘
Repository & Domain Separation Map
| Responsibility | Canonical Location | Visibility |
|---|---|---|
| Polaris 2 Component Source & Sanitized UI Spec | github.com/Kaupvik/kaupvik-polaris | Open Source (MIT) |
| Interactive Polaris 2 Docs & Developer Platform | https://keel.kaupvik.com/polaris | Public Docs |
| Shared Parsing, Filter AST & Keel Service | kuntang-dev/Kaupvik-Keel (Next.js + FastAPI + keel_* DB) | Internal / Preview API |
| 4 Product SDKs & Store Commerce Logic | Respective Kaupvik product repositories | Closed Source |
| Marketing & Public B2B Suite | www.kaupvik.com | Public Site |