💡 Inspiration: The Name.com Roulette

A great startup begins with a domain name. When we spun the Name.com Domain Roulette, we landed on a word every developer dreads: Panic.

A domain is the front door to your business. But when a network route fails, an API drops packets, or a payload silently corrupts... panic ensues. The industry standard to prevent this is Chaos Engineering. The problem? It is currently a luxury gatekept by enterprise pricing and steep learning curves. Indie developers and small teams are left manually copying commands into messy terminals, hand-crafting parameters, and risking total network lockouts if their testing proxy crashes.

We were inspired by the word "Panic" to build its exact opposite: Resilience. We wanted to democratize chaos engineering by transforming an enterprise-exclusive practice into a seamless, accessible, and zero-overhead tool for the rest of us.

🚀 What it does

Panic.design is a zero-overhead, AI-driven Serverless Chaos Engineering platform. It sits between your users and your origin server, allowing you to inject precision Layer 4 to Layer 7 faults—such as Box-Muller Normal distribution latency, stochastic packet loss, and aggressive payload mutilation (e.g., Unexpected EOF, Type Poisoning).

Instead of fighting with YAML files and terminals, you simply tell our AI what you want (e.g., "Simulate a trans-Pacific submarine cable fault for 30% of traffic"), and it instantly parses your intent into executable chaos constraints.

🛠️ How we built it

We engineered a Dual-Plane Architecture entirely on Cloudflare's global edge network. When selecting our tech stack, we prioritized extreme edge performance and strict security:

  • @opennextjs/cloudflare: Instead of a traditional Node.js deployment, we compiled our Next.js 16 Control Plane to run purely on Cloudflare Workers, achieving true Serverless global distribution.
  • jose: We completely abandoned database reads for our Data Plane proxy. Instead, we use jose to execute pure in-memory cryptographic JWT chaos token verification in the V8 Edge environment in under $1\text{ms}$.
  • @marsidev/react-turnstile: Implementing invisible zero-trust human verification without degrading the user experience.
  • topojson-client: To visualize the global blast radius without the heavy payload of traditional map tiles, we leveraged TopoJSON for hyper-efficient vector topology rendering in the browser.

📐 The Mathematics of the L.G.P.A. Engine

Because we cannot directly read client GPS coordinates due to privacy sandbox constraints, we developed the Latency-Guided Proximity Anchoring (L.G.P.A.) Engine using a precise 5-step spatial algorithm to visualize the blast radius:

  1. Latency Measurement: We compute the edge-to-client network RTT ($T_1$) and the edge-to-upstream backhaul ($T_3$).
  2. Linear Interpolation: We derive a virtual spatial coordinate weight $\alpha$ based on the time differential: $$ \alpha = \frac{T_1}{T_1 + T_3} $$
  3. Distance Comparison: We execute a Haversine Matrix Scan to calculate the spherical distances $d$ across the Earth's surface against known topographical points: $$ d = 2r \arcsin\left(\sqrt{\sin^2\left(\frac{\Delta\phi}{2}\right) + \cos\phi_1\cos\phi_2\sin^2\left(\frac{\Delta\lambda}{2}\right)}\right) $$
  4. Angle Arbitration: We calculate the initial bearing/azimuth to determine the exact geometric vector trajectory of the network request.
  5. Colo Dictionary Anchoring: Finally, we snap the computed virtual coordinates to our hardcoded dictionary of global Cloudflare Colocation centers (e.g., LAX, FRA, NRT), successfully plotting the intermediary node on the dashboard.

🚧 Challenges we ran into

  1. The "Zero-Overhead" Dilemma: Initially, every request through our proxy queried our D1 database to check if a fault should be injected. This added 50-80ms of latency, which violated our "zero-overhead" promise. Refactoring to a Stateless JWT Authorization model solved this, but required strict clock-sync and salt validation.
  2. React State Batching Races: We built a custom typewriter effect for our AI AutoFill. However, React's asynchronous state batching caused severe closure leaks, resulting in duplicated and skipped characters. We had to rewrite the animation loop using strict async/await and local variable closures to achieve 60FPS silk-smooth typing.
  3. Fail-Open Engineering: Building an interceptor proxy is dangerous. If our proxy crashed, the user's website would go down. We spent significant time engineering a Fail-Open architecture—if our control database experiences a global outage, the edge node gracefully catches the exception and bypasses the chaos layer, ensuring the client's Name.com domain remains completely uninterrupted.

🏆 Accomplishments that we're proud of

  • Democratizing Chaos: We successfully abstracted away the terminal, creating an interface that is usable by beginners via a "Quick Demo", intermediates via "AI Autofill", and SREs via manual granular sliders.
  • Enterprise-Grade Security: Implementing strict rate-limiting, Cloudflare Turnstile invisible human verification, and robust prompt injection defenses.
  • Predictive AI Insights: Our AI doesn't just act as a chatbot; it actively evaluates the telemetry simulation logs to generate deep, actionable architectural insights and identify cascading bottlenecks.

📚 What we learned

  • Serverless Edge Capabilities: We learned how to push Cloudflare Workers to their absolute limits, leveraging asynchronous execution contexts to do heavy lifting without blocking HTTP responses.
  • Pragmatic AI Integration: We learned that AI is most powerful when constrained. By forcing our LLM to output strict JSON schemas instead of conversational text, we turned it into a reliable infrastructure compiler.

⏭️ What's next for Panic.design

We envision Panic.design evolving into a fully-fledged SaaS for SMEs. Our next steps include:

  • Implementing multi-region complex fault trees (simulating cascading outages across continents).
  • Providing granular manual geographical rack selection for enterprise users.
  • Expanding integrations natively into CI/CD pipelines (e.g., GitHub Actions) so chaos testing happens automatically on every staging deployment.

Stop fearing the chaos. Start designing the resilience.

🔗 GitHub Repository: [https://github.com/AndrewWangDev/panic_design] 🌍 Live Demo / API Docs: [https://panic.andrewwangdev.com]

Built With

Share this project:

Updates

Submission history