Client browser
│
▼
antcpu.com/manda/ ← Static HTML · hosted on antcpu.com
antcpu.com/manda/agent/ ← Static HTML · booking agent UI
│
│ fetch() calls
▼
amandaland.vercel.app ← Next.js 15 App Router on Vercel Edge
│
├── /api/assets ← Upstash KV read
├── /api/search ← Upstash KV scan
├── /api/stats ← Upstash KV read + Discord ping
├── /api/chat ← Scripted engine · no external AI
├── /api/upload ──┬── Vercel Blob write
│ ├── Cloudinary upload
│ ├── Upstash KV write
│ └── Discord webhook notify
└── /api/auth ← Cookie set/verify/delete
Upload flow:
─────────────────────────────────────────────────────
1. Client POSTs image to /api/upload
2. File written to Vercel Blob → returns blobUrl
3. File uploaded to Cloudinary → returns cloudinaryId
4. Metadata written to Upstash KV:
key: asset:{uuid}
value: { id, filename, blobUrl, cloudinaryId,
category, visibility, meta, uploadedAt }
5. Event written to KV event log
6. Discord webhook fires with filename + category
7. Response returns full asset object
Search flow:
─────────────────────────────────────────────────────
1. GET /api/search?q=portrait
2. KV scan returns all asset keys
3. Filter by filename, title, category, EXIF match
4. Returns { count, results[], defaults{} }
Booking agent flow:
─────────────────────────────────────────────────────
1. Client POSTs message to /api/chat
2. Intent matched against keyword banks
3. Multi-step booking flow tracked per session
4. Reply returned in < 400ms
5. On booking completion → /api/notify fires Discord
Upstash KV over Supabase
Edge-compatible, zero cold starts, no connection pooling. Asset count is small — KV scan is fast enough. Supabase migration is on the roadmap for v0.4 when query complexity grows.
Static HTML for public site
antcpu.com/manda/ is a static HTML file. Fast, no framework overhead, easy to edit. Fetches live data from the Vercel API at runtime via fetch().
Scripted agent over OpenAI
Zero API cost, instant responses, fully deterministic. Intent matching covers 95% of booking conversations. OpenAI swap-in is one function call when key is available.
Cloudinary for transforms
Vercel Blob stores originals. Cloudinary handles all resizing, format conversion, and CDN delivery. Keeps Blob costs low, leverages Cloudinary free tier.
Cookie auth over JWT
httpOnly cookie, 7-day TTL, path: /. Simple, secure, no token refresh logic. Single studio key — not a multi-tenant system.
Discord as event bus
Every upload, booking intent, and system event fires a Discord webhook. Free, instant, no infrastructure. Acts as a lightweight audit log and notification system.