Slloy Operations & Engineering Documentation
Authoritative business rules, AI generation pipelines, financial controls, SEO governance, security boundaries, and Cloudflare Workers operations for slloy.com.
Welcome to the official internal engineering and operations documentation for Slloy (slloy.com). This site documents the active production architecture, pricing models, margin guardrails, AI channel integrations, and operational runbooks.
System Overview
- Runtime: Cloudflare Workers (
server/src/worker.tswith Hono + TanStack Start SSR for/prompts) - Database: Neon PostgreSQL 17 via Cloudflare Hyperdrive (
--caching-disabled, session timezoneAsia/Shanghai) - Object Storage: Cloudflare R2 (
slloy-production-uploads, served via/uploads/*with HTTP Range support, backed up daily viarclone copytoslloy-production-uploads-backup) - Async Job Queue: Cloudflare Queues (
IMAGE_QUEUEslloy-production-images+-dlq) - Edge AI: Cloudflare Workers AI (
AIbinding) for real-time prompt translation (/api/translate) - Model Providers: Volcengine Ark (Seedream 5.0 Pro / 5.5, Seedance 2.0 / 2.5), Alibaba Cloud DashScope (Qwen-Image 3.0, Wan 2.2 / 2.6 / 2.7 / 3.0), and Kuaishou Kling (Kling 3.0 / 4.0)
- Payments: Stripe Checkout (
subscriptionfor monthly plans,paymentfor annual plans and credit packs) + Billing Portal + Dispute Automation - Locales: 14 languages (
en,zh-CN,zh-TW,ja,ko,es,fr,de,pt,ru,ar,hi,id,he, with full RTL support forarandhe)
Documentation Sections
1. Business, Pricing & Channels
9 subscription and credit pack plans, margin guardrails (50% target / 20% hard floor), 5 image + 12 video models, Stripe lifecycle, and channel procurement.
2. Generation, Settlement & Safeguards
Async Cloudflare Queue image pipeline, pure-white product framing, video polling & 5-minute sweeper, 11 failCodes, and daily spending caps.
3. Prompt Library, Compliance & Translation
8 deliverable families (A-H), 6 compliance redlines, 60s isolate cache, ring-queue recommendations, and Workers AI edge translation.
4. SEO, i18n & Redirect Governance
Worker-level 14-locale negotiation, Title/H1 rules, sitemap indexing scope, and 882 table-driven legacy 301 redirects.
5. Auth, Admin & Security
Customer Better Auth vs staff_accounts separation, registration guard (DoH MX, Turnstile), 3-tier Admin RBAC, and Cloudflare Access Zero Trust.
6. Operations, Deployment & Disaster Recovery
Production Cloudflare Workers, Staging, per-branch Feature Environments, R2 incremental backups, and quarterly Neon 7-day PITR drills.
7. Architecture, Design System & Testing
Public site design tokens, browser reference image normalization + server header sniffing, request cancellation observability, and Postgres template test cloning.