Snow globe for developers. Shake it = deploy, snow settles = stable, blizzard = incident, the tiny village inside is your infrastructure.
  • JavaScript 100%
Find a file
2026-06-30 11:14:53 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-28 11:10:50 +00:00
src feat(#1): snow globe engine — village, snow, shake, blizzard, seasons, ASCII globe 2026-06-15 20:37:30 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:14:50 +00:00
package.json feat(#1): snow globe engine — village, snow, shake, blizzard, seasons, ASCII globe 2026-06-15 20:37:30 +00:00
README.md feat(#1): snow globe engine — village, snow, shake, blizzard, seasons, ASCII globe 2026-06-15 20:37:30 +00:00

code-snowglobe

Snow globe for developers. Shake it = deploy, snow settles = stable, blizzard = incident, the tiny village inside is your infrastructure.

Usage

const { SnowGlobe, BUILDING_TYPES, SEASONS } = require('./src/snowglobe');

const globe = new SnowGlobe('Production Village');

// Add buildings (services)
globe.addBuilding('Cache Barn', BUILDING_TYPES.BARN, 20, 20);
globe.addBuilding('Worker House', BUILDING_TYPES.HOUSE, 40, 15);

// Shake it! (deploy)
globe.shake();

// Change season
globe.setSeason(SEASONS.WINTER); // Production freeze

// Blizzard! (incident)
globe.triggerBlizzard(7);

// Recover
globe.maintainAll();
globe.warmCitizens();
globe.repairGlass(15);

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

console.log(globe.globeView());
console.log(globe.report());

Building Types

  • House (Small Service) — HP 80, tiny microservice cottage
  • Shop (API Endpoint) — HP 100, serves citizens
  • Tower (Core Service) — HP 150, tallest, everyone sees it
  • Church (Database) — HP 200, ancient, eternal, sacred data
  • Barn (Cache Layer) — HP 60, temporary storage
  • Bridge (Network Route) — HP 70, connects parts

Seasons

  • Winter (Prod Freeze) — Snow accumulates, freeze risk
  • Spring (New Sprint) — Thaw, new growth
  • Summer (Stable) — Warm, calm, best deploy time
  • Autumn (Prep) — Hardening for winter

Components

  • Building — Snow cover, frozen state, condition degradation
  • Citizen — Warmth, movement, freeze death at 0 warmth
  • SnowGlobe — Shake (deploy), blizzard (incident), glass integrity, ASCII globe