Operation: Black Swan is a simulation platform that explores how system design decisions compound into resilience—or fragility—under pressure. While presented as a turn-based strategy experience, it's fundamentally about understanding how constraints (time, budget), requirements (sites, throughput), and unexpected events (black swan events—both positive opportunities and negative disruptions) interact in real-world infrastructure design. The system challenges users to build systems that can effectively respond to uncertainty, teaching principles of resilience, redundancy, and adaptive design through hands-on experimentation.
Operation: Black Swan is built on a foundation of client-side first, serverless-ready architecture using AWS infrastructure. This design choice addresses the core challenges of delivering an interactive simulation that models complex system behavior: the need for rapid iteration during development, the ability to scale automatically when needed, and the flexibility to add multiplayer and analytics features without major architectural rewrites. The architecture supports both the simulation engine (modeling network behavior, constraints, and black swan events) and the learning experience (helping users understand how design decisions create or mitigate systemic risk).
The simulation runs entirely in the browser, with game logic executing client-side and state persisting to localStorage. This architecture delivers instant gameplay with zero server latency, eliminates backend complexity during development, and provides natural scalability through CloudFront's global CDN. Static hosting on S3 requires no server management, no per-request charges, and no database costs, making the platform sustainable indefinitely with minimal infrastructure overhead.
The client-side approach enables rapid iteration on game mechanics and simulation behavior without deploying backend changes. Modern React/Next.js tooling provides hot reloading, type safety with TypeScript, and component-based architecture that accelerates development velocity. For single-player session-based gameplay, localStorage provides sufficient persistence for save/resume functionality, with Zustand's persist middleware handling automatic state synchronization.
The architecture establishes a foundation for future server-side features. Game logic is structured in modular utilities that can run in either environment, allowing incremental migration when multiplayer, leaderboards, or analytics become priorities. Client-side state management remains for UI responsiveness while servers can validate critical operations, creating a hybrid architecture that preserves the benefits of both approaches.
At its core, Operation: Black Swan follows a straightforward pattern: static assets served via CDN, game logic runs in browser, state persists locally, zero server infrastructure required for MVP.
┌─────────────────────────────────────────────────────────────────┐ │ OPERATION: BLACK SWAN SYSTEM │ │ │ │ ┌──────────────┐ │ │ │ Player │ │ │ │ Browser │ │ │ └──────┬───────┘ │ │ │ │ │ │ HTTPS Request (Game URL) │ │ ▼ │ │ ┌─────────────────┐ │ │ │ CloudFront CDN │ │ │ │ (Global Edge) │ │ │ └──────┬──────────┘ │ │ │ │ │ │ Cache Hit (Edge) or Origin Request │ │ ▼ │ │ ┌─────────────────┐ │ │ │ S3 Bucket │ │ │ │ (Static Files) │ │ │ └──────┬──────────┘ │ │ │ │ │ │ Static Assets (HTML, JS, CSS, Images, Fonts) │ │ ▼ │ │ ┌─────────────────┐ │ │ │ Next.js App │ │ │ │ (React + TS) │ │ │ └──────┬──────────┘ │ │ │ │ │ │ Game Logic (Client-Side Turn Processor) │ │ ▼ │ │ ┌─────────────────┐ │ │ │ Zustand Store │ │ │ │ (Game State) │ │ │ └──────┬──────────┘ │ │ │ │ │ │ Auto-Save (Persist Middleware) │ │ ▼ │ │ ┌─────────────────┐ │ │ │ localStorage │ │ │ │ (Persistence) │ │ │ └─────────────────┘ │ └─────────────────────────────────────────────────────────────────┘
Frontend (Next.js Static Export)
output: 'export')State Management (Zustand)
localStorage via Zustand persist middlewareHosting (AWS S3 + CloudFront)
aws s3 sync out/ s3://bucket-name --delete after buildGame Logic (Client-Side Turn Processor)
Persistence (localStorage)
turn, budget, connections[],
siteToSiteConnections[], events[], missionPoints, settings