Skip to content

Repository files navigation

🔥 Chaos Simulator

Real-time chaos engineering dashboard with self-healing microservices, animated SVG topology, particle effects, scenario builder, and live telemetry.

CI Live Demo Next.js TypeScript Bun Socket.io Tailwind CSS Framer Motion Recharts License


Live Demo

https://chaos-simulation.vercel.app

Status: The live site is a full client-side simulation (no backend, no paid host). Chaos injection, self-healing, scenarios, latency charts, and the event stream all run in the browser. A Bun + Socket.io engine lives in this repo for local use only — it is not exposed on Vercel.

This is the only public repo for the project.


Screenshots

Dashboard Overview

Dashboard with live topology, latency chart and toast notifications

Chaos Scenario Builder

Multi-step Scenario Builder with presets

Live Controls & Event Stream

Disaster controls, targeted injection and live event stream

Anomaly Timeline

Filterable anomaly history with recovery times


Features

  • 3 mock microservices (Auth, Payment, Inventory) with live health, latency, and request volume
  • Automated chaos injector — 500 errors, latency spikes, and service crashes every 30 s
  • Self-healing recovery — services restore themselves within 8–15 seconds
  • Animated SVG topology with particle data flow and health-based pulse rings
  • Canvas particle bursts + synthesized sound on every critical event
  • Multi-step Scenario Builder with presets (Black Friday, Cascading Failure, etc.)
  • Real-time latency chart (60 s window) and filterable anomaly timeline
  • Manual injection controls and a network-partition button

Tech Stack

Layer Technology
Frontend Next.js 16, React 19, TypeScript, Tailwind 4, shadcn/ui
Animation Framer Motion 12, Canvas particles
Charts Recharts
Demo mode Client-side simulation on Vercel
Local engine Bun + Socket.io (not public)
CI GitHub Actions — unit, tsc, Playwright
Package mgr Bun

Architecture

Public demo (Vercel) uses useChaosEngine in the browser. No paid backend.

Local optional engine is mini-services/chaos-engine (Bun + Socket.io). The dashboard you open on Vercel does not connect to it.

Vercel / Demo                         Local only
┌─────────────────────────┐         ┌──────────────────────────┐
│ Next.js dashboard       │         │ Chaos Engine (Bun :3030) │
│ + useChaosEngine        │         │ + 3 mock services        │
│ (client simulation)     │         └──────────────────────────┘
└─────────────────────────┘

Quality

Check How
Unit tests Validation, simulation transitions, Scenario Builder presets
Types ignoreBuildErrors is offbun run typecheck
E2E Playwright: dashboard, Scenario Builder, 500 inject, partition
CI GitHub Actions on every push to main
Supply chain Unused template packages removed; Dependabot weekly (patch/minor only — do not merge majors blindly)
bun install
bun run test
bun run typecheck
bunx playwright install chromium
bun run test:e2e

Security

Portfolio demo: no user login on the public site. The browser simulation cannot reach other users.

The local Bun engine allow-lists service names and anomaly types, caps scenario payloads, and reads CORS_ORIGIN from the environment. Do not bind port 3030 to the internet without auth and a locked origin.

Details: SECURITY.md.


Quick Start (demo — same as Vercel)

bun install
bun run dev

Open http://localhost:3000.


Quick Start (local Bun engine)

# Terminal 1
cd mini-services/chaos-engine
bun install
bun index.ts

# Terminal 2
cd ../..
bun run dev

The public dashboard remains the client-side engine unless you wire Socket.io locally.


License

MIT License. See LICENSE.

About

Chaos Simulator is a real-time chaos-engineering dashboard: self-healing microservices, animated SVG topology, particle effects, scenario builder, and live telemetry charts. Next.js 16, Bun, TypeScript, Framer Motion, Recharts. Public Vercel is client-side simulation—no backend. Chaos injection, healing, latency, and event stream run in-browser. CI

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages