Bee hive for developers. Workers are build agents, drones are testers, queen is orchestrator, honey is data, wax is infrastructure.
- JavaScript 100%
| node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 | ||
| src | ||
| tests | ||
| package.json | ||
| README.md | ||
code-hive
Bee hive for developers. Workers are build agents, drones are testers, queen is orchestrator, honey is data, wax is infrastructure.
Usage
const { Hive, BEE_TYPES, FLOWER_TYPES, PREDATORS, SEASONS } = require('./src/hive');
const hive = new Hive('Apiary Alpha');
hive.spawnQueen('Queen Orchestrator');
hive.spawnBee('builder-1', BEE_TYPES.WORKER);
hive.spawnBee('guard-1', BEE_TYPES.GUARD);
hive.spawnBee('scout-1', BEE_TYPES.FORAGER);
// Discover flowers (APIs)
hive.addFlower(FLOWER_TYPES.REST_ROSE);
hive.addFlower(FLOWER_TYPES.GRAPHQL_SUNFLOWER);
// Forage for data
hive.forage(['scout-1']);
// Threat approaches
hive.spawnPredator(PREDATORS.WASP);
hive.defend();
// Time passes
for (let i = 0; i < 5; i++) hive.tick();
hive.advanceDay();
console.log(hive.hiveView());
console.log(hive.report());
Bee Types
- Worker (Build Agent) — Builds cells, stores honey, maintains hive
- Drone (Tester) — Tests everything, consumes honey
- Forager (Data Collector) — Flies to flowers, collects nectar
- Guard (Security) — Defends hive entrance, checks incoming
- Nurse (Onboarding) — Tends larvae, future-focused
Flowers (APIs)
- REST Rose — Standard reliable nectar source
- GraphQL Sunflower — Rich but unpredictable
- Webhook Tulip — Pushes nectar, unreliable timing
- gRPC Orchid — Fast, efficient, premium nectar
- SOAP Dandelion — Old, still producing, nobody wants
Predators
- DDoS Wasp — Overwhelms entrance
- SQL Injection Hornet — Devastating
- Tech Debt Mite — Parasite weakening from within
- Data Breach Bear — Takes everything
Components
- Bee — 5 types, health/energy/age, foraging, combat, waggle dance
- HoneycombCell — Hexagonal service mesh with honey storage
- Flower — 5 API types with nectar/pollen/reliability
- Predator — 4 threat types that attack the hive
- Hive — Queen, seasons, honey economy, ASCII cross-section