Volcano for developers. Eruptions are prod pushes, lava is hotfixes, ash is technical debt, magma chambers are staging.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
code-volcano
Volcano for developers. Eruptions are prod pushes, lava is hotfixes, ash is technical debt, magma chambers are staging.
Usage
const { Volcano, ERUPTION_TYPES } = require('./src/volcano');
const volcano = new Volcano('Mount Production');
// Build pressure in staging
volcano.deployToStaging(25);
volcano.deployToStaging(30);
// Erupt! (push to prod)
volcano.triggerEruption(ERUPTION_TYPES.PROD_PUSH);
// Monitor
console.log(volcano.craterView());
console.log(volcano.monitoring.dashboard());
// Emergency
volcano.evacuate(); // disable all systems
volcano.restore(); // bring them back
// Clean up tech debt
volcano.cleanup(15);
console.log(volcano.report());
Eruption Types
- Production Push (severity 7) — Major deploy, lava of new features everywhere
- Emergency Hotfix (severity 5) — Fast targeted fix, high lava flow
- Rollback (severity 4) — Retreat to last known good, lots of dust
- Catastrophic Data Loss (severity 10) — Everything burns, no backups
- Cache Clear (severity 2) — Minor puff of smoke
- Deploy Pipeline (severity 3) — CI/CD bubbling up
Components
- MagmaChamber — Pressure/temperature tracking, critical threshold, eruption history
- Eruption — Type-based severity, lava/ash/seismic output, tick-based lifecycle
- Monitoring — Error rate, CPU/memory/disk, uptime, configurable thresholds, danger levels
- Volcano — Full system: staging, eruptions, lava flows, ash, evacuation, ASCII crater