Technology Stack Definition and Developer Guide
Purpose
Section titled “Purpose”Defines a single, authoritative standard for enterprise-grade media platforms.
- Final technology stack (Runtime, API, AI, Admin)
- Local development standards and developer contracts
- CI/CD and GitOps-based automation
- E2E automation (Playwright)
- Payments, messaging, and ad management
- AI semantic search infrastructure
- Real-time incident response and observability strategy
Architecture Vision
Section titled “Architecture Vision”We aim to build an enterprise media platform integrating AI, payments, advertising, automation, and observability.
Core Objectives
Section titled “Core Objectives”- 🌍 Global response within 100ms (Edge)
- 🔐 API Gateway-based Security and Policy First
- 🤖 AI Semantic Search and Personalized Recommendations
- 🚀 Real-time Fault Detection and Response
- 👥 Multi-team Scalable Standard Development Experience
Design Philosophy
Section titled “Design Philosophy”- Contract First: The API is the contract
- Local First: Validate locally before reaching the server
- Gateway Aware: Validate at the same entry point (Zuplo) as the actual user
- Observability by Design: Failures are immediately exposed, no hiding allowed
Final Technology Stack
Section titled “Final Technology Stack”| Domain | Technology | Role |
|---|---|---|
| Runtime | Cloudflare Workers | Global edge execution |
| API Framework | Hono + Zod | Contract-first, type-safe API |
| Database | Cloudflare D1 + Drizzle | News and metadata storage |
| Cache / KV | Cloudflare KV | Session, Token, Cache |
| API Gateway | Zuplo (GitOps) | Authentication, Rate Limiting, Policies |
| CI/CD | GitHub Actions | Testing, Deployment, Policy Synchronization |
| Local Dev | Wrangler | Local Edge Simulation |
| Unit Testing | Vitest | Local·CI Standard |
| E2E Testing | Playwright | User Perspective Validation |
| Monitoring | Sentry | Real-time Fault Response |
| AI Search | Cloudflare Vectorize | Semantic News Search |
| Payments | Stripe | Subscription·Payment |
| Messaging | Twilio | SMS·Notifications |
| Editor | Cursor | AI Pair Programming |
Developer Philosophy
Section titled “Developer Philosophy”- Code that fails locally must not be deployed to the server
- The server is an execution environment, not a development environment
- Testing is a mandatory gateway, not an option
- Enforce development environments with rules; documentation alone is insufficient
“CI is not the source of trust, but the second line of defense.”
End-to-End Flow
Section titled “End-to-End Flow”Local Development (Cursor) ↓Local Unit & Contract Testing (Vitest) ↓Local Edge Simulation (Wrangler) ↓Git Commit / Push (GitHub) ↓CI Continuous Testing (Vitest) ↓Automated Deployment (Cloudflare Workers) ↓Gateway Synchronization (Zuplo) ↓End-to-End Verification (Playwright) ↓Runtime Monitoring & Incident Response (Sentry)Core Rule: Always validate locally before deploying to the server.