learntodriveai.dev/Web Development/Real-Time Systems and Production Infrastructure
Web Development·Project 11·9 units

Real-Time Systems and Production Infrastructure

**Track:** Web Development

§ Brief

You're rebuilding an ordering system for four trattorias in Naples and on the Amalfi Coast — adding real-time order delivery, async loyalty processing, and then making the whole thing production-ready with Terraform, security scanning, and AI infrastructure engineering.

The discipline skills: WebSockets for real-time UI, async processing with dead letter queues and idempotency, performance testing in CI with Lighthouse CI, Terraform-managed Azure infrastructure, supply chain security with Snyk, Zod schema validation, business-outcome alerting with Grafana, and custom AI skills, hooks, and agents.

The AI-direction lesson: you move from steering AI to engineering systems around it. You write your first skill — a deployment workflow AI follows consistently without you watching. You set up hooks that fire automatically and catch mistakes before they reach production. You design a custom agent with deliberate scope boundaries. This is directing by design: encoding your judgment into infrastructure that shapes AI's future behavior. AI generates fire-and-forget async patterns, Terraform with permissive defaults, and alert rules with generic thresholds. The difference now is that you build the systems that catch these patterns, not just catch them yourself.

Your Role

You rebuild a working ordering system into one that handles real-time load, then make it production-ready with managed infrastructure, security, and alerting. Two phases, same client, same codebase.

The first phase is the application: real-time order delivery to kitchen screens, async processing for loyalty points, test infrastructure that can simulate a full dinner rush. The second phase is everything around the application: Terraform-managed cloud infrastructure, supply chain security, business-outcome alerting, and AI infrastructure engineering.

What's New

Last time you migrated a REST API to GraphQL, added caching and Docker Compose, built observability with OpenTelemetry, and deployed to Azure for an architecture firm in Helsinki. You worked from a brief only, authored project memory, and governed AI tool permissions.

Three things change.

Everything gets harder at the same time. Real-time UI, async backend, and test infrastructure all reach new terrain simultaneously. The system that works fine for two restaurants breaks with four — and the failure modes are immediate. Frozen tablets. Lost orders. Customers who can't use their loyalty points.

You make your own code production-ready. The application you build in the first phase becomes the inherited codebase for the second. Terraform, security scanning, alerting, and runbooks transform "it works" into "I can sleep at night knowing it's working."

You engineer AI infrastructure. You write your first skill — a deployment workflow AI follows consistently. You set up hooks that fire automatically. You design a custom agent with deliberate scope boundaries. You direct Codex CLI alongside Claude Code for the first time. AI is no longer something you steer — it's something you build systems around.

Tools

  • Next.js, TypeScript, PostgreSQL, Prisma, Redis — continuing from previous projects.
  • WebSockets — new. Real-time bidirectional communication for the ordering system.
  • Vitest — new. Unit and integration testing with custom matchers and fixtures.
  • Playwright — new at this scope. Adversarial and performance testing.
  • Lighthouse CI — new. Performance budget enforcement in CI.
  • Terraform — new. Infrastructure as code for Azure resources.
  • Azure services — continuing. App Service, PostgreSQL, Redis Cache, Key Vault, networking.
  • Snyk / npm audit — new. Dependency vulnerability scanning.
  • Zod — new. Schema validation at API boundaries.
  • Grafana alerting — new at this scope. Business-outcome alerts and runbooks.
  • Claude Code skills, hooks, agents — new. AI infrastructure engineering.
  • Codex CLI — new. Second AI coding tool for cross-tool experience.
  • VS Code + Claude Code, Git + GitHub — continuing.

Materials

  • Existing ordering system — a Next.js + PostgreSQL application with four locations, 80 menu items, 50 customers, and 200 historical orders. Functional but not designed for scale or real-time. The kitchen screen polls every 5 seconds. Loyalty points calculate overnight.
  • Luca's Slack message — how the project starts. Late at night, after closing.
  • Project governance file — a starting CLAUDE.md for the inherited system.