Astronomical observatory for developers. Telescopes on APIs, star charts of constellations (microservices), supernovae as outages.
  • JavaScript 100%
Find a file
2026-06-30 11:13:21 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-24 11:08:28 +00:00
src feat(#1): observatory engine — telescopes, constellations, supernovae, astronomer, ASCII sky 2026-06-15 05:11:49 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:13:18 +00:00
package.json feat(#1): observatory engine — telescopes, constellations, supernovae, astronomer, ASCII sky 2026-06-15 05:11:49 +00:00
README.md feat(#1): observatory engine — telescopes, constellations, supernovae, astronomer, ASCII sky 2026-06-15 05:11:49 +00:00

code-observatory

Astronomical observatory for developers. Telescopes on APIs, star charts of constellations (microservices), supernovae as outages.

Usage

const { Observatory, STELLAR_TYPES, CONSTELLATIONS } = require('./src/observatory');

const obs = new Observatory('Mount Production Observatory');
obs.setAstronomer('Carl');

// Install telescopes
obs.installTelescope('north-star');
obs.installTelescope('deep-field');

// Discover stars (services)
obs.discoverStar('auth-api', STELLAR_TYPES.BLUE_SUPERGIANT);
obs.discoverStar('user-api', STELLAR_TYPES.MAIN_SEQUENCE);
obs.discoverStar('legacy-cron', STELLAR_TYPES.WHITE_DWARF);

// Form constellations (microservice maps)
obs.formConstellation('Core Stack', ['auth-api', 'user-api', 'legacy-cron']);

// Observe
obs.getTelescope('north-star').aim(obs.getStar('auth-api'));
obs.observe('north-star');

// Catastrophe
obs.detectSupernova('auth-api');
obs.reviveStar('auth-api');

console.log(obs.skyChart());
console.log(obs.report());

Stellar Types

  • Main Sequence (brightness 70) — Healthy stable service
  • Red Giant (brightness 85) — Bloated legacy, resource-hungry
  • White Dwarf (brightness 30) — Deprecated but still running
  • Blue Supergiant (brightness 100) — Critical high-traffic, volatile
  • Neutron Star (brightness 50) — Dense microservice, handles massive load
  • Brown Dwarf (brightness 5) — Service that never quite launched

Components

  • Star — 6 stellar types, supernova/restart, brightness/uptime/health tracking
  • Telescope — Aim, filters (visible/infrared/ultraviolet), magnification, observation tracking
  • Constellation — Star groups with connections, brightness totals, ASCII map
  • Observatory — Astronomer, telescopes, events, supernova alerts, ASCII sky chart