Ocean for developers. Waves are traffic spikes, currents are data flows, depths are legacy layers, storms are incidents.
  • JavaScript 100%
Find a file
2026-06-30 11:14:34 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:14:31 +00:00
src feat(#1): ocean engine — depths, currents, marine life, waves, storms, buoys, ASCII ocean 2026-06-15 18:10:17 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:14:31 +00:00
package.json feat(#1): ocean engine — depths, currents, marine life, waves, storms, buoys, ASCII ocean 2026-06-15 18:10:17 +00:00
README.md feat(#1): ocean engine — depths, currents, marine life, waves, storms, buoys, ASCII ocean 2026-06-15 18:10:17 +00:00

code-ocean

Ocean for developers. Waves are traffic spikes, currents are data flows, depths are legacy layers, storms are incidents.

Usage

const { Ocean, CREATURES, ZONES } = require('./src/ocean');

const ocean = new Ocean('Pacific Production');

// Spawn creatures
ocean.spawnCreature(CREATURES.SHARK, 5);   // Aggressive scrapers
ocean.spawnCreature(CREATURES.WHALE, 3);    // Large queries

// Deploy monitoring buoys
ocean.deployBuoy('API Sensor', 'twilight');

// Traffic spike!
ocean.spawnWave(8);

// Incident!
ocean.spawnStorm(7);

// Time passes
for (let i = 0; i < 10; i++) ocean.tick();
ocean.advanceDay();

console.log(ocean.oceanView());
console.log(ocean.report());

Depth Zones

  • Surface (Live Traffic) — 0m, where requests hit
  • Sunlight Zone (App Layer) — 200m, frontend services
  • Twilight Zone (API Layer) — 1000m, microservices
  • Midnight Zone (DB Layer) — 4000m, databases, cold and dark
  • Abyssal Zone (Legacy Layer) — 6000m, ancient code still running

Marine Life

  • Whale — Large slow query
  • Shark — Aggressive scraper
  • Plankton — Health checks
  • Jellyfish — Slow drifting queries
  • Anglerfish — Hidden bugs luring you in
  • Giant Squid — Race condition
  • Viperfish — N+1 query problem
  • Herring School — Normal traffic