Space station for developers. Modules are microservices, astronauts are engineers, solar panels are CI, airlocks are deploy gates.
  • JavaScript 100%
Find a file
2026-06-30 11:13:39 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-28 11:08:53 +00:00
src feat(#1): space station engine — modules, crew, life support, orbit, ASCII station 2026-06-15 07:40:20 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:13:36 +00:00
package.json feat(#1): space station engine — modules, crew, life support, orbit, ASCII station 2026-06-15 07:40:20 +00:00
README.md feat(#1): space station engine — modules, crew, life support, orbit, ASCII station 2026-06-15 07:40:20 +00:00

code-space-station

Space station for developers. Modules are microservices, astronauts are engineers, solar panels are CI, airlocks are deploy gates.

Usage

const { Station, MODULE_TYPES, ROLES } = require('./src/station');

const stn = new Station('Dev Station Alpha');
stn.recruit('Alice', ROLES.COMMANDER);
stn.recruit('Bob', ROLES.ENGINEER);
stn.recruit('Carol', ROLES.SCIENTIST);

// Add more modules
stn.addModule(MODULE_TYPES.OBSERVATORY);
stn.addModule(MODULE_TYPES.GREENHOUSE);

// Assign crew
stn.assign('Bob', 'lab');
stn.assign('Carol', 'observatory');

// EVA (debug in prod)
stn.performEVA('Bob');

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

console.log(stn.stationView());
console.log(stn.report());

Modules

  • Habitat (Frontend) — Crew living quarters, UI layer
  • Research Lab (Backend) — Core business logic
  • Solar Array (CI/CD) — Generates power for the station
  • Airlock (Deploy Gate) — Where deploys enter and leave
  • Observatory (Monitoring) — Watches everything, logs metrics
  • Docking Port — Where supply ships (packages) connect
  • Greenhouse (Auto-scaler) — Generates oxygen, scales naturally
  • Storage Bay (Database) — Holds everything, persistent

Crew

  • Commander (Tech Lead) — Runs the station
  • Flight Engineer (SRE) — Fixes everything
  • Research Scientist (Backend Dev) — Runs experiments
  • Flight Medic (DevOps) — Keeps crew alive
  • Comms Officer (Frontend Dev) — Talks to Earth
  • Pilot (Release Manager) — Navigates deploys

Components

  • Module — 8 types, power/oxygen output, crew capacity, damage/repair
  • Astronaut — 6 roles, health/energy/oxygen/stress/radiation, EVA system
  • Station — Orbit cycle, life support, random events, ASCII station view