AI split — Puter.js (browser) + Cloudflare Workers AI (server) — Two AI providers, picked by surface. Puter.js for browser-side calls (user-pays, no API key client-side). Cloudflare Workers AI for server-side calls inside the Hono Worker (10K neurons/day, zero-egress, native binding). Different surfaces, different reasons.
API hosting triple-rail: GH Pages per API + RapidAPI listing + data.oriz.in aggregator hub — Every oriz API repo serves data via THREE rails simultaneously. (1) GitHub Pages per API with custom domain <name>.api.oriz.in (CNAME). (2) RapidAPI marketplace listing (free + paid tiers for monetization). (3) Single data.oriz.in aggregator app on Cloudflare Pages that catalogs all APIs + provides unified docs + dashboard. NO Cloudflare Workers anywhere. Each API repo also ships native distributables (APK/MSIX/EXE/PWA) via PWABuilder — even API repos get installable apps. 14 APIs scaffolded: existing FII/DII + MMI + 12 new (NSE-BSE tickers, MF-NAV proxy of api.mfapi.in, RBI rates, gold/silver, IRCTC PNR, CPCB AQI, global AQI proxy, petrol/diesel, pincode, IFSC, India holidays, currency aggregator).
API mocks — MSW (in-process) + Mockoon (out-of-process), split by surface — Two API-mock tools, one per surface. MSW handles in-browser + in-Node test mocks (unit / Vitest, component stories, Playwright dev). Mockoon handles E2E + manual dev mocks of third-party APIs (Razorpay sandbox, Open-Meteo, Alpha Vantage when offline). Both free OSS. Different surfaces, different reasons.
Billing webhook architecture: CF Pages Function → Firestore — Razorpay (INR) + Paddle (ROW) + Play Billing (Android) + MS Store (Windows) webhook handlers all land on a single CF Pages Function endpoint per provider (4 endpoints total). The function (1) verifies the provider's webhook signature, (2) writes user subscription state to Firestore, (3) returns 200. Zero CF Workers in the hot path of payments. Each provider's pricing page button is a direct platform link — no proxy through our infra. ~1 Pages Function call per purchase.
Cloudflare Worker quota mitigation playbook — Locked 2026-06-20: 8-step playbook for staying under the CF Workers free-tier quota (100K req/day per Worker, 10ms CPU/req). Cache aggressively at the edge, split Workers by domain, and prefer _headers/_redirects over Worker logic when possible. Generalises the URL-shortener cache trick to every Worker in the family.
Data APIs — Open-Meteo (weather) + Alpha Vantage (finance) — Locked 2026-06-20: Open-Meteo for weather data, Alpha Vantage for finance / market data. Both free, no card. Both fronted by the umbrella Hono Worker with KV-backed cache (1h TTL on weather, 1d TTL on finance EOD) per the CF Worker quota mitigation playbook.
Distribution + queues locked: 3-store browser-ext + dual VS Code marketplace + PWA-only + CF Queues + Hookdeck — Single Batch 13 lock covering distribution + reliability. Browser extensions publish to Chrome + Firefox + Edge. VS Code extensions publish to VS Code Marketplace + Open VSX (JetBrains walked back). Every site is a PWA via @vite-pwa/astro (Capacitor + Tauri walked back). Webhook reliability is Hookdeck → Cloudflare Queues (Trigger.dev walked back). All free, no card.
Drafts queue host — private GitHub repo with Issues (replaces Telegram) — Manual-post drafts queue lives in a private GitHub repo (chirag127/oriz-drafts) using GitHub Issues. omni-publish creates one issue per draft per platform with platform-labelled tags. Issue body is ready-to-paste copy + canonical URL + cover image URL. Close issue when manually posted; reopen if retry needed. Replaces Telegram (banned in India). Requires OMNI_DRAFTS_GH_PAT env var with repo scope.
GitHub Pages as canonical static JSON API host — Static, read-only JSON APIs live in -api repos and serve via GitHub Pages with a custom subdomain. GH Actions cron updates the JSON. Cloudflare Worker only for dynamic / write / auth-gated endpoints. APIs are publishable to RapidAPI + other monetization marketplaces.
Health checks — split between healthchecks.io (cron heartbeats) and Better Stack (HTTP uptime) — Locked 2026-06-20: cron-job liveness is verified by healthchecks.io heartbeat pings (dead-man-switch on 20 free checks), HTTP endpoint uptime is verified by Better Stack monitors (10 free monitors). Two distinct surfaces, two free tools, no overlap. Reinforces the auto-only-tracking rule — both verify auto-tracked surfaces without human polling.
Hono RPC for type-safe API client — Type-safe site→API client built via Hono's hc. No codegen, no schema files — backend types flow to N frontends through a workspace package.
Hono framework — write once, deploy to all 4 serverless rails — Locked 2026-06-23. Every API/Worker in the family uses Hono. Same business logic compiles to CF Workers, Deno Deploy, AWS Lambda, and Render Node — via 4 thin adapter shims (~10 LOC each). Removes per-rail rewrites when failover requires switching rails.
Local dev tunneling — Wrangler + Astro dev + Cloudflare Tunnel — Locked 2026-06-20: local dev for the family runs on three substrates picked by surface — Wrangler dev for Cloudflare Workers, Astro dev for sites, Cloudflare Tunnel (cloudflared) for exposing localhost to the public internet for webhook testing. ngrok and localtunnel REJECTED.
Market-data APIs — FII/DII Activity + Tickertape MMI as standalone repos (GH Actions + GH Pages) — Two India-market data APIs in the family, each in its own GitHub repo: oriz-flow-fii-dii-activity-api (NSE/Moneycontrol FII/DII net activity) + oriz-mmi-tickertape-mmi-api (Tickertape Market Mood Index). GH Actions cron scrapes; GH Pages + raw.githubusercontent.com serve. The earlier CF Worker design (and the briefly-tried oriz-market-data aggregator) were both reverted on 2026-06-22; this file is now active again under the per-repo + GH-Pages shape.
Queue — Cloudflare Queues, picked for stack cohesion — Cloudflare Queues is the family's primary durable queue. Picked for native Worker bindings + same-account billing surface, not for feature richness. Upstash QStash + Inngest documented as deferred alternatives.