Garden v2 for developers. Plants are features, soil is codebase, compost is refactored code, greenhouse is staging, irrigation is CI/CD.
  • JavaScript 100%
Find a file
2026-06-30 11:15:43 +00:00
node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709 test: add e2e tests 2026-06-28 11:12:08 +00:00
src feat(#1): garden v2 engine — plots, plants, irrigation, compost, pests, ASCII garden 2026-06-16 01:08:59 +00:00
tests fix: e2e tests now use CommonJS require for node --test compatibility 2026-06-30 11:15:40 +00:00
package.json feat(#1): garden v2 engine — plots, plants, irrigation, compost, pests, ASCII garden 2026-06-16 01:08:59 +00:00
README.md feat(#1): garden v2 engine — plots, plants, irrigation, compost, pests, ASCII garden 2026-06-16 01:08:59 +00:00

code-garden-v2

Garden v2 for developers. Plants are features, soil is codebase, compost is refactored code, greenhouse is staging, irrigation is CI/CD.

Usage

const { Garden, PLANT_TYPES, WEATHER } = require('./src/garden');

const garden = new Garden('Feature Farm');
garden.hireGardener('Alice', 5);

// Plant features
garden.plant(1, PLANT_TYPES.TOMATO);   // CRUD App
garden.plant(2, PLANT_TYPES.PUMPKIN);  // Major Feature
garden.plant(3, PLANT_TYPES.ROSE);     // Premium Feature

// Water (deploy)
garden.waterPlot(1);

// Time passes
for (let i = 0; i < 15; i++) garden.tick();

// Harvest!
garden.harvestAll();

// Weather changes
garden.setWeather(WEATHER.RAINY);

console.log(garden.gardenView());
console.log(garden.report());

Plant Types

  • Tomato (CRUD App) — Reliable, everyone grows one
  • Herb (Utility Function) — Fast, useful, low maintenance
  • Rose (Premium Feature) — Beautiful, finicky, high value
  • Strawberry (Quick Win) — Fast, sweet, great for demos
  • Pumpkin (Major Feature) — Massive, takes forever, impressive
  • Cactus (Microservice) — Survives anything, solitary
  • Vine (Background Job) — Spreads everywhere, takes over

Components

  • Plot — Garden beds with soil quality, capacity, greenhouse mode
  • Plant — 7 types, 7 growth stages, water/health/pests
  • CompostBin — Refactored code turned to nutrients
  • Gardener — Skill/energy system, harvest/pest tracking
  • Garden — Multi-plot management, weather, irrigation, ASCII layout