Your production-ready chaos engineering NPM package is complete and built successfully.
- ✅
src/- Full TypeScript source code (9 files)types.ts- All TypeScript interfacescore.ts- Chaos logic, probability calculators, ANSI color loggingadapters/express.ts- Express middlewareadapters/next.ts- Next.js App Router + Pages Router adaptersmutators/- Body mutation, header havoc, zombie modedashboard/template.ts- Zero-dependency live HTML dashboard
- ✅
index.js- CommonJS build (29.32 KB) - ✅
index.mjs- ESM build (28.22 KB) - ✅
index.d.ts- TypeScript definitions (6.12 KB) - ✅
index.d.mts- TypeScript definitions for ESM
- ✅
README.md- Complete user documentation (no AI corporate speak) - ✅
EXAMPLES.md- Usage examples for Express and Next.js - ✅
CONTRIBUTING.md- Development setup guide - ✅
LICENSE- MIT License
- ✅
package.json- Ready for NPM publish - ✅
tsconfig.json- Strict TypeScript configuration - ✅
.gitignore- Git exclusions - ✅
.npmignore- NPM publish exclusions
npm loginEdit package.json:
- Change
"author"to your name - Update
"repository"URL if you have a GitHub repo
npm publishThat's it. The package is live on NPM.
- ✅ Latency Injection - Random delays (100ms-3000ms configurable)
- ✅ Error Fuzzing - Random 500, 502, 503, 504 errors
- ✅ Timeout Simulation - Infinite request hangs
- ✅ Body Mutation - Corrupt JSON responses (undefined, -999, flipped booleans)
- ✅ Zombie Mode - Slow-drip byte streaming
- ✅ Header Havoc - Scramble/delete/alter response headers
- ✅ Rate Limiting - Fake 429 responses with Retry-After headers
- ✅ Live Dashboard - Web UI at
/__fuzzboxwith real-time controls - ✅ Spike Mode - 80% chaos for 30 seconds via dashboard
- ✅ Route Targeting - Include/exclude specific endpoints
- ✅ Colorized Logs - ANSI escape codes (no chalk dependency)
- ✅ Zero Dependencies - Only Node.js built-ins
mkdir test-express && cd test-express
npm init -y
npm install express
npm link ../fuzzboxCreate server.js:
const express = require('express');
const { fuzzboxExpress } = require('fuzzbox');
const app = express();
app.use(fuzzboxExpress({ probability: 0.3 }));
app.get('/api/test', (req, res) => {
res.json({ message: 'Hello World' });
});
app.listen(3000, () => console.log('http://localhost:3000/__fuzzbox'));Run:
node server.jsVisit http://localhost:3000/__fuzzbox to see the dashboard.
- Total Size: ~28-29 KB (minified)
- Dependencies: 0 (zero runtime dependencies)
- TypeScript: Strict mode, full type safety
- Build Time: ~2-3 seconds
- Node Version: >=16.0.0
- Update repository URL in package.json if you have a GitHub repo
- Test the package locally using
npm link - Publish to NPM with
npm publish - Star your own repo (you deserve it)
The package is ready. No changes needed. Ship it.
Built with zero AI corporate speak. Just controlled chaos for resilient systems.