Museum v2 for developers. Exhibits are features, curators are maintainers, artifacts are legacy code, gift shop is npm registry.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
code-museum-v2
Museum v2 for developers. Exhibits are features, curators are maintainers, artifacts are legacy code, gift shop is npm registry.
Usage
const { Museum, EXHIBIT_TYPES, WINGS, ARTIFACT_RARITY } = require('./src/museum');
const m = new Museum('Museum of Code History');
m.hireCurator('Alice', 'backend', 7);
// Open exhibits
m.addExhibit('REST API Gallery', EXHIBIT_TYPES.PERMANENT, 'backend');
m.addExhibit('React Components Through Time', EXHIBIT_TYPES.HISTORICAL, 'frontend');
m.addExhibit('Live Playground', EXHIBIT_TYPES.INTERACTIVE, 'frontend');
// Acquire artifacts
m.acquireArtifact('jQuery 1.2 Plugin', ARTIFACT_RARITY.RARE, '2010 legacy app', 'React Components Through Time');
// Admit visitors
m.admitVisitor('New Hire', 'newhire');
m.admitVisitor('VP of Engineering', 'vip');
// Tour
m.tour(0, 'backend', 'Alice');
console.log(m.museumView());
console.log(m.report());
Exhibit Types
- Permanent — Core features always on display
- Temporary — Experiments and betas
- Interactive — Live demo environments
- Historical — Ancient code preserved under glass
- Virtual — VR debugging experience
Wings
- Frontend — UI exhibits, design systems (capacity 10)
- Backend — APIs, business logic (capacity 12)
- Infrastructure — Servers, pipelines (capacity 8)
- Hall of Fame — Legendary commits (capacity 5)
Artifact Rarity
Common -> Uncommon -> Rare -> Epic -> Legendary (the one perfect function)