Space station for developers. Modules are microservices, astronauts are engineers, solar panels are CI, airlocks are deploy gates.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
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