┌─────────────────────────────────────────────────────────────────────────────┐
│ CUSTOMER LAYER │
├─────────────────────────────────────────────────────────────────────────────┤
│ Browser ──► Cloudflare CDN ──► wellwalla.com (WordPress/WooCommerce) │
│ │ │
│ ├──► a.wellwalla.com (Alpha - Cloudflare Pages) │
│ ├──► b.wellwalla.com (Beta - Cloudflare Pages) │
│ └──► org.wellwalla.com (Internal - Cloudflare Pages) │
└─────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ APPLICATION LAYER │
├─────────────────────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ WordPress │ │ WooCommerce │ │ Fullscript │ │ Lab APIs │ │
│ │ Core │ │ Commerce │ │ Integration │ │ (Quest/LC) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ DATA LAYER │
├─────────────────────────────────────────────────────────────────────────────┤
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ MySQL │ │ PostgreSQL │ │ S3 │ │
│ │ (WordPress) │ │ (wellwalla) │ │ (Backups) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ AWS Mac Mini AWS │
└─────────────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ INFRASTRUCTURE LAYER │
├─────────────────────────────────────────────────────────────────────────────┤
│ AWS EC2 (t2.medium) ◄──► Mac Mini (OpenClaw) ◄──► Cloudflare │
│ us-east-2 192.168.10.22 Pages/Workers │
└─────────────────────────────────────────────────────────────────────────────┘
| Service | Provider | Purpose | Status |
|---|---|---|---|
| Web Hosting | AWS EC2 (t2.medium) | WordPress/WooCommerce | Production |
| Static Sites | Cloudflare Pages | Alpha, Beta, Org sites | Production |
| CDN / Security | Cloudflare | DDoS, SSL, Caching | Production |
| DNS | Cloudflare | wellwalla.com, mangalick.vip | Production |
| Supplements API | Fullscript | Product catalog, orders | Production |
| Lab Network | Labcorp / Quest | Test orders, results | Integration Pending |
| Payments | Authorize.net | Credit card processing | Production |
| AI Assistant | OpenClaw | CEO automation | Production |
| Lab Pricing DB | PostgreSQL (Local) | Wholesale/retail pricing | Development |
| Serverless DB | Neon PostgreSQL | Production database | Planned |
| Table | Purpose | Key Fields |
|---|---|---|
| lab_tests | Canonical test catalog | id, name, description, category |
| lab_test_codes | Vendor-specific codes | lab_test_id, vendor_id, vendor_code |
| lab_test_pricing | Wholesale/retail prices | lab_test_code_id, wholesale_price, retail_price |
| lab_vendors | Lab networks | id, name, code (LABCORP, QUEST) |
| competitor_pricing | Competitor prices | lab_test_id, competitor_name, price, url |
code_crossref — Labcorp ↔ Quest code mappingget_test_price(code) — Lookup price by vendor codecalculate_margin(code, retail) — Margin calculationtest_variants — All versions of a test type