learntodriveai.dev/Web Development/Real-Time Systems and Production Infrastructure
Web DevelopmentProject 119 unitsVerified on 16 October 2026

Real-Time Systems and Production Infrastructure

Luca FerraraOwner · Restaurant group · Naples, Italy
Slack message · from Luca
Every night during dinner rush, the tablets freeze. My waitstaff go back to paper. … I just know it worked fine with two locations and now with four it's falling apart during peak hours
Chat with Luca

What you hand back

  • Real-time order delivery to kitchen screens
  • Loyalty points that update during the meal
  • Dead letter queue monitoring for failed jobs
  • Terraform-managed Azure infrastructure
  • Business-outcome alerts with runbooks
  • A deployment skill, hooks and a custom agent

9 units

  1. Unit 1: The Existing System

    Set up the inherited ordering system, then question Luca about his four locations and legal duties.

    Open unit 1
  2. Unit 2: Real-Time Frontend

    Replace kitchen screen polling with WebSockets, including reconnection, instant order updates and a test of the Positano WiFi drop.

    Open unit 2
  3. Unit 3: Async Backend

    Move loyalty points to background processing on Redis, keep the fiscal receipt synchronous, and watch the dead letter queue.

    Open unit 3
  4. Unit 4: Test Infrastructure

    Build shared test tools, seed data per test, and simulate a full dinner rush with failures.

    Open unit 4
  5. Unit 5: Infrastructure as Code

    Answer Luca's second message by writing Terraform for the Azure resources and reviewing the plan before applying it.

    Open unit 5
  6. Unit 6: Supply Chain Security

    Audit the npm dependencies, add rate limits calibrated to dinner rush, and validate inputs with Zod schemas.

    Open unit 6
  7. Unit 7: Alerting and Observability

    Design three business-outcome alerts in Grafana, write runbooks for each, and test that they fire.

    Open unit 7
  8. Unit 8: AI Infrastructure Engineering

    Write a deployment skill, set up hooks, create a custom agent, and delegate a task to Codex CLI.

    Open unit 8
  9. Unit 9: Ship It

    Run the deployment skill, verify production, document the infrastructure lifecycle and hand the system over to Luca.

    Open unit 9
Read the full 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 it to production on Vercel, Neon and Upstash 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 — new on the default path (P10 offered Azure only as an optional aside). 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.
Materials · 22 files
Start Project 11

You work at a computer with a terminal. Signed in, your place is saved.