Historical task source. The Eve task board holds current task state.
Phase 29: Demeter - Comprehensive Home Gardening Platform#
Domain Purpose: State-of-the-art home gardening platform combining traditional horticultural knowledge with modern IoT, AI/ML, and data-driven insights. Named after the Greek goddess of harvest, agriculture, and fertility.
29.1 Foundation & Core Infrastructure#
29.1.1 Domain Setup#
- 29.1.1.1 Create libs/demeter/ directory structure
- 29.1.1.2 Create libs/demeter/core/ library scaffold
- 29.1.1.3 Create libs/demeter/core/project.json with Nx configuration
- 29.1.1.4 Create libs/demeter/core/package.json with @demeter/core name
- 29.1.1.5 Create libs/demeter/core/tsconfig.json extending base config
- 29.1.1.6 Create libs/demeter/core/tsconfig.lib.json for library builds
- 29.1.1.7 Create libs/demeter/core/tsconfig.spec.json for tests
- 29.1.1.8 Create libs/demeter/core/vite.config.ts for Vitest
- 29.1.1.9 Add @demeter/core path mapping to tsconfig.base.json
- 29.1.1.10 Verify @demeter/core builds successfully
29.1.2 Core Domain Models#
- 29.1.2.1 Create Garden entity with id, name, location, climate zone, area, type
- 29.1.2.2 Create GardenBed entity with dimensions, soil type, sun exposure, irrigation
- 29.1.2.3 Create Plant entity linking to encyclopedia with planting date, location, status
- 29.1.2.4 Create Planting entity tracking individual plant instances in garden
- 29.1.2.5 Create Harvest entity with yield, quality, date, plant reference
- 29.1.2.6 Create Task entity with type, due date, recurrence, completion status
- 29.1.2.7 Create Observation entity for journal entries with photos, notes, metrics
- 29.1.2.8 Create Sensor entity with type, location, calibration, readings
- 29.1.2.9 Create Alert entity for notifications, warnings, reminders
- 29.1.2.10 Create User entity with preferences, location, experience level
29.1.3 Core Value Objects#
- 29.1.3.1 Create ClimateZone value object (USDA, Köppen, custom zones)
- 29.1.3.2 Create GeoLocation value object with lat/lng, elevation, aspect
- 29.1.3.3 Create SoilComposition value object with type, pH, NPK, organic matter
- 29.1.3.4 Create SunExposure value object (full sun, partial, shade, hours)
- 29.1.3.5 Create WaterRequirement value object with frequency, amount, method
- 29.1.3.6 Create GrowingConditions value object combining soil, sun, water, temp
- 29.1.3.7 Create PlantSpacing value object with row spacing, plant spacing, depth
- 29.1.3.8 Create HarvestWindow value object with start date, end date, peak
- 29.1.3.9 Create NutrientProfile value object for fertilizer requirements
- 29.1.3.10 Create TemperatureRange value object with min, max, optimal
29.1.4 Core Enumerations#
- 29.1.4.1 Create PlantType enum (vegetable, fruit, herb, flower, tree, shrub, vine, grass)
- 29.1.4.2 Create PlantLifecycle enum (annual, biennial, perennial)
- 29.1.4.3 Create GrowthStage enum (seed, germination, seedling, vegetative, flowering, fruiting, harvest, dormant)
- 29.1.4.4 Create SoilType enum (clay, sandy, loamy, silty, peaty, chalky)
- 29.1.4.5 Create TaskType enum (water, fertilize, prune, harvest, weed, pest-control, plant, transplant)
- 29.1.4.6 Create SensorType enum (moisture, temperature, humidity, light, pH, EC, flow)
- 29.1.4.7 Create IrrigationType enum (drip, sprinkler, soaker, manual, flood)
- 29.1.4.8 Create GardenType enum (in-ground, raised-bed, container, vertical, greenhouse, indoor)
- 29.1.4.9 Create PestType enum (insect, mammal, bird, fungal, bacterial, viral)
- 29.1.4.10 Create TreatmentType enum (organic, chemical, biological, mechanical, cultural)
29.1.5 Core Services#
- 29.1.5.1 Create GardenService for CRUD operations on gardens
- 29.1.5.2 Create PlantingService for managing plant instances
- 29.1.5.3 Create TaskService for task scheduling and management
- 29.1.5.4 Create HarvestService for tracking yields and quality
- 29.1.5.5 Create ObservationService for journal entries
- 29.1.5.6 Create AlertService for notifications and warnings
- 29.1.5.7 Create SensorService for sensor data management
- 29.1.5.8 Create CalendarService for date/time calculations
- 29.1.5.9 Create UnitConversionService for metric/imperial conversions
- 29.1.5.10 Create ValidationService for input validation
29.1.6 Database Schema#
- 29.1.6.1 Create demeter database in PostgreSQL
- 29.1.6.2 Create gardens table with all garden fields
- 29.1.6.3 Create garden_beds table with dimensions and properties
- 29.1.6.4 Create plantings table linking plants to beds
- 29.1.6.5 Create harvests table for yield tracking
- 29.1.6.6 Create tasks table with recurrence support
- 29.1.6.7 Create observations table with JSONB for flexible data
- 29.1.6.8 Create sensors table for IoT device registry
- 29.1.6.9 Create sensor_readings table with TimescaleDB hypertable
- 29.1.6.10 Create alerts table for notification history
- 29.1.6.11 Create proper indexes for all query patterns
- 29.1.6.12 Create database migrations using Drizzle ORM
- 29.1.6.13 Create seed data for development and testing
- 29.1.6.14 Implement soft delete for all entities
- 29.1.6.15 Add audit columns (created_at, updated_at, created_by)
29.1.7 Core Tests#
- 29.1.7.1 Write unit tests for all domain entities
- 29.1.7.2 Write unit tests for all value objects
- 29.1.7.3 Write unit tests for all enumerations
- 29.1.7.4 Write unit tests for GardenService
- 29.1.7.5 Write unit tests for PlantingService
- 29.1.7.6 Write unit tests for TaskService
- 29.1.7.7 Write unit tests for HarvestService
- 29.1.7.8 Write unit tests for CalendarService
- 29.1.7.9 Write unit tests for UnitConversionService
- 29.1.7.10 Achieve 90%+ code coverage on @demeter/core
29.2 Plant Encyclopedia & Knowledge Base#
29.2.1 Encyclopedia Library Setup#
- 29.2.1.1 Create libs/demeter/plants/ directory structure
- 29.2.1.2 Create libs/demeter/plants/project.json
- 29.2.1.3 Create libs/demeter/plants/package.json as @demeter/plants
- 29.2.1.4 Configure TypeScript and Vitest for plants library
- 29.2.1.5 Add @demeter/plants path mapping to tsconfig.base.json
- 29.2.1.6 Verify @demeter/plants builds successfully
29.2.2 Plant Data Models#
- 29.2.2.1 Create PlantSpecies entity with botanical name, common names, family
- 29.2.2.2 Create PlantVariety entity with cultivar info, hybrid status
- 29.2.2.3 Create PlantTaxonomy entity with kingdom, phylum, class, order, family, genus
- 29.2.2.4 Create GrowingRequirements entity with soil, sun, water, temperature needs
- 29.2.2.5 Create PlantingInstructions entity with depth, spacing, timing
- 29.2.2.6 Create CareGuide entity with watering, fertilizing, pruning schedules
- 29.2.2.7 Create HarvestInfo entity with days to maturity, harvest signs, storage
- 29.2.2.8 Create NutritionalInfo entity with vitamins, minerals, calories
- 29.2.2.9 Create CulinaryUses entity with cooking methods, flavor profiles
- 29.2.2.10 Create MedicinalUses entity with traditional and documented uses
29.2.3 Companion Planting System#
- 29.2.3.1 Create CompanionRelationship entity with plant pairs and relationship type
- 29.2.3.2 Implement beneficial companion matching algorithm
- 29.2.3.3 Implement antagonistic plant detection
- 29.2.3.4 Create trap cropping recommendations
- 29.2.3.5 Create nurse plant relationships
- 29.2.3.6 Implement Three Sisters planting patterns
- 29.2.3.7 Create allelopathy warnings database
- 29.2.3.8 Implement companion scoring algorithm
- 29.2.3.9 Create guild planting recommendations (permaculture)
- 29.2.3.10 Generate companion planting visualization charts
29.2.4 Pest & Disease Database#
- 29.2.4.1 Create Pest entity with identification, lifecycle, damage patterns
- 29.2.4.2 Create Disease entity with symptoms, causes, spread patterns
- 29.2.4.3 Create Treatment entity with organic and chemical options
- 29.2.4.4 Create Prevention entity with cultural practices
- 29.2.4.5 Map pests to susceptible plants
- 29.2.4.6 Map diseases to susceptible plants
- 29.2.4.7 Create beneficial insect database
- 29.2.4.8 Create biological control relationships
- 29.2.4.9 Implement IPM (Integrated Pest Management) recommendations
- 29.2.4.10 Create regional pest prevalence data
29.2.5 Climate Zone System#
- 29.2.5.1 Implement USDA Plant Hardiness Zones (1a-13b)
- 29.2.5.2 Implement Köppen climate classification
- 29.2.5.3 Implement Sunset climate zones (Western US)
- 29.2.5.4 Implement AHS Heat Zones
- 29.2.5.5 Create first/last frost date database by location
- 29.2.5.6 Create growing season length calculator
- 29.2.5.7 Implement Growing Degree Days (GDD) calculator
- 29.2.5.8 Create chill hours calculator for fruit trees
- 29.2.5.9 Implement microclimate detection and adjustment
- 29.2.5.10 Create zone-appropriate plant filtering
29.2.6 Seasonal Calendar System#
- 29.2.6.1 Create planting calendar by zone and plant
- 29.2.6.2 Create indoor seed starting schedule
- 29.2.6.3 Create transplanting timeline calculator
- 29.2.6.4 Create succession planting scheduler
- 29.2.6.5 Create fall/winter planting calendar
- 29.2.6.6 Create perennial care calendar (pruning, division)
- 29.2.6.7 Create fruit tree care calendar
- 29.2.6.8 Create lawn care calendar
- 29.2.6.9 Create moon phase planting calendar (biodynamic)
- 29.2.6.10 Generate printable seasonal calendars
29.2.7 Plant Database Population#
- 29.2.7.1 Import vegetable database (500+ varieties)
- 29.2.7.2 Import fruit database (300+ varieties)
- 29.2.7.3 Import herb database (200+ varieties)
- 29.2.7.4 Import flower database (1000+ varieties)
- 29.2.7.5 Import tree database (500+ species)
- 29.2.7.6 Import shrub database (400+ species)
- 29.2.7.7 Import grass/groundcover database (200+ species)
- 29.2.7.8 Import houseplant database (500+ species)
- 29.2.7.9 Import native plant databases by region
- 29.2.7.10 Validate all plant data for accuracy
29.2.8 Search & Discovery#
- 29.2.8.1 Implement full-text search on plant names
- 29.2.8.2 Implement faceted search (type, zone, sun, water)
- 29.2.8.3 Create plant recommendation engine
- 29.2.8.4 Implement "plants like this" similarity search
- 29.2.8.5 Create beginner-friendly plant suggestions
- 29.2.8.6 Create problem-solver search (shade, drought, deer-resistant)
- 29.2.8.7 Implement search by harvest time
- 29.2.8.8 Create pollinator-friendly plant filter
- 29.2.8.9 Implement edible landscaping suggestions
- 29.2.8.10 Create search history and favorites
29.2.9 Encyclopedia Tests#
- 29.2.9.1 Write unit tests for PlantSpecies entity
- 29.2.9.2 Write unit tests for companion planting algorithm
- 29.2.9.3 Write unit tests for climate zone calculations
- 29.2.9.4 Write unit tests for seasonal calendar
- 29.2.9.5 Write unit tests for GDD calculator
- 29.2.9.6 Write unit tests for search functionality
- 29.2.9.7 Write integration tests for plant database queries
- 29.2.9.8 Write tests for pest/disease matching
- 29.2.9.9 Write tests for recommendation engine
- 29.2.9.10 Achieve 90%+ code coverage on @demeter/plants
29.3 Garden Planning & Design#
29.3.1 Planner Library Setup#
- 29.3.1.1 Create libs/demeter/planner/ directory structure
- 29.3.1.2 Create libs/demeter/planner/project.json
- 29.3.1.3 Create libs/demeter/planner/package.json as @demeter/planner
- 29.3.1.4 Configure TypeScript and Vitest for planner library
- 29.3.1.5 Add @demeter/planner path mapping to tsconfig.base.json
- 29.3.1.6 Verify @demeter/planner builds successfully
29.3.2 Garden Layout Engine#
- 29.3.2.1 Create GardenCanvas entity with dimensions, scale, grid
- 29.3.2.2 Create BedShape entity supporting rectangle, circle, polygon, L-shape
- 29.3.2.3 Create PathElement entity for walkways and borders
- 29.3.2.4 Create StructureElement entity for sheds, greenhouses, fences
- 29.3.2.5 Create WaterFeature entity for irrigation, ponds, rain barrels
- 29.3.2.6 Implement drag-and-drop placement system
- 29.3.2.7 Implement snap-to-grid functionality
- 29.3.2.8 Implement copy/paste for garden elements
- 29.3.2.9 Implement undo/redo history (50 steps)
- 29.3.2.10 Create layer system (beds, plants, structures, irrigation)
29.3.3 Plant Placement System#
- 29.3.3.1 Implement square foot gardening grid overlay
- 29.3.3.2 Implement row planting mode
- 29.3.3.3 Implement broadcast/scatter planting visualization
- 29.3.3.4 Calculate plants per square foot automatically
- 29.3.3.5 Validate spacing requirements
- 29.3.3.6 Show companion planting suggestions in context
- 29.3.3.7 Warn on antagonistic plant placements
- 29.3.3.8 Calculate total plants needed for bed
- 29.3.3.9 Show mature plant size preview
- 29.3.3.10 Implement vertical space planning (trellises, cages)
29.3.4 Sun & Shadow Analysis#
- 29.3.4.1 Implement sun path calculation by latitude/date
- 29.3.4.2 Create shadow casting from structures
- 29.3.4.3 Create shadow casting from trees
- 29.3.4.4 Calculate daily light integral (DLI) per zone
- 29.3.4.5 Create seasonal sun exposure animation
- 29.3.4.6 Identify full sun, partial shade, full shade zones
- 29.3.4.7 Recommend plants based on light analysis
- 29.3.4.8 Suggest optimal bed placement
- 29.3.4.9 Account for building shadows
- 29.3.4.10 Create sun hours heatmap visualization
29.3.5 3D Visualization#
- 29.3.5.1 Create 3D garden renderer using Three.js
- 29.3.5.2 Model raised beds in 3D
- 29.3.5.3 Model plants with growth stages
- 29.3.5.4 Model structures (greenhouse, shed, arbor)
- 29.3.5.5 Implement camera controls (orbit, pan, zoom)
- 29.3.5.6 Create walk-through mode
- 29.3.5.7 Show seasonal growth animation
- 29.3.5.8 Render realistic plant textures
- 29.3.5.9 Add time-of-day lighting
- 29.3.5.10 Export 3D renders as images/video
29.3.6 Crop Rotation Planning#
- 29.3.6.1 Create PlantFamily groupings for rotation
- 29.3.6.2 Track bed history by year
- 29.3.6.3 Implement 4-year rotation calculator
- 29.3.6.4 Warn on rotation violations
- 29.3.6.5 Suggest rotation sequences
- 29.3.6.6 Track nitrogen fixers vs heavy feeders
- 29.3.6.7 Plan cover crop rotations
- 29.3.6.8 Visualize multi-year rotation plan
- 29.3.6.9 Account for perennials in rotation
- 29.3.6.10 Generate printable rotation schedule
29.3.7 Succession Planting#
- 29.3.7.1 Create succession planting calculator
- 29.3.7.2 Calculate planting intervals for continuous harvest
- 29.3.7.3 Schedule multiple sowings automatically
- 29.3.7.4 Account for days to maturity variations
- 29.3.7.5 Plan fall succession plantings
- 29.3.7.6 Integrate with task scheduler
- 29.3.7.7 Visualize harvest timeline
- 29.3.7.8 Calculate seed quantities needed
- 29.3.7.9 Track actual vs planned succession
- 29.3.7.10 Suggest succession crops by space availability
29.3.8 Garden Templates#
- 29.3.8.1 Create beginner vegetable garden template
- 29.3.8.2 Create salsa garden template
- 29.3.8.3 Create pizza garden template
- 29.3.8.4 Create herb spiral template
- 29.3.8.5 Create cutting flower garden template
- 29.3.8.6 Create pollinator garden template
- 29.3.8.7 Create permaculture guild templates
- 29.3.8.8 Create raised bed configurations (4x4, 4x8, etc.)
- 29.3.8.9 Create container garden templates
- 29.3.8.10 Allow users to save/share custom templates
29.3.9 Export & Printing#
- 29.3.9.1 Export garden plan as PDF
- 29.3.9.2 Export garden plan as PNG/SVG
- 29.3.9.3 Generate plant shopping list
- 29.3.9.4 Generate seed order list with quantities
- 29.3.9.5 Generate materials list (soil, amendments)
- 29.3.9.6 Create printable bed labels
- 29.3.9.7 Create printable row markers
- 29.3.9.8 Export to common garden planning formats
- 29.3.9.9 Generate planting calendar from plan
- 29.3.9.10 Share plans via link
29.3.10 Planner Tests#
- 29.3.10.1 Write unit tests for GardenCanvas
- 29.3.10.2 Write unit tests for plant placement validation
- 29.3.10.3 Write unit tests for sun path calculations
- 29.3.10.4 Write unit tests for crop rotation logic
- 29.3.10.5 Write unit tests for succession calculator
- 29.3.10.6 Write integration tests for garden saving/loading
- 29.3.10.7 Write visual regression tests for 2D rendering
- 29.3.10.8 Write tests for export functionality
- 29.3.10.9 Write tests for template system
- 29.3.10.10 Achieve 90%+ code coverage on @demeter/planner
29.4 Task & Schedule Management#
29.4.1 Tasks Library Setup#
- 29.4.1.1 Create libs/demeter/tasks/ directory structure
- 29.4.1.2 Create libs/demeter/tasks/project.json
- 29.4.1.3 Create libs/demeter/tasks/package.json as @demeter/tasks
- 29.4.1.4 Configure TypeScript and Vitest for tasks library
- 29.4.1.5 Add @demeter/tasks path mapping to tsconfig.base.json
- 29.4.1.6 Verify @demeter/tasks builds successfully
29.4.2 Task Scheduling Engine#
- 29.4.2.1 Create TaskTemplate entity for reusable task patterns
- 29.4.2.2 Create ScheduledTask entity with due date, recurrence
- 29.4.2.3 Create TaskCompletion entity tracking task execution
- 29.4.2.4 Implement daily recurrence patterns
- 29.4.2.5 Implement weekly recurrence with day selection
- 29.4.2.6 Implement monthly recurrence (day of month, week of month)
- 29.4.2.7 Implement seasonal recurrence (spring, summer, fall, winter)
- 29.4.2.8 Implement growth-stage-based task triggers
- 29.4.2.9 Implement weather-based task adjustment
- 29.4.2.10 Implement dependency chains between tasks
29.4.3 Automated Task Generation#
- 29.4.3.1 Generate watering tasks based on plant needs and weather
- 29.4.3.2 Generate fertilizing tasks based on plant schedules
- 29.4.3.3 Generate pruning tasks based on plant type and season
- 29.4.3.4 Generate harvest tasks based on maturity predictions
- 29.4.3.5 Generate pest inspection tasks seasonally
- 29.4.3.6 Generate soil testing reminders
- 29.4.3.7 Generate seed starting tasks from planting calendar
- 29.4.3.8 Generate transplanting tasks based on seedling age
- 29.4.3.9 Generate winterization tasks before frost
- 29.4.3.10 Generate spring preparation tasks
29.4.4 Task Prioritization#
- 29.4.4.1 Implement urgency scoring based on due date
- 29.4.4.2 Implement importance scoring based on task type
- 29.4.4.3 Implement weather-adjusted priorities
- 29.4.4.4 Implement plant health impact scoring
- 29.4.4.5 Create "today's tasks" smart list
- 29.4.4.6 Create "this week" task view
- 29.4.4.7 Create overdue task handling
- 29.4.4.8 Implement task batching by garden zone
- 29.4.4.9 Implement task batching by task type
- 29.4.4.10 Create quick-task suggestions based on available time
29.4.5 Calendar Integration#
- 29.4.5.1 Export tasks to iCal format
- 29.4.5.2 Sync with Google Calendar
- 29.4.5.3 Sync with Apple Calendar
- 29.4.5.4 Sync with Outlook Calendar
- 29.4.5.5 Create calendar subscription feed
- 29.4.5.6 Import events from external calendars
- 29.4.5.7 Handle calendar conflicts
- 29.4.5.8 Set task reminders via calendar
- 29.4.5.9 Block time for garden tasks
- 29.4.5.10 Integrate sunrise/sunset times
29.4.6 Notification System#
- 29.4.6.1 Implement push notifications for mobile
- 29.4.6.2 Implement email notifications
- 29.4.6.3 Implement SMS notifications
- 29.4.6.4 Create notification preferences per task type
- 29.4.6.5 Create quiet hours configuration
- 29.4.6.6 Implement notification snoozing
- 29.4.6.7 Create digest notifications (daily/weekly summary)
- 29.4.6.8 Implement critical alert override (frost warning)
- 29.4.6.9 Create notification history log
- 29.4.6.10 Implement read/acknowledged tracking
29.4.7 Task Analytics#
- 29.4.7.1 Track task completion rates
- 29.4.7.2 Track average time to complete by task type
- 29.4.7.3 Identify frequently skipped tasks
- 29.4.7.4 Calculate gardening time investment
- 29.4.7.5 Track seasonal workload patterns
- 29.4.7.6 Identify peak activity periods
- 29.4.7.7 Generate productivity reports
- 29.4.7.8 Compare planned vs actual task completion
- 29.4.7.9 Predict future workload
- 29.4.7.10 Suggest workload optimization
29.4.8 Tasks Tests#
- 29.4.8.1 Write unit tests for recurrence patterns
- 29.4.8.2 Write unit tests for task generation
- 29.4.8.3 Write unit tests for prioritization algorithm
- 29.4.8.4 Write unit tests for calendar export
- 29.4.8.5 Write unit tests for notification scheduling
- 29.4.8.6 Write integration tests for task persistence
- 29.4.8.7 Write tests for weather-based adjustments
- 29.4.8.8 Write tests for task analytics
- 29.4.8.9 Write tests for dependency chains
- 29.4.8.10 Achieve 90%+ code coverage on @demeter/tasks
29.5 Seed & Inventory Management#
29.5.1 Inventory Library Setup#
- 29.5.1.1 Create libs/demeter/inventory/ directory structure
- 29.5.1.2 Create libs/demeter/inventory/project.json
- 29.5.1.3 Create libs/demeter/inventory/package.json as @demeter/inventory
- 29.5.1.4 Configure TypeScript and Vitest for inventory library
- 29.5.1.5 Add @demeter/inventory path mapping to tsconfig.base.json
- 29.5.1.6 Verify @demeter/inventory builds successfully
29.5.2 Seed Inventory System#
- 29.5.2.1 Create SeedLot entity with variety, quantity, source, date
- 29.5.2.2 Create SeedPacket entity with packet info, seed count
- 29.5.2.3 Track seed viability by age and storage conditions
- 29.5.2.4 Calculate germination rate estimates
- 29.5.2.5 Track seed storage location
- 29.5.2.6 Implement barcode/QR scanning for seed packets
- 29.5.2.7 Track seeds used vs remaining
- 29.5.2.8 Calculate seeds needed for garden plan
- 29.5.2.9 Generate seed shopping list from gaps
- 29.5.2.10 Track seed cost and value
29.5.3 Seed Source Tracking#
- 29.5.3.1 Create SeedSupplier entity with company info, ratings
- 29.5.3.2 Track supplier reliability ratings
- 29.5.3.3 Track germination rates by supplier
- 29.5.3.4 Store supplier catalogs and pricing
- 29.5.3.5 Compare prices across suppliers
- 29.5.3.6 Track organic/heirloom/hybrid certification
- 29.5.3.7 Integrate with online seed catalogs
- 29.5.3.8 Create wishlist functionality
- 29.5.3.9 Track order history by supplier
- 29.5.3.10 Set reorder alerts for favorite varieties
29.5.4 Seed Saving System#
- 29.5.4.1 Create SeedSaving entity tracking saved seed batches
- 29.5.4.2 Guide proper seed saving techniques by plant
- 29.5.4.3 Track isolation distances for seed purity
- 29.5.4.4 Calculate minimum population for genetic diversity
- 29.5.4.5 Track seed drying and processing
- 29.5.4.6 Generate seed saving calendar
- 29.5.4.7 Track seed trades/gifts
- 29.5.4.8 Calculate seed saving success rates
- 29.5.4.9 Create seed saving guides by plant family
- 29.5.4.10 Track generational seed lineage
29.5.5 Plant Inventory#
- 29.5.5.1 Create PlantInventory entity for live plants
- 29.5.5.2 Track potted plants awaiting transplant
- 29.5.5.3 Track nursery purchases
- 29.5.5.4 Track plant divisions and propagations
- 29.5.5.5 Track plant gifts/trades
- 29.5.5.6 Calculate nursery plant costs
- 29.5.5.7 Track plant source reliability
- 29.5.5.8 Manage hardening-off schedules
- 29.5.5.9 Track plant health at acquisition
- 29.5.5.10 Generate planting reminders for inventory
29.5.6 Supply & Tool Inventory#
- 29.5.6.1 Create Supply entity for consumables (fertilizer, amendments)
- 29.5.6.2 Create Tool entity for garden tools
- 29.5.6.3 Track supply quantities and reorder points
- 29.5.6.4 Track tool maintenance schedules
- 29.5.6.5 Calculate supply usage rates
- 29.5.6.6 Generate supply shopping lists
- 29.5.6.7 Track tool lending/borrowing
- 29.5.6.8 Store tool manuals and warranty info
- 29.5.6.9 Track supply costs and budgeting
- 29.5.6.10 Integrate with shopping platforms
29.5.7 Inventory Tests#
- 29.5.7.1 Write unit tests for SeedLot entity
- 29.5.7.2 Write unit tests for viability calculations
- 29.5.7.3 Write unit tests for inventory tracking
- 29.5.7.4 Write unit tests for shopping list generation
- 29.5.7.5 Write unit tests for seed saving guides
- 29.5.7.6 Write integration tests for barcode scanning
- 29.5.7.7 Write tests for supplier integration
- 29.5.7.8 Write tests for cost calculations
- 29.5.7.9 Write tests for reorder alerts
- 29.5.7.10 Achieve 90%+ code coverage on @demeter/inventory
29.6 Journal & Observation System#
29.6.1 Journal Library Setup#
- 29.6.1.1 Create libs/demeter/journal/ directory structure
- 29.6.1.2 Create libs/demeter/journal/project.json
- 29.6.1.3 Create libs/demeter/journal/package.json as @demeter/journal
- 29.6.1.4 Configure TypeScript and Vitest for journal library
- 29.6.1.5 Add @demeter/journal path mapping to tsconfig.base.json
- 29.6.1.6 Verify @demeter/journal builds successfully
29.6.2 Observation Data Model#
- 29.6.2.1 Create JournalEntry entity with date, type, content
- 29.6.2.2 Create PlantObservation entity linked to specific plants
- 29.6.2.3 Create WeatherObservation entity for daily conditions
- 29.6.2.4 Create PestSighting entity with identification, location
- 29.6.2.5 Create HarvestEntry entity with yield, quality notes
- 29.6.2.6 Create PhotoEntry entity with image, tags, location
- 29.6.2.7 Create MeasurementEntry for numeric observations
- 29.6.2.8 Support rich text formatting (markdown)
- 29.6.2.9 Support voice-to-text entry
- 29.6.2.10 Support tagging and categorization
29.6.3 Photo Management#
- 29.6.3.1 Implement photo capture from device camera
- 29.6.3.2 Implement photo import from gallery
- 29.6.3.3 Auto-extract EXIF data (date, location, camera)
- 29.6.3.4 Implement photo compression and optimization
- 29.6.3.5 Create photo timeline view
- 29.6.3.6 Create photo gallery by plant
- 29.6.3.7 Create photo gallery by location
- 29.6.3.8 Implement photo comparison (before/after)
- 29.6.3.9 Create timelapse generation from photos
- 29.6.3.10 Implement AI-powered photo tagging
29.6.4 Growth Tracking#
- 29.6.4.1 Track plant height over time
- 29.6.4.2 Track leaf count/size
- 29.6.4.3 Track flowering/fruiting stages
- 29.6.4.4 Track color changes
- 29.6.4.5 Create growth charts and visualizations
- 29.6.4.6 Compare growth to expected patterns
- 29.6.4.7 Identify growth anomalies
- 29.6.4.8 Track days to germination
- 29.6.4.9 Track days to first harvest
- 29.6.4.10 Generate growth reports
29.6.5 Harvest Logging#
- 29.6.5.1 Log harvest weight/count by plant
- 29.6.5.2 Log harvest quality rating
- 29.6.5.3 Log harvest destination (eaten, preserved, shared, sold)
- 29.6.5.4 Calculate cumulative yields
- 29.6.5.5 Compare yields year-over-year
- 29.6.5.6 Calculate yield per plant
- 29.6.5.7 Calculate yield per square foot
- 29.6.5.8 Track peak harvest periods
- 29.6.5.9 Estimate harvest value (vs store prices)
- 29.6.5.10 Generate harvest summary reports
29.6.6 Search & Discovery#
- 29.6.6.1 Full-text search across journal entries
- 29.6.6.2 Filter by date range
- 29.6.6.3 Filter by plant/garden/bed
- 29.6.6.4 Filter by entry type
- 29.6.6.5 Filter by tags
- 29.6.6.6 Create "on this day" historical view
- 29.6.6.7 Create timeline visualization
- 29.6.6.8 Export journal to PDF
- 29.6.6.9 Export journal to markdown
- 29.6.6.10 Backup/restore journal data
29.6.7 AI-Powered Insights#
- 29.6.7.1 Analyze observations for patterns
- 29.6.7.2 Correlate observations with weather
- 29.6.7.3 Identify potential problems from descriptions
- 29.6.7.4 Suggest journal prompts
- 29.6.7.5 Generate weekly summaries
- 29.6.7.6 Highlight notable achievements
- 29.6.7.7 Remind about incomplete observations
- 29.6.7.8 Learn from past observations
- 29.6.7.9 Predict future based on patterns
- 29.6.7.10 Generate year-end garden retrospective
29.6.8 Journal Tests#
- 29.6.8.1 Write unit tests for JournalEntry entity
- 29.6.8.2 Write unit tests for observation types
- 29.6.8.3 Write unit tests for photo processing
- 29.6.8.4 Write unit tests for growth tracking
- 29.6.8.5 Write unit tests for harvest calculations
- 29.6.8.6 Write unit tests for search functionality
- 29.6.8.7 Write integration tests for photo storage
- 29.6.8.8 Write tests for AI insights
- 29.6.8.9 Write tests for export functionality
- 29.6.8.10 Achieve 90%+ code coverage on @demeter/journal
29.7 IoT & Sensor Integration#
29.7.1 Sensors Library Setup#
- 29.7.1.1 Create libs/demeter/sensors/ directory structure
- 29.7.1.2 Create libs/demeter/sensors/project.json
- 29.7.1.3 Create libs/demeter/sensors/package.json as @demeter/sensors
- 29.7.1.4 Configure TypeScript and Vitest for sensors library
- 29.7.1.5 Add @demeter/sensors path mapping to tsconfig.base.json
- 29.7.1.6 Verify @demeter/sensors builds successfully
29.7.2 Device Management#
- 29.7.2.1 Create Device entity with id, type, name, location, status
- 29.7.2.2 Create DeviceCapability entity describing sensor/actuator functions
- 29.7.2.3 Create DeviceConfiguration entity for settings
- 29.7.2.4 Implement device discovery protocols
- 29.7.2.5 Implement device pairing workflow
- 29.7.2.6 Implement device naming and organization
- 29.7.2.7 Track device battery levels
- 29.7.2.8 Track device connectivity status
- 29.7.2.9 Implement device firmware updates
- 29.7.2.10 Handle device replacement/migration
29.7.3 Protocol Adapters#
- 29.7.3.1 Implement MQTT protocol adapter
- 29.7.3.2 Implement Zigbee protocol adapter (via zigbee2mqtt)
- 29.7.3.3 Implement Z-Wave protocol adapter
- 29.7.3.4 Implement Matter protocol adapter
- 29.7.3.5 Implement Thread protocol adapter
- 29.7.3.6 Implement WiFi direct device adapter
- 29.7.3.7 Implement Bluetooth/BLE adapter
- 29.7.3.8 Implement LoRa/LoRaWAN adapter
- 29.7.3.9 Create protocol-agnostic device interface
- 29.7.3.10 Handle protocol bridging between networks
29.7.4 Sensor Data Collection#
- 29.7.4.1 Create SensorReading entity with timestamp, value, unit
- 29.7.4.2 Implement soil moisture sensor support
- 29.7.4.3 Implement soil temperature sensor support
- 29.7.4.4 Implement soil pH sensor support
- 29.7.4.5 Implement soil EC/conductivity sensor support
- 29.7.4.6 Implement air temperature sensor support
- 29.7.4.7 Implement humidity sensor support
- 29.7.4.8 Implement light level (lux/PAR) sensor support
- 29.7.4.9 Implement rain gauge sensor support
- 29.7.4.10 Implement wind speed/direction sensor support
29.7.5 Time-Series Data Storage#
- 29.7.5.1 Configure TimescaleDB hypertable for sensor data
- 29.7.5.2 Implement data retention policies
- 29.7.5.3 Implement data aggregation (hourly, daily, weekly)
- 29.7.5.4 Implement data compression for old data
- 29.7.5.5 Create efficient query patterns for time ranges
- 29.7.5.6 Implement real-time data streaming
- 29.7.5.7 Handle out-of-order data arrival
- 29.7.5.8 Implement data validation and outlier detection
- 29.7.5.9 Create data export functionality
- 29.7.5.10 Implement data backup and recovery
29.7.6 Sensor Calibration#
- 29.7.6.1 Create calibration workflow for each sensor type
- 29.7.6.2 Implement soil moisture calibration (wet/dry points)
- 29.7.6.3 Implement pH meter calibration (buffer solutions)
- 29.7.6.4 Implement EC meter calibration
- 29.7.6.5 Implement light sensor calibration
- 29.7.6.6 Track calibration history
- 29.7.6.7 Set calibration reminders
- 29.7.6.8 Apply calibration offsets to readings
- 29.7.6.9 Validate calibration accuracy
- 29.7.6.10 Handle sensor drift over time
29.7.7 Commercial Device Integration#
- 29.7.7.1 Integrate Gardena Smart System
- 29.7.7.2 Integrate Rachio smart irrigation
- 29.7.7.3 Integrate Orbit B-hyve
- 29.7.7.4 Integrate Hunter Hydrawise
- 29.7.7.5 Integrate PlantLink sensors
- 29.7.7.6 Integrate Parrot Flower Power (legacy)
- 29.7.7.7 Integrate Ecowitt weather stations
- 29.7.7.8 Integrate Ambient Weather stations
- 29.7.7.9 Integrate Davis Instruments weather stations
- 29.7.7.10 Create integration SDK for third parties
29.7.8 DIY Sensor Support#
- 29.7.8.1 Create ESP32/ESP8266 firmware templates
- 29.7.8.2 Support capacitive soil moisture sensors
- 29.7.8.3 Support DS18B20 temperature sensors
- 29.7.8.4 Support DHT22/BME280 environment sensors
- 29.7.8.5 Support BH1750 light sensors
- 29.7.8.6 Support tipping bucket rain gauges
- 29.7.8.7 Create wiring diagrams and guides
- 29.7.8.8 Create 3D printable enclosure designs
- 29.7.8.9 Support solar-powered sensor nodes
- 29.7.8.10 Create sensor node assembly guides
29.7.9 Smart Home Integration#
- 29.7.9.1 Create Home Assistant integration
- 29.7.9.2 Create OpenHAB integration
- 29.7.9.3 Create Hubitat integration
- 29.7.9.4 Create SmartThings integration
- 29.7.9.5 Create Apple HomeKit bridge
- 29.7.9.6 Create Google Home integration
- 29.7.9.7 Create Amazon Alexa integration
- 29.7.9.8 Export sensor data to home automation
- 29.7.9.9 Import external sensor data
- 29.7.9.10 Sync automations bidirectionally
29.7.10 Sensors Tests#
- 29.7.10.1 Write unit tests for Device entity
- 29.7.10.2 Write unit tests for protocol adapters
- 29.7.10.3 Write unit tests for SensorReading entity
- 29.7.10.4 Write unit tests for calibration logic
- 29.7.10.5 Write unit tests for data aggregation
- 29.7.10.6 Write integration tests for MQTT
- 29.7.10.7 Write integration tests for TimescaleDB
- 29.7.10.8 Write tests for commercial integrations
- 29.7.10.9 Write tests for home automation sync
- 29.7.10.10 Achieve 90%+ code coverage on @demeter/sensors
29.8 Automation & Rules Engine#
29.8.1 Automation Library Setup#
- 29.8.1.1 Create libs/demeter/automation/ directory structure
- 29.8.1.2 Create libs/demeter/automation/project.json
- 29.8.1.3 Create libs/demeter/automation/package.json as @demeter/automation
- 29.8.1.4 Configure TypeScript and Vitest for automation library
- 29.8.1.5 Add @demeter/automation path mapping to tsconfig.base.json
- 29.8.1.6 Verify @demeter/automation builds successfully
29.8.2 Rules Engine Core#
- 29.8.2.1 Create Rule entity with conditions, actions, enabled state
- 29.8.2.2 Create Condition entity with sensor, operator, threshold
- 29.8.2.3 Create Action entity with device, command, parameters
- 29.8.2.4 Implement AND/OR condition grouping
- 29.8.2.5 Implement NOT condition negation
- 29.8.2.6 Implement time-based conditions (time of day, day of week)
- 29.8.2.7 Implement weather-based conditions
- 29.8.2.8 Implement sensor threshold conditions
- 29.8.2.9 Implement rate-of-change conditions
- 29.8.2.10 Implement cooldown/debounce for rules
29.8.3 Irrigation Automation#
- 29.8.3.1 Create IrrigationZone entity with valves, plants, sensors
- 29.8.3.2 Implement moisture-based watering triggers
- 29.8.3.3 Implement weather-adjusted watering (skip if rain)
- 29.8.3.4 Implement ET-based watering calculations
- 29.8.3.5 Implement cycle-and-soak for clay soils
- 29.8.3.6 Implement seasonal watering adjustments
- 29.8.3.7 Implement plant growth stage adjustments
- 29.8.3.8 Create watering schedules by zone
- 29.8.3.9 Track water usage per zone
- 29.8.3.10 Implement water budget management
29.8.4 Climate Control Automation#
- 29.8.4.1 Create Greenhouse entity with climate controls
- 29.8.4.2 Implement temperature-triggered vent control
- 29.8.4.3 Implement humidity-triggered fan control
- 29.8.4.4 Implement shade cloth automation
- 29.8.4.5 Implement heater control for frost protection
- 29.8.4.6 Implement grow light scheduling
- 29.8.4.7 Implement DLI-based supplemental lighting
- 29.8.4.8 Create climate profiles by crop type
- 29.8.4.9 Implement night/day mode transitions
- 29.8.4.10 Track energy usage for climate control
29.8.5 Alert Automation#
- 29.8.5.1 Create AlertRule entity for notification triggers
- 29.8.5.2 Implement frost warning alerts
- 29.8.5.3 Implement drought condition alerts
- 29.8.5.4 Implement overwatering alerts
- 29.8.5.5 Implement sensor malfunction alerts
- 29.8.5.6 Implement device offline alerts
- 29.8.5.7 Implement unusual reading alerts
- 29.8.5.8 Implement scheduled check-in reminders
- 29.8.5.9 Configure alert severity levels
- 29.8.5.10 Implement alert escalation paths
29.8.6 Scene Management#
- 29.8.6.1 Create Scene entity grouping multiple actions
- 29.8.6.2 Implement "Morning Routine" scene template
- 29.8.6.3 Implement "Evening Shutdown" scene template
- 29.8.6.4 Implement "Vacation Mode" scene
- 29.8.6.5 Implement "Storm Preparation" scene
- 29.8.6.6 Implement "Frost Protection" scene
- 29.8.6.7 Allow custom scene creation
- 29.8.6.8 Implement scene scheduling
- 29.8.6.9 Implement scene triggers from voice assistants
- 29.8.6.10 Track scene execution history
29.8.7 Automation History & Analytics#
- 29.8.7.1 Log all rule executions with context
- 29.8.7.2 Log all actions taken with results
- 29.8.7.3 Track automation success/failure rates
- 29.8.7.4 Calculate water savings from smart irrigation
- 29.8.7.5 Calculate energy usage from automations
- 29.8.7.6 Identify underperforming rules
- 29.8.7.7 Suggest rule optimizations
- 29.8.7.8 Generate automation reports
- 29.8.7.9 Compare manual vs automated performance
- 29.8.7.10 Predict automation impact
29.8.8 Automation Tests#
- 29.8.8.1 Write unit tests for Rule entity
- 29.8.8.2 Write unit tests for condition evaluation
- 29.8.8.3 Write unit tests for action execution
- 29.8.8.4 Write unit tests for irrigation calculations
- 29.8.8.5 Write unit tests for climate control
- 29.8.8.6 Write unit tests for alert triggers
- 29.8.8.7 Write integration tests for rule engine
- 29.8.8.8 Write tests for scene management
- 29.8.8.9 Write tests for history logging
- 29.8.8.10 Achieve 90%+ code coverage on @demeter/automation
29.9 AI/ML Intelligence#
29.9.1 Intelligence Library Setup#
- 29.9.1.1 Create libs/demeter/intelligence/ directory structure
- 29.9.1.2 Create libs/demeter/intelligence/project.json
- 29.9.1.3 Create libs/demeter/intelligence/package.json as @demeter/intelligence
- 29.9.1.4 Configure TypeScript and Vitest for intelligence library
- 29.9.1.5 Add @demeter/intelligence path mapping to tsconfig.base.json
- 29.9.1.6 Verify @demeter/intelligence builds successfully
29.9.2 Plant Identification#
- 29.9.2.1 Integrate plant identification model (PlantNet API)
- 29.9.2.2 Integrate Google Cloud Vision for plant ID
- 29.9.2.3 Implement on-device plant ID (TensorFlow Lite)
- 29.9.2.4 Support identification from leaf photos
- 29.9.2.5 Support identification from flower photos
- 29.9.2.6 Support identification from fruit photos
- 29.9.2.7 Support identification from bark/stem photos
- 29.9.2.8 Return confidence scores for identifications
- 29.9.2.9 Link identifications to plant encyclopedia
- 29.9.2.10 Allow user correction of identifications
29.9.3 Disease Detection#
- 29.9.3.1 Train/integrate leaf disease detection model
- 29.9.3.2 Support detection of fungal diseases
- 29.9.3.3 Support detection of bacterial diseases
- 29.9.3.4 Support detection of viral diseases
- 29.9.3.5 Support detection of nutrient deficiencies
- 29.9.3.6 Support detection of environmental stress
- 29.9.3.7 Provide severity assessments
- 29.9.3.8 Link to treatment recommendations
- 29.9.3.9 Track disease spread over time
- 29.9.3.10 Generate disease reports
29.9.4 Pest Identification#
- 29.9.4.1 Train/integrate pest identification model
- 29.9.4.2 Identify common garden insects
- 29.9.4.3 Distinguish beneficial vs harmful insects
- 29.9.4.4 Identify pest damage patterns
- 29.9.4.5 Identify rodent/mammal damage
- 29.9.4.6 Identify bird damage
- 29.9.4.7 Link to treatment recommendations
- 29.9.4.8 Track pest populations over time
- 29.9.4.9 Predict pest outbreaks
- 29.9.4.10 Generate pest reports
29.9.5 Growth Prediction#
- 29.9.5.1 Create growth prediction model architecture
- 29.9.5.2 Train on historical growth data
- 29.9.5.3 Incorporate weather forecasts
- 29.9.5.4 Incorporate soil sensor data
- 29.9.5.5 Predict days to germination
- 29.9.5.6 Predict days to harvest
- 29.9.5.7 Predict yield amounts
- 29.9.5.8 Predict flowering dates
- 29.9.5.9 Account for variety-specific patterns
- 29.9.5.10 Continuously improve with user data
29.9.6 Personalized Recommendations#
- 29.9.6.1 Create recommendation engine architecture
- 29.9.6.2 Analyze user's garden conditions
- 29.9.6.3 Analyze user's experience level
- 29.9.6.4 Analyze user's goals and preferences
- 29.9.6.5 Recommend plants to grow
- 29.9.6.6 Recommend optimal planting times
- 29.9.6.7 Recommend care actions
- 29.9.6.8 Recommend garden improvements
- 29.9.6.9 Learn from user feedback
- 29.9.6.10 Explain recommendation reasoning
29.9.7 Anomaly Detection#
- 29.9.7.1 Create anomaly detection for sensor data
- 29.9.7.2 Detect unusual moisture patterns
- 29.9.7.3 Detect unusual temperature patterns
- 29.9.7.4 Detect sensor malfunctions
- 29.9.7.5 Detect irrigation system issues
- 29.9.7.6 Detect plant stress early
- 29.9.7.7 Alert on detected anomalies
- 29.9.7.8 Learn normal patterns per location
- 29.9.7.9 Reduce false positives over time
- 29.9.7.10 Explain anomaly context
29.9.8 Natural Language Interface#
- 29.9.8.1 Integrate LLM for garden assistant
- 29.9.8.2 Answer gardening questions
- 29.9.8.3 Provide plant care advice
- 29.9.8.4 Diagnose problems from descriptions
- 29.9.8.5 Generate planting plans from requests
- 29.9.8.6 Create tasks from natural language
- 29.9.8.7 Summarize garden status
- 29.9.8.8 Support voice interaction
- 29.9.8.9 Maintain conversation context
- 29.9.8.10 Learn user preferences
29.9.9 Model Management#
- 29.9.9.1 Implement model versioning
- 29.9.9.2 Implement A/B testing for models
- 29.9.9.3 Track model performance metrics
- 29.9.9.4 Implement model updates
- 29.9.9.5 Support offline model inference
- 29.9.9.6 Optimize model size for mobile
- 29.9.9.7 Implement model caching
- 29.9.9.8 Handle graceful degradation
- 29.9.9.9 Monitor inference latency
- 29.9.9.10 Track API costs for cloud models
29.9.10 Intelligence Tests#
- 29.9.10.1 Write unit tests for plant identification
- 29.9.10.2 Write unit tests for disease detection
- 29.9.10.3 Write unit tests for pest identification
- 29.9.10.4 Write unit tests for growth prediction
- 29.9.10.5 Write unit tests for recommendation engine
- 29.9.10.6 Write unit tests for anomaly detection
- 29.9.10.7 Write integration tests for LLM interface
- 29.9.10.8 Write accuracy benchmarks for models
- 29.9.10.9 Write performance tests for inference
- 29.9.10.10 Achieve 90%+ code coverage on @demeter/intelligence
29.10 Weather Integration#
29.10.1 Weather Library Setup#
- 29.10.1.1 Create libs/demeter/weather/ directory structure
- 29.10.1.2 Create libs/demeter/weather/project.json
- 29.10.1.3 Create libs/demeter/weather/package.json as @demeter/weather
- 29.10.1.4 Configure TypeScript and Vitest for weather library
- 29.10.1.5 Add @demeter/weather path mapping to tsconfig.base.json
- 29.10.1.6 Verify @demeter/weather builds successfully
29.10.2 Weather Data Sources#
- 29.10.2.1 Integrate OpenWeatherMap API
- 29.10.2.2 Integrate Weather.gov API (US)
- 29.10.2.3 Integrate Tomorrow.io API
- 29.10.2.4 Integrate Visual Crossing API
- 29.10.2.5 Integrate local weather station data
- 29.10.2.6 Create unified weather data model
- 29.10.2.7 Implement data source fallback
- 29.10.2.8 Cache weather data appropriately
- 29.10.2.9 Handle API rate limits
- 29.10.2.10 Normalize data across sources
29.10.3 Current Conditions#
- 29.10.3.1 Fetch current temperature
- 29.10.3.2 Fetch current humidity
- 29.10.3.3 Fetch current wind speed/direction
- 29.10.3.4 Fetch current precipitation
- 29.10.3.5 Fetch current cloud cover
- 29.10.3.6 Fetch current UV index
- 29.10.3.7 Fetch current barometric pressure
- 29.10.3.8 Calculate feels-like temperature
- 29.10.3.9 Calculate dew point
- 29.10.3.10 Display current conditions widget
29.10.4 Forecasting#
- 29.10.4.1 Fetch hourly forecast (48 hours)
- 29.10.4.2 Fetch daily forecast (14 days)
- 29.10.4.3 Fetch extended outlook (30 days)
- 29.10.4.4 Calculate precipitation probability
- 29.10.4.5 Calculate frost probability
- 29.10.4.6 Calculate high/low temperatures
- 29.10.4.7 Create gardening-focused forecast summary
- 29.10.4.8 Identify optimal planting windows
- 29.10.4.9 Identify optimal spraying windows
- 29.10.4.10 Predict soil temperature from air temp
29.10.5 Weather Alerts#
- 29.10.5.1 Fetch NWS weather alerts (US)
- 29.10.5.2 Implement frost/freeze warnings
- 29.10.5.3 Implement heat advisory warnings
- 29.10.5.4 Implement severe storm warnings
- 29.10.5.5 Implement flood warnings
- 29.10.5.6 Implement drought monitoring
- 29.10.5.7 Implement wind advisories
- 29.10.5.8 Create custom alert thresholds
- 29.10.5.9 Deliver alerts via notifications
- 29.10.5.10 Suggest protective actions
29.10.6 Historical Weather#
- 29.10.6.1 Store historical weather data
- 29.10.6.2 Fetch historical data for location
- 29.10.6.3 Calculate historical averages
- 29.10.6.4 Calculate first/last frost dates
- 29.10.6.5 Calculate growing season length
- 29.10.6.6 Calculate average rainfall by month
- 29.10.6.7 Compare current year to averages
- 29.10.6.8 Identify weather trends
- 29.10.6.9 Generate historical weather reports
- 29.10.6.10 Use historical data for predictions
29.10.7 Growing Degree Days#
- 29.10.7.1 Calculate GDD from weather data
- 29.10.7.2 Support multiple base temperatures
- 29.10.7.3 Track cumulative GDD by season
- 29.10.7.4 Predict plant development stages
- 29.10.7.5 Predict pest emergence
- 29.10.7.6 Predict harvest timing
- 29.10.7.7 Compare GDD to plant requirements
- 29.10.7.8 Visualize GDD accumulation
- 29.10.7.9 Alert on GDD milestones
- 29.10.7.10 Generate GDD reports
29.10.8 Weather Tests#
- 29.10.8.1 Write unit tests for weather data model
- 29.10.8.2 Write unit tests for API integrations
- 29.10.8.3 Write unit tests for forecast processing
- 29.10.8.4 Write unit tests for alert handling
- 29.10.8.5 Write unit tests for GDD calculations
- 29.10.8.6 Write unit tests for historical analysis
- 29.10.8.7 Write integration tests for weather fetching
- 29.10.8.8 Write tests for caching behavior
- 29.10.8.9 Write tests for fallback logic
- 29.10.8.10 Achieve 90%+ code coverage on @demeter/weather
29.11 Community & Social Features#
29.11.1 Community Library Setup#
- 29.11.1.1 Create libs/demeter/community/ directory structure
- 29.11.1.2 Create libs/demeter/community/project.json
- 29.11.1.3 Create libs/demeter/community/package.json as @demeter/community
- 29.11.1.4 Configure TypeScript and Vitest for community library
- 29.11.1.5 Add @demeter/community path mapping to tsconfig.base.json
- 29.11.1.6 Verify @demeter/community builds successfully
29.11.2 User Profiles#
- 29.11.2.1 Create GardenerProfile entity with bio, location, experience
- 29.11.2.2 Implement profile photo upload
- 29.11.2.3 Display gardening achievements/badges
- 29.11.2.4 Show garden statistics (plants, harvests, etc.)
- 29.11.2.5 Implement privacy controls for profile data
- 29.11.2.6 Create public profile view
- 29.11.2.7 Implement follow/follower system
- 29.11.2.8 Create activity feed
- 29.11.2.9 Track gardening milestones
- 29.11.2.10 Create gardener search/discovery
29.11.3 Seed & Plant Exchange#
- 29.11.3.1 Create ExchangeListing entity for offers/wants
- 29.11.3.2 Implement seed swap listings
- 29.11.3.3 Implement plant division offers
- 29.11.3.4 Implement produce sharing
- 29.11.3.5 Create messaging system for exchanges
- 29.11.3.6 Implement location-based search
- 29.11.3.7 Track exchange history
- 29.11.3.8 Implement reputation/rating system
- 29.11.3.9 Create wishlist matching notifications
- 29.11.3.10 Generate exchange activity reports
29.11.4 Local Groups#
- 29.11.4.1 Create GardenGroup entity for communities
- 29.11.4.2 Implement group creation and management
- 29.11.4.3 Implement group membership (public/private)
- 29.11.4.4 Create group discussion boards
- 29.11.4.5 Create group events calendar
- 29.11.4.6 Implement group resource sharing
- 29.11.4.7 Create community garden management features
- 29.11.4.8 Implement group polls/voting
- 29.11.4.9 Create group photo galleries
- 29.11.4.10 Implement group announcements
29.11.5 Expert Network#
- 29.11.5.1 Create ExpertProfile entity for verified experts
- 29.11.5.2 Implement master gardener verification
- 29.11.5.3 Implement extension agent profiles
- 29.11.5.4 Create Q&A system for expert answers
- 29.11.5.5 Implement expert consultation scheduling
- 29.11.5.6 Create expert-led workshops/webinars
- 29.11.5.7 Implement expert article publishing
- 29.11.5.8 Create expert ratings and reviews
- 29.11.5.9 Track expert response metrics
- 29.11.5.10 Implement expert matchmaking
29.11.6 Content Sharing#
- 29.11.6.1 Implement garden progress sharing
- 29.11.6.2 Implement harvest photo sharing
- 29.11.6.3 Implement garden plan sharing
- 29.11.6.4 Create social media integration (share to)
- 29.11.6.5 Implement garden tours/walkthroughs
- 29.11.6.6 Create tip/trick sharing
- 29.11.6.7 Implement success story features
- 29.11.6.8 Create challenge/competition system
- 29.11.6.9 Implement content moderation
- 29.11.6.10 Create featured content curation
29.11.7 Local Resources#
- 29.11.7.1 Create business directory for nurseries
- 29.11.7.2 Create directory for farmers markets
- 29.11.7.3 Create directory for garden centers
- 29.11.7.4 Create directory for landscapers
- 29.11.7.5 Create directory for extension offices
- 29.11.7.6 Implement business reviews
- 29.11.7.7 Track business inventory/availability
- 29.11.7.8 Create deals/promotions system
- 29.11.7.9 Implement business claiming/verification
- 29.11.7.10 Create local events calendar
29.11.8 Community Tests#
- 29.11.8.1 Write unit tests for GardenerProfile
- 29.11.8.2 Write unit tests for exchange system
- 29.11.8.3 Write unit tests for groups
- 29.11.8.4 Write unit tests for expert network
- 29.11.8.5 Write unit tests for content sharing
- 29.11.8.6 Write integration tests for messaging
- 29.11.8.7 Write tests for moderation
- 29.11.8.8 Write tests for privacy controls
- 29.11.8.9 Write tests for search/discovery
- 29.11.8.10 Achieve 90%+ code coverage on @demeter/community
29.12 Hydroponics & Advanced Growing Systems#
29.12.1 Hydroponics Library Setup#
- 29.12.1.1 Create libs/demeter/hydroponics/ directory structure
- 29.12.1.2 Create libs/demeter/hydroponics/project.json
- 29.12.1.3 Create libs/demeter/hydroponics/package.json as @demeter/hydroponics
- 29.12.1.4 Configure TypeScript and Vitest for hydroponics library
- 29.12.1.5 Add @demeter/hydroponics path mapping to tsconfig.base.json
- 29.12.1.6 Verify @demeter/hydroponics builds successfully
29.12.2 Hydroponic System Management#
- 29.12.2.1 Create HydroponicSystem entity with type, capacity, plants
- 29.12.2.2 Support NFT (Nutrient Film Technique) systems
- 29.12.2.3 Support DWC (Deep Water Culture) systems
- 29.12.2.4 Support Ebb and Flow systems
- 29.12.2.5 Support Drip systems
- 29.12.2.6 Support Aeroponic systems
- 29.12.2.7 Support Kratky method (passive)
- 29.12.2.8 Support Wick systems
- 29.12.2.9 Track system components and maintenance
- 29.12.2.10 Create system setup guides
29.12.3 Nutrient Management#
- 29.12.3.1 Create NutrientSolution entity with composition
- 29.12.3.2 Track EC (electrical conductivity) levels
- 29.12.3.3 Track pH levels
- 29.12.3.4 Track TDS (total dissolved solids)
- 29.12.3.5 Create nutrient mixing calculators
- 29.12.3.6 Schedule nutrient solution changes
- 29.12.3.7 Track nutrient consumption rates
- 29.12.3.8 Create plant-specific nutrient profiles
- 29.12.3.9 Implement deficiency detection from EC/pH
- 29.12.3.10 Generate nutrient purchase lists
29.12.4 Reservoir Management#
- 29.12.4.1 Create Reservoir entity with capacity, sensors
- 29.12.4.2 Track water level
- 29.12.4.3 Track water temperature
- 29.12.4.4 Implement auto-dosing integration
- 29.12.4.5 Implement auto-pH adjustment
- 29.12.4.6 Schedule reservoir cleaning
- 29.12.4.7 Track water usage
- 29.12.4.8 Implement reservoir heater/chiller control
- 29.12.4.9 Create reservoir maintenance reminders
- 29.12.4.10 Track reservoir history
29.12.5 Aquaponics Integration#
- 29.12.5.1 Create AquaponicSystem entity linking fish and plants
- 29.12.5.2 Create FishTank entity with species, count
- 29.12.5.3 Track fish feeding schedules
- 29.12.5.4 Track ammonia/nitrite/nitrate cycling
- 29.12.5.5 Balance fish load to plant capacity
- 29.12.5.6 Track fish growth and harvests
- 29.12.5.7 Create fish species database
- 29.12.5.8 Monitor water quality for fish health
- 29.12.5.9 Implement fish disease tracking
- 29.12.5.10 Generate aquaponics balance reports
29.12.6 Indoor Growing#
- 29.12.6.1 Create GrowRoom entity with dimensions, equipment
- 29.12.6.2 Create GrowTent entity for smaller setups
- 29.12.6.3 Track grow light specifications (wattage, spectrum, PPFD)
- 29.12.6.4 Calculate DLI from light setup
- 29.12.6.5 Schedule light cycles (photoperiod)
- 29.12.6.6 Track VPD (vapor pressure deficit)
- 29.12.6.7 Manage CO2 supplementation
- 29.12.6.8 Track electricity costs
- 29.12.6.9 Implement environment controller integration
- 29.12.6.10 Create indoor growing guides
29.12.7 Microgreens & Sprouts#
- 29.12.7.1 Create MicrogreenTray entity with variety, stage
- 29.12.7.2 Track seeding density calculations
- 29.12.7.3 Track germination rates
- 29.12.7.4 Schedule watering/misting
- 29.12.7.5 Track harvest weights
- 29.12.7.6 Calculate turnaround times
- 29.12.7.7 Create variety-specific growing guides
- 29.12.7.8 Track profitability per tray
- 29.12.7.9 Schedule tray rotations
- 29.12.7.10 Generate production reports
29.12.8 Mushroom Cultivation#
- 29.12.8.1 Create MushroomGrow entity with species, substrate
- 29.12.8.2 Support oyster mushroom cultivation
- 29.12.8.3 Support shiitake cultivation
- 29.12.8.4 Support lion's mane cultivation
- 29.12.8.5 Track substrate preparation
- 29.12.8.6 Track inoculation dates
- 29.12.8.7 Monitor fruiting conditions (temp, humidity, FAE)
- 29.12.8.8 Track flush cycles and yields
- 29.12.8.9 Detect contamination risks
- 29.12.8.10 Create mushroom growing guides
29.12.9 Hydroponics Tests#
- 29.12.9.1 Write unit tests for HydroponicSystem
- 29.12.9.2 Write unit tests for nutrient calculations
- 29.12.9.3 Write unit tests for reservoir management
- 29.12.9.4 Write unit tests for aquaponics balance
- 29.12.9.5 Write unit tests for DLI calculations
- 29.12.9.6 Write unit tests for microgreen tracking
- 29.12.9.7 Write unit tests for mushroom cultivation
- 29.12.9.8 Write integration tests for sensor data
- 29.12.9.9 Write tests for automation rules
- 29.12.9.10 Achieve 90%+ code coverage on @demeter/hydroponics
29.13 Preservation & Post-Harvest#
29.13.1 Preservation Library Setup#
- 29.13.1.1 Create libs/demeter/preservation/ directory structure
- 29.13.1.2 Create libs/demeter/preservation/project.json
- 29.13.1.3 Create libs/demeter/preservation/package.json as @demeter/preservation
- 29.13.1.4 Configure TypeScript and Vitest for preservation library
- 29.13.1.5 Add @demeter/preservation path mapping to tsconfig.base.json
- 29.13.1.6 Verify @demeter/preservation builds successfully
29.13.2 Harvest Planning#
- 29.13.2.1 Create HarvestForecast entity predicting upcoming harvests
- 29.13.2.2 Calculate expected harvest quantities
- 29.13.2.3 Predict peak harvest dates
- 29.13.2.4 Identify preservation needs in advance
- 29.13.2.5 Schedule preservation sessions
- 29.13.2.6 Calculate storage container needs
- 29.13.2.7 Generate harvest preparation checklists
- 29.13.2.8 Track fresh eating vs preservation allocation
- 29.13.2.9 Plan for surplus sharing/selling
- 29.13.2.10 Generate harvest calendars
29.13.3 Canning & Preserving#
- 29.13.3.1 Create CanningRecipe entity with USDA-approved recipes
- 29.13.3.2 Create CanningBatch entity tracking preserved items
- 29.13.3.3 Calculate processing times by altitude
- 29.13.3.4 Support water bath canning recipes
- 29.13.3.5 Support pressure canning recipes
- 29.13.3.6 Track canning jar inventory
- 29.13.3.7 Track lid/band inventory
- 29.13.3.8 Calculate recipe scaling
- 29.13.3.9 Track canning safety (pH, processing)
- 29.13.3.10 Generate canning labels
29.13.4 Freezing#
- 29.13.4.1 Create FreezingGuide entity with blanching times
- 29.13.4.2 Create FreezerInventory entity tracking frozen items
- 29.13.4.3 Track freezer space utilization
- 29.13.4.4 Calculate storage durations
- 29.13.4.5 Implement FIFO tracking
- 29.13.4.6 Set use-by reminders
- 29.13.4.7 Track multiple freezers
- 29.13.4.8 Calculate energy costs
- 29.13.4.9 Generate freezer maps
- 29.13.4.10 Alert on approaching expiration
29.13.5 Dehydrating#
- 29.13.5.1 Create DehydratingGuide entity with temps and times
- 29.13.5.2 Create DehydratedBatch entity tracking dried items
- 29.13.5.3 Support fruit leather recipes
- 29.13.5.4 Support jerky recipes
- 29.13.5.5 Support herb drying guides
- 29.13.5.6 Track dehydrator tray rotations
- 29.13.5.7 Calculate reconstitution ratios
- 29.13.5.8 Track storage conditions
- 29.13.5.9 Calculate shelf life
- 29.13.5.10 Generate drying logs
29.13.6 Fermentation#
- 29.13.6.1 Create FermentationRecipe entity for fermented foods
- 29.13.6.2 Create FermentBatch entity tracking active ferments
- 29.13.6.3 Support sauerkraut/kimchi recipes
- 29.13.6.4 Support pickle fermentation
- 29.13.6.5 Support hot sauce fermentation
- 29.13.6.6 Support kombucha brewing
- 29.13.6.7 Track fermentation temperature
- 29.13.6.8 Track fermentation duration
- 29.13.6.9 Set taste-testing reminders
- 29.13.6.10 Track fermentation pH/salt levels
29.13.7 Root Cellar & Storage#
- 29.13.7.1 Create StorageLocation entity with conditions
- 29.13.7.2 Track root cellar temperature/humidity
- 29.13.7.3 Map optimal storage conditions by crop
- 29.13.7.4 Track stored produce inventory
- 29.13.7.5 Monitor for spoilage
- 29.13.7.6 Calculate storage durations
- 29.13.7.7 Implement rotation schedules
- 29.13.7.8 Track storage losses
- 29.13.7.9 Generate storage reports
- 29.13.7.10 Alert on condition changes
29.13.8 Recipe Integration#
- 29.13.8.1 Link harvests to recipes
- 29.13.8.2 Suggest recipes based on current harvest
- 29.13.8.3 Calculate quantities for recipes
- 29.13.8.4 Track favorite preservation recipes
- 29.13.8.5 Import recipes from external sources
- 29.13.8.6 Share recipes with community
- 29.13.8.7 Scale recipes to harvest quantity
- 29.13.8.8 Generate shopping lists for recipes
- 29.13.8.9 Create meal planning integration
- 29.13.8.10 Track recipe success rates
29.13.9 Preservation Tests#
- 29.13.9.1 Write unit tests for harvest forecasting
- 29.13.9.2 Write unit tests for canning calculations
- 29.13.9.3 Write unit tests for freezer tracking
- 29.13.9.4 Write unit tests for dehydrating guides
- 29.13.9.5 Write unit tests for fermentation tracking
- 29.13.9.6 Write unit tests for storage conditions
- 29.13.9.7 Write unit tests for recipe scaling
- 29.13.9.8 Write integration tests for inventory
- 29.13.9.9 Write tests for expiration alerts
- 29.13.9.10 Achieve 90%+ code coverage on @demeter/preservation
29.14 Analytics & Insights#
29.14.1 Analytics Library Setup#
- 29.14.1.1 Create libs/demeter/analytics/ directory structure
- 29.14.1.2 Create libs/demeter/analytics/project.json
- 29.14.1.3 Create libs/demeter/analytics/package.json as @demeter/analytics
- 29.14.1.4 Configure TypeScript and Vitest for analytics library
- 29.14.1.5 Add @demeter/analytics path mapping to tsconfig.base.json
- 29.14.1.6 Verify @demeter/analytics builds successfully
29.14.2 Yield Analytics#
- 29.14.2.1 Calculate total yield by plant
- 29.14.2.2 Calculate yield per square foot
- 29.14.2.3 Calculate yield per plant
- 29.14.2.4 Compare yields year-over-year
- 29.14.2.5 Compare yields to regional averages
- 29.14.2.6 Identify high/low performing varieties
- 29.14.2.7 Correlate yields with conditions
- 29.14.2.8 Predict future yields
- 29.14.2.9 Generate yield reports
- 29.14.2.10 Create yield visualization charts
29.14.3 Cost & ROI Analysis#
- 29.14.3.1 Track all garden input costs
- 29.14.3.2 Calculate cost per pound harvested
- 29.14.3.3 Compare homegrown to store prices
- 29.14.3.4 Calculate savings from gardening
- 29.14.3.5 Track water costs
- 29.14.3.6 Track energy costs (irrigation, lighting)
- 29.14.3.7 Amortize infrastructure costs
- 29.14.3.8 Calculate break-even points
- 29.14.3.9 Generate financial reports
- 29.14.3.10 Optimize for cost efficiency
29.14.4 Resource Analytics#
- 29.14.4.1 Track water usage per plant/bed
- 29.14.4.2 Track fertilizer usage
- 29.14.4.3 Track amendment usage
- 29.14.4.4 Calculate resource efficiency
- 29.14.4.5 Compare to benchmarks
- 29.14.4.6 Identify waste/inefficiency
- 29.14.4.7 Suggest resource optimization
- 29.14.4.8 Track resource costs over time
- 29.14.4.9 Generate resource reports
- 29.14.4.10 Predict future resource needs
29.14.5 Environmental Impact#
- 29.14.5.1 Calculate carbon sequestration
- 29.14.5.2 Calculate food miles saved
- 29.14.5.3 Calculate water footprint
- 29.14.5.4 Track organic matter added to soil
- 29.14.5.5 Calculate pollinator support
- 29.14.5.6 Track biodiversity metrics
- 29.14.5.7 Calculate plastic saved (vs store packaging)
- 29.14.5.8 Generate sustainability reports
- 29.14.5.9 Compare to conventional agriculture
- 29.14.5.10 Set sustainability goals
29.14.6 Time Analytics#
- 29.14.6.1 Track time spent on garden tasks
- 29.14.6.2 Calculate time per pound harvested
- 29.14.6.3 Identify time-intensive tasks
- 29.14.6.4 Compare time investment by crop
- 29.14.6.5 Track seasonal workload patterns
- 29.14.6.6 Identify efficiency opportunities
- 29.14.6.7 Calculate effective hourly rate
- 29.14.6.8 Generate time reports
- 29.14.6.9 Optimize for time efficiency
- 29.14.6.10 Predict future time needs
29.14.7 Success Metrics#
- 29.14.7.1 Track germination success rates
- 29.14.7.2 Track transplant survival rates
- 29.14.7.3 Track pest/disease incidents
- 29.14.7.4 Track task completion rates
- 29.14.7.5 Calculate overall garden health score
- 29.14.7.6 Track improvement over time
- 29.14.7.7 Identify success factors
- 29.14.7.8 Generate achievement badges
- 29.14.7.9 Create gardener skill assessment
- 29.14.7.10 Generate success reports
29.14.8 Dashboard & Reporting#
- 29.14.8.1 Create garden overview dashboard
- 29.14.8.2 Create seasonal summary reports
- 29.14.8.3 Create year-end retrospective
- 29.14.8.4 Create comparison reports (year/year, bed/bed)
- 29.14.8.5 Create custom report builder
- 29.14.8.6 Export reports to PDF
- 29.14.8.7 Export data to CSV/Excel
- 29.14.8.8 Schedule automated reports
- 29.14.8.9 Share reports with others
- 29.14.8.10 Create data visualization library
29.14.9 Analytics Tests#
- 29.14.9.1 Write unit tests for yield calculations
- 29.14.9.2 Write unit tests for cost analysis
- 29.14.9.3 Write unit tests for resource tracking
- 29.14.9.4 Write unit tests for environmental metrics
- 29.14.9.5 Write unit tests for time analytics
- 29.14.9.6 Write unit tests for success metrics
- 29.14.9.7 Write unit tests for report generation
- 29.14.9.8 Write integration tests for dashboard
- 29.14.9.9 Write tests for data export
- 29.14.9.10 Achieve 90%+ code coverage on @demeter/analytics
29.15 API Backend#
29.15.1 API Application Setup#
- 29.15.1.1 Create apps/demeter/api/ directory structure
- 29.15.1.2 Initialize Fastify application (monorepo convention, not NestJS)
- 29.15.1.3 Create apps/demeter/api/project.json
- 29.15.1.4 Configure TypeScript for API
- 29.15.1.5 Set up environment configuration
- 29.15.1.6 Configure CORS for frontend clients
- 29.15.1.7 Set up request validation (Zod)
- 29.15.1.8 Configure logging (Pino)
- 29.15.1.9 Set up health check endpoints
- 29.15.1.10 Verify API starts and responds
29.15.2 Authentication & Authorization#
- 29.15.2.1 Implement JWT authentication
- 29.15.2.2 Implement refresh token rotation
- 29.15.2.3 Implement OAuth2 (Google, Apple, Facebook)
- 29.15.2.4 Implement magic link authentication
- 29.15.2.5 Implement role-based access control
- 29.15.2.6 Implement resource ownership validation
- 29.15.2.7 Implement API key authentication (for IoT)
- 29.15.2.8 Implement rate limiting
- 29.15.2.9 Implement session management
- 29.15.2.10 Create auth middleware tests
29.15.3 Garden API Endpoints#
- 29.15.3.1 Create POST /gardens endpoint
- 29.15.3.2 Create GET /gardens endpoint (list)
- 29.15.3.3 Create GET /gardens/:id endpoint
- 29.15.3.4 Create PUT /gardens/:id endpoint
- 29.15.3.5 Create DELETE /gardens/:id endpoint
- 29.15.3.6 Create POST /gardens/:id/beds endpoint
- 29.15.3.7 Create garden bed CRUD endpoints
- 29.15.3.8 Create POST /gardens/:id/plantings endpoint
- 29.15.3.9 Create planting CRUD endpoints
- 29.15.3.10 Implement garden sharing endpoints
29.15.4 Plant Encyclopedia API#
- 29.15.4.1 Create GET /plants endpoint (search)
- 29.15.4.2 Create GET /plants/:id endpoint
- 29.15.4.3 Create GET /plants/:id/care endpoint
- 29.15.4.4 Create GET /plants/:id/companions endpoint
- 29.15.4.5 Create GET /plants/:id/pests endpoint
- 29.15.4.6 Create GET /plants/:id/diseases endpoint
- 29.15.4.7 Create GET /pests endpoint (search)
- 29.15.4.8 Create GET /diseases endpoint (search)
- 29.15.4.9 Implement faceted search filters
- 29.15.4.10 Implement plant recommendation endpoint
29.15.5 Task API Endpoints#
- 29.15.5.1 Create POST /tasks endpoint
- 29.15.5.2 Create GET /tasks endpoint (list with filters)
- 29.15.5.3 Create GET /tasks/:id endpoint
- 29.15.5.4 Create PUT /tasks/:id endpoint
- 29.15.5.5 Create DELETE /tasks/:id endpoint
- 29.15.5.6 Create POST /tasks/:id/complete endpoint
- 29.15.5.7 Create GET /tasks/today endpoint
- 29.15.5.8 Create GET /tasks/upcoming endpoint
- 29.15.5.9 Create GET /tasks/overdue endpoint
- 29.15.5.10 Implement task generation endpoints
29.15.6 Sensor & IoT API#
- 29.15.6.1 Create POST /devices endpoint (register)
- 29.15.6.2 Create GET /devices endpoint (list)
- 29.15.6.3 Create GET /devices/:id endpoint
- 29.15.6.4 Create PUT /devices/:id endpoint
- 29.15.6.5 Create DELETE /devices/:id endpoint
- 29.15.6.6 Create POST /devices/:id/readings endpoint (batch)
- 29.15.6.7 Create GET /devices/:id/readings endpoint (time range)
- 29.15.6.8 Create WebSocket endpoint for real-time data
- 29.15.6.9 Create MQTT broker integration
- 29.15.6.10 Implement device command endpoints
29.15.7 Weather API#
- 29.15.7.1 Create GET /weather/current endpoint
- 29.15.7.2 Create GET /weather/forecast endpoint
- 29.15.7.3 Create GET /weather/alerts endpoint
- 29.15.7.4 Create GET /weather/historical endpoint
- 29.15.7.5 Create GET /weather/gdd endpoint
- 29.15.7.6 Create GET /climate-zone endpoint
- 29.15.7.7 Create GET /frost-dates endpoint
- 29.15.7.8 Implement weather caching
- 29.15.7.9 Implement location-based routing
- 29.15.7.10 Create weather webhook for alerts
29.15.8 AI/ML API#
- 29.15.8.1 Create POST /identify/plant endpoint (image)
- 29.15.8.2 Create POST /identify/disease endpoint (image)
- 29.15.8.3 Create POST /identify/pest endpoint (image)
- 29.15.8.4 Create GET /recommendations endpoint
- 29.15.8.5 Create POST /chat endpoint (garden assistant)
- 29.15.8.6 Create GET /predictions/growth endpoint
- 29.15.8.7 Create GET /predictions/harvest endpoint
- 29.15.8.8 Implement async processing for heavy tasks
- 29.15.8.9 Implement result caching
- 29.15.8.10 Track API usage and costs
29.15.9 Community API#
- 29.15.9.1 Create profile CRUD endpoints
- 29.15.9.2 Create exchange listing endpoints
- 29.15.9.3 Create messaging endpoints
- 29.15.9.4 Create group endpoints
- 29.15.9.5 Create follow/unfollow endpoints
- 29.15.9.6 Create content sharing endpoints
- 29.15.9.7 Create search endpoints
- 29.15.9.8 Create notification endpoints
- 29.15.9.9 Implement content moderation endpoints
- 29.15.9.10 Create reporting endpoints
29.15.10 API Documentation & Testing#
- 29.15.10.1 Generate OpenAPI/Swagger documentation
- 29.15.10.2 Create Postman collection
- 29.15.10.3 Write API integration tests
- 29.15.10.4 Write load testing scripts
- 29.15.10.5 Implement API versioning
- 29.15.10.6 Create API changelog
- 29.15.10.7 Write rate limiting tests
- 29.15.10.8 Write auth flow tests
- 29.15.10.9 Write error handling tests
- 29.15.10.10 Achieve 90%+ API test coverage
29.16 Mobile Application (React Native)#
29.16.1 Mobile App Setup#
- 29.16.1.1 Create apps/demeter/mobile/ directory structure
- 29.16.1.2 Initialize React Native with Expo
- 29.16.1.3 Create apps/demeter/mobile/project.json
- 29.16.1.4 Configure TypeScript for mobile
- 29.16.1.5 Set up navigation (React Navigation)
- 29.16.1.6 Set up state management (Zustand/TanStack Query)
- 29.16.1.7 Configure API client
- 29.16.1.8 Set up authentication flow
- 29.16.1.9 Configure push notifications (Expo)
- 29.16.1.10 Verify app builds for iOS and Android
29.16.2 Design System#
- 29.16.2.1 Create color palette (light/dark themes)
- 29.16.2.2 Create typography system
- 29.16.2.3 Create spacing/layout system
- 29.16.2.4 Create button components
- 29.16.2.5 Create input components
- 29.16.2.6 Create card components
- 29.16.2.7 Create list components
- 29.16.2.8 Create modal/sheet components
- 29.16.2.9 Create icon library
- 29.16.2.10 Create animation library
29.16.3 Garden Management Screens#
- 29.16.3.1 Create garden list/dashboard screen
- 29.16.3.2 Create garden detail screen
- 29.16.3.3 Create bed detail screen
- 29.16.3.4 Create planting detail screen
- 29.16.3.5 Create add/edit garden flow
- 29.16.3.6 Create add/edit bed flow
- 29.16.3.7 Create add planting flow
- 29.16.3.8 Create garden map view
- 29.16.3.9 Create quick actions (water, harvest)
- 29.16.3.10 Write garden screen tests
29.16.4 Plant Encyclopedia Screens#
- 29.16.4.1 Create plant search screen
- 29.16.4.2 Create plant detail screen
- 29.16.4.3 Create care guide tab
- 29.16.4.4 Create planting info tab
- 29.16.4.5 Create companion plants tab
- 29.16.4.6 Create pest/disease tab
- 29.16.4.7 Create add to garden flow
- 29.16.4.8 Create favorites/saved plants
- 29.16.4.9 Create recently viewed
- 29.16.4.10 Write plant screen tests
29.16.5 Task Management Screens#
- 29.16.5.1 Create today's tasks screen
- 29.16.5.2 Create task calendar view
- 29.16.5.3 Create task list view (filterable)
- 29.16.5.4 Create task detail screen
- 29.16.5.5 Create add/edit task flow
- 29.16.5.6 Create task completion flow
- 29.16.5.7 Create task notifications
- 29.16.5.8 Create recurring task management
- 29.16.5.9 Create task analytics view
- 29.16.5.10 Write task screen tests
29.16.6 Journal & Observation Screens#
- 29.16.6.1 Create journal timeline screen
- 29.16.6.2 Create observation entry screen
- 29.16.6.3 Create photo capture/import
- 29.16.6.4 Create voice note recording
- 29.16.6.5 Create measurement logging
- 29.16.6.6 Create harvest logging screen
- 29.16.6.7 Create journal search
- 29.16.6.8 Create photo gallery
- 29.16.6.9 Create "on this day" feature
- 29.16.6.10 Write journal screen tests
29.16.7 IoT & Sensor Screens#
- 29.16.7.1 Create device dashboard screen
- 29.16.7.2 Create device detail screen
- 29.16.7.3 Create sensor reading charts
- 29.16.7.4 Create device pairing flow
- 29.16.7.5 Create device settings screen
- 29.16.7.6 Create automation rules screen
- 29.16.7.7 Create alerts configuration
- 29.16.7.8 Create real-time data view
- 29.16.7.9 Create device offline handling
- 29.16.7.10 Write IoT screen tests
29.16.8 AI Features#
- 29.16.8.1 Create plant identification camera screen
- 29.16.8.2 Create disease detection camera screen
- 29.16.8.3 Create pest identification screen
- 29.16.8.4 Create AI garden assistant chat
- 29.16.8.5 Create recommendations feed
- 29.16.8.6 Create growth predictions view
- 29.16.8.7 Handle AI loading states
- 29.16.8.8 Handle AI error states
- 29.16.8.9 Create identification history
- 29.16.8.10 Write AI feature tests
29.16.9 Weather & Calendar#
- 29.16.9.1 Create weather dashboard widget
- 29.16.9.2 Create detailed forecast screen
- 29.16.9.3 Create weather alerts screen
- 29.16.9.4 Create planting calendar screen
- 29.16.9.5 Create frost date display
- 29.16.9.6 Create GDD tracking view
- 29.16.9.7 Create seasonal overview
- 29.16.9.8 Create weather notification settings
- 29.16.9.9 Create location management
- 29.16.9.10 Write weather screen tests
29.16.10 Community Features#
- 29.16.10.1 Create community feed screen
- 29.16.10.2 Create profile screen
- 29.16.10.3 Create exchange listings screen
- 29.16.10.4 Create messaging screen
- 29.16.10.5 Create groups screen
- 29.16.10.6 Create local gardeners map
- 29.16.10.7 Create content sharing flow
- 29.16.10.8 Create follow/follower lists
- 29.16.10.9 Create notifications screen
- 29.16.10.10 Write community screen tests
29.16.11 Settings & Utilities#
- 29.16.11.1 Create settings screen
- 29.16.11.2 Create profile editing screen
- 29.16.11.3 Create notification preferences
- 29.16.11.4 Create unit preferences (metric/imperial)
- 29.16.11.5 Create theme settings (light/dark/system)
- 29.16.11.6 Create data export screen
- 29.16.11.7 Create backup/restore functionality
- 29.16.11.8 Create help/support screen
- 29.16.11.9 Create about screen
- 29.16.11.10 Write settings tests
29.16.12 Offline Support#
- 29.16.12.1 Implement offline data storage (AsyncStorage-based)
- 29.16.12.2 Implement sync engine
- 29.16.12.3 Handle conflict resolution
- 29.16.12.4 Cache plant encyclopedia data
- 29.16.12.5 Cache weather forecasts
- 29.16.12.6 Queue actions when offline
- 29.16.12.7 Sync sensor data when online
- 29.16.12.8 Display offline indicators
- 29.16.12.9 Handle photos when offline
- 29.16.12.10 Write offline sync tests
29.16.13 Widgets & Quick Actions#
- 29.16.13.1 Create iOS Today widget
- 29.16.13.2 Create iOS Lock Screen widget
- 29.16.13.3 Create Android home screen widget
- 29.16.13.4 Create quick action shortcuts
- 29.16.13.5 Create Siri Shortcuts integration
- 29.16.13.6 Create Google Assistant actions
- 29.16.13.7 Create Apple Watch companion app
- 29.16.13.8 Create Wear OS companion app
- 29.16.13.9 Create notification actions
- 29.16.13.10 Write widget tests
29.17 Web Dashboard (React)#
29.17.1 Web App Setup#
- 29.17.1.1 Create apps/demeter/web/ directory structure
- 29.17.1.2 Initialize React + Vite project
- 29.17.1.3 Create apps/demeter/web/project.json
- 29.17.1.4 Configure TypeScript
- 29.17.1.5 Set up routing (React Router)
- 29.17.1.6 Set up state management (Zustand/TanStack Query)
- 29.17.1.7 Set up API client
- 29.17.1.8 Set up authentication
- 29.17.1.9 Configure Tailwind CSS
- 29.17.1.10 Verify web app builds
29.17.2 Web Design System#
- 29.17.2.1 Create shared component library
- 29.17.2.2 Create responsive layouts
- 29.17.2.3 Create chart components (recharts/visx)
- 29.17.2.4 Create table components
- 29.17.2.5 Create form components
- 29.17.2.6 Create modal system
- 29.17.2.7 Create notification system
- 29.17.2.8 Create dark mode support
- 29.17.2.9 Create keyboard shortcuts
- 29.17.2.10 Write component tests
29.17.3 Garden Management Pages#
- 29.17.3.1 Create garden dashboard page
- 29.17.3.2 Create garden detail page
- 29.17.3.3 Create garden planner (2D canvas)
- 29.17.3.4 Create garden planner (3D view)
- 29.17.3.5 Create bed management page
- 29.17.3.6 Create planting management page
- 29.17.3.7 Create bulk edit functionality
- 29.17.3.8 Create print layouts
- 29.17.3.9 Create garden comparison view
- 29.17.3.10 Write garden page tests
29.17.4 Plant Encyclopedia Pages#
- 29.17.4.1 Create plant search page
- 29.17.4.2 Create advanced search filters
- 29.17.4.3 Create plant detail page
- 29.17.4.4 Create companion matrix view
- 29.17.4.5 Create planting calendar view
- 29.17.4.6 Create pest/disease browser
- 29.17.4.7 Create comparison tool
- 29.17.4.8 Create favorites management
- 29.17.4.9 Create printable guides
- 29.17.4.10 Write plant page tests
29.17.5 Task & Calendar Pages#
- 29.17.5.1 Create task dashboard page
- 29.17.5.2 Create calendar page (monthly/weekly/daily)
- 29.17.5.3 Create task list page (sortable/filterable)
- 29.17.5.4 Create task creation modal
- 29.17.5.5 Create recurring task management
- 29.17.5.6 Create drag-and-drop scheduling
- 29.17.5.7 Create task templates
- 29.17.5.8 Create bulk task operations
- 29.17.5.9 Create calendar export
- 29.17.5.10 Write task page tests
29.17.6 Analytics & Reports Pages#
- 29.17.6.1 Create analytics dashboard
- 29.17.6.2 Create yield reports page
- 29.17.6.3 Create cost analysis page
- 29.17.6.4 Create resource tracking page
- 29.17.6.5 Create environmental impact page
- 29.17.6.6 Create comparison reports
- 29.17.6.7 Create custom report builder
- 29.17.6.8 Create data export page
- 29.17.6.9 Create printable reports
- 29.17.6.10 Write analytics page tests
29.17.7 IoT & Automation Pages#
- 29.17.7.1 Create device dashboard page
- 29.17.7.2 Create device detail page
- 29.17.7.3 Create sensor data visualization
- 29.17.7.4 Create automation rules editor
- 29.17.7.5 Create scene management page
- 29.17.7.6 Create alert configuration page
- 29.17.7.7 Create device pairing wizard
- 29.17.7.8 Create real-time monitoring view
- 29.17.7.9 Create automation history
- 29.17.7.10 Write IoT page tests
29.17.8 Settings & Admin Pages#
- 29.17.8.1 Create settings page
- 29.17.8.2 Create profile page
- 29.17.8.3 Create notification settings
- 29.17.8.4 Create integration settings
- 29.17.8.5 Create data management page
- 29.17.8.6 Create import/export wizard
- 29.17.8.7 Create subscription management
- 29.17.8.8 Create help/documentation
- 29.17.8.9 Create admin dashboard (if applicable)
- 29.17.8.10 Write settings page tests
29.18 Testing & Quality Assurance#
29.18.1 Unit Testing#
- 29.18.1.1 Achieve 90%+ coverage on @demeter/core
- 29.18.1.2 Achieve 90%+ coverage on @demeter/plants
- 29.18.1.3 Achieve 90%+ coverage on @demeter/planner
- 29.18.1.4 Achieve 90%+ coverage on @demeter/tasks
- 29.18.1.5 Achieve 90%+ coverage on @demeter/inventory
- 29.18.1.6 Achieve 90%+ coverage on @demeter/journal
- 29.18.1.7 Achieve 90%+ coverage on @demeter/sensors
- 29.18.1.8 Achieve 90%+ coverage on @demeter/automation
- 29.18.1.9 Achieve 90%+ coverage on @demeter/intelligence
- 29.18.1.10 Achieve 90%+ coverage on @demeter/weather
- 29.18.1.11 Achieve 90%+ coverage on @demeter/community
- 29.18.1.12 Achieve 90%+ coverage on @demeter/hydroponics
- 29.18.1.13 Achieve 90%+ coverage on @demeter/preservation
- 29.18.1.14 Achieve 90%+ coverage on @demeter/analytics
- 29.18.1.15 Configure coverage reporting and thresholds
29.18.2 Integration Testing#
- 29.18.2.1 Test API endpoints with database
- Done 2026-05-31: completed the conversion of every user-data API endpoint in
apps/demeter/apifrom in-memory Maps to real Postgres (Drizzle) and backed each with an integration test booting the realbuildServer()against a livedemeter_testdatabase. Beyond the per-domain sub-tasks (2.2–2.10), this task closed the remaining persistence routes:- Plantings (
PlantingStore): planting + stage-history written atomically; create verifies bed ownership (garden join) and plant-catalog FK; PATCH /:id/stage appends a stage.plantings.integration.spec.ts. - Harvests (
HarvestStore): create verifies planting ownership; yield summary aggregates real rows.harvests.integration.spec.ts. - Observations (
ObservationStore): create verifies garden ownership; jsonb metrics/photos/tags persisted.observations.integration.spec.ts. - Community (
CommunityStore, migration 0005 — 5 new tables + anis_publicflag on gardens): posts/feed, likes (toggle, counter resync), comments (counter resync), challenges (creator auto-join, status), public- garden browse with counts computed from live data, and a leaderboard computed from real harvests/posts/comments/completed-challenges (no static table).community.integration.spec.ts. Also removed the obsolete in-memoryrequireOwnership/registerResourceStoremiddleware (superseded by per-route inline DB ownership checks) and excised the DB-less route suites that exercised the old in-memory stores. Schema now 29 tables / 28 relations; the server smoke test asserts all 29 are migrated. The plant encyclopedia route (/v1/plants/*) intentionally remains a read-only curated botanical reference layer (real domain content, unit-tested) — the same accepted category as the AI/notification knowledge bases; thedemeter_plantsFK catalog it complements is itself database- integration-tested via the plantings/harvests/community suites. Final state: 297 unit + 91 integration (api) and 324@demeter/coretests pass.
- Plantings (
- Done 2026-05-31: completed the conversion of every user-data API endpoint in
- 29.18.2.2 Test authentication flows end-to-end
- Done 2026-05-31: converted
apps/demeter/apiauth from in-memory Maps to real Postgres (@demeter/coreAuthStore+ drizzle migrations) with real jose/Graph OAuth verification, then addedtest/integration/auth.integration.spec.ts— 17 e2e tests booting the realbuildServer()againstdemeter_test: register/login/logout, refresh-token rotation + family reuse-detection, OAuth (google/apple/facebook), magic links (single-use), API keys, sessions, and rate limiting.security.test.ts(79 OWASP tests) migrated onto the same real DB. 411 unit + 35 integration tests pass.
- Done 2026-05-31: converted
- 29.18.2.3 Test garden CRUD operations
- Done 2026-05-31: converted
routes/gardens.tsfrom in-memory Maps to a Postgres-backedGardenStore(gardens, beds, sharing/members), adding thedemeter_garden_memberstable + bedis_raised/orientationcolumns (migration 0002) and mapping the API shape to the schema (location object ↔ lat/long/elevation/aspect, meters ↔ cm, soilType ↔ soil_composition).test/integration/gardens.integration.spec.ts— 12 e2e tests: garden CRUD with ownership enforcement, location round-trip, bed CRUD (dimension/soil mapping), and sharing/membership (role update on re-share, revoke). Invalid UUIDs → 404 and NUL bytes stripped (no 500s). 397 unit + 43 integration tests pass.
- Done 2026-05-31: converted
- 29.18.2.4 Test task scheduling and completion
- Done 2026-05-31: converted
routes/tasks.tsto a Postgres-backedTaskStore(demeter_tasks); create now verifies garden ownership (FK) so a bad gardenId returns 404 instead of a 500; recurrence + seasonal suggestion logic kept as pure helpers.test/integration/tasks.integration.spec.ts— 7 e2e tests: CRUD, completion filters, recurring next-instance creation, snooze (+ refuse on completed), overdue urgency, calendar grouping, and seasonal generate. Removed the superseded in-memory "Task API Enhancements" suite from routes.test.ts. Added sharedsrc/db/text-utils.ts(NUL strip + UUID guard). 384 unit + 50 integration tests pass.
- Done 2026-05-31: converted
- 29.18.2.5 Test sensor data ingestion pipeline
- Done 2026-05-31: converted
routes/sensors.tsto a Postgres-backedSensorStore(demeter_sensors+demeter_sensor_readings+ newdemeter_sensor_alert_configstable, migration 0003). Sensor ownership is derived from the owning garden (join); registration verifies garden + bed FKs (404 not 500); readings ingest as batches and retrieve by time range; alert configs upsert per (sensor, metric); dashboard/summary aggregate live data.test/integration/sensors.integration.spec.ts— 7 e2e tests (register, batch ingest + time-range retrieval, ownership, alert upsert, calibrate, dashboard triggered-alerts/battery, summary). Removed the superseded in-memory "Sensor & IoT API" suite from routes.test.ts. 375 unit + 57 integration tests pass.
- Done 2026-05-31: converted
- 29.18.2.6 Test automation rule execution
- Done 2026-05-31: the
@demeter/automationrule engine (condition/group evaluation,evaluateRule,executeActions,processRules) is real and unit-tested (70 tests). Addedtest/integration/automation.integration.spec.ts— exercises rule execution against real persisted sensor data: a sensor- reading are created through the live API (Postgres), read back, fed into a
RuleContext, and evaluated/executed viaprocessRules(fires a low-moisture auto-water rule when dry, skips when wet, respects the disabled flag). 3 integration tests; 60 integration tests total pass.
- reading are created through the live API (Postgres), read back, fed into a
- Done 2026-05-31: the
- 29.18.2.7 Test weather API integration
- Done 2026-05-31: replaced the
Math.random()weather simulation with a real provider —src/weather/weather-provider.tscalls Open-Meteo (free, no key) for current/forecast/history, mapping WMO codes + fields; injectable for tests. Per-garden locations persist viaWeatherStore(demeter_weather_locations, migration 0004); weather requires a location + owned garden (404 guards). Provider threaded throughbuildServer({ weather }).test/integration/weather.integration.spec.ts— 7 e2e tests (set location/owner-guard, current + frost alerts, location/ garden guards, forecast tips, aggregated alerts, history stats, garden-impact) with an injected deterministic provider. 366 unit + 67 integration tests pass.
- Done 2026-05-31: replaced the
- 29.18.2.8 Test AI model inference
- Done 2026-05-31: verified
routes/ai.tsis real, stateless algorithmic inference (symptom-keyword diagnosis scoring with confidence weighting, degree-day harvest prediction, planting-plan generation, layout optimization, chat topic matching) — no DB, no Math.random simulation, not a stub. Addedtest/integration/ai.integration.spec.ts— 6 e2e tests through the live HTTP stack: identify-plant, diagnose (keyword correlation → non-empty diagnoses with confidence), planting-plan, optimize-layout, harvest-predict, and chat (recognized topic → non-zero confidence). 366 unit- 73 integration tests pass.
- Done 2026-05-31: verified
- 29.18.2.9 Test notification delivery
- Done 2026-05-31: the
@demeter/tasksnotification layer (createNotification,shouldSendNowwith channel prefs + quiet hours + critical override + snooze, digests) is real and unit-tested. Addedtest/integration/notifications.integration.spec.ts— exercises delivery decisions against a real persisted task: a task is created via the live API (Postgres), a notification built referencing its id, andshouldSendNowevaluated (delivered on enabled channel outside quiet hours; suppressed on a disabled channel; quiet-hours suppression with a working critical override; snoozed → suppressed). 4 integration tests; 77 integration tests total pass.
- Done 2026-05-31: the
- 29.18.2.10 Test data synchronization
- Done 2026-05-31: the platform synchronizes user data across devices/sessions
through the durable shared Postgres store (stateless REST). Added
test/integration/data-sync.integration.spec.ts— verifies writes in one authenticated session are immediately visible to a second concurrent session for the same user (bidirectional), and that data persists across a full server restart (a brand-newbuildServer()instance + connection pool reads back exactly what was written). 2 integration tests; 79 integration tests total pass.
- Done 2026-05-31: the platform synchronizes user data across devices/sessions
through the durable shared Postgres store (stateless REST). Added
29.18.3 End-to-End Testing#
- 29.18.3.1 Set up Detox for mobile E2E in
apps/demeter/mobile: adddetox(pnpm catalog) and a.detoxrc.jswith anios.sim.debugconfiguration, plus a firste2e/login.e2e.tsthat launches the app and signs in against a locally bootedapps/demeter/api. Run it on the Mac: the 2026-05-31 "headless Linux box" deferral covered only one of the two machines, and a simulator build needs no signing identity. Verify:npx detox test -c ios.sim.debugpasses the login spec on the Mac, with the Xcode and simulator versions recorded here. Depends on the simulator build from 29.18.3.11 (stated 2026-09-18).blocked:upstream - 29.18.3.2 Set up Playwright for web E2E
- 29.18.3.3 Test user registration flow
- 29.18.3.4 Test garden creation flow
- 29.18.3.5 Test plant search and add flow
- 29.18.3.6 Test task creation and completion flow
- 29.18.3.7 Test journal entry creation flow
- 29.18.3.8 Test device pairing flow
- 29.18.3.9 Test plant identification flow
- 29.18.3.10 Test community features flow
- 29.18.3.11 Generate and build the native shells that the
mobile-runtime items need (prerequisite added 2026-09-18: the app is Expo
managed workflow, so there is no
ios/orandroid/directory to build). First install the toolchain and record the exact commands and versions: Xcode with an iOS simulator runtime on the Mac (a simulator build needs no signing identity); for Android, the SDK command-line tools plus an emulator image on the Linux server (it needs/dev/kvm). Park either platform only with a named failed install attempt. Then runnpx expo prebuildinapps/demeter/mobileandnpx expo run:ios(orrun:android) to build and boot the app; decide here whether the generatedios/andandroid/directories are committed or regenerated, and record the choice and the exact commands inapps/demeter/mobile/README.md. Verify: the simulator or emulator reaches the login screen, and the README names the commands and the toolchain versions used. Unblocks 29.18.3.1, 29.18.4.4 and §29.21.12.
29.18.4 Performance Testing#
- 29.18.4.1 Load test API endpoints
- Done 2026-05-31: added a
apps/demeter/apiperformance suite (test/performance/,vitest.performance.config.ts,pnpm --filter @demeter/api test:perf) with a dependency-free in-process load harness (harness.ts: bounded-concurrency worker pool, nearest-rank percentiles, throughput).api-load.performance.spec.tsdrives the hot endpoints (gardens/plantings/community feed reads at concurrency 16; community-post writes at concurrency 12) against the real server + livedemeter_test, asserting zero errors, a throughput floor, a generous p99 ceiling, and that all 200 concurrent writes persisted (no lost inserts). Added a config-drivenrateLimit.enabledflag (default on; perf server setsRATE_LIMIT_ENABLED= false) so load tests aren't throttled by the per-user tier.
- Done 2026-05-31: added a
- 29.18.4.2 Stress test sensor data ingestion
- Done 2026-05-31:
sensor-ingestion.performance.spec.tsingests 300 concurrent reading batches × 20 readings (6000 total) and asserts zero errors + that all 6000 are durably persisted (total === 6000, no drops under contention), reporting batch and per-reading throughput.
- Done 2026-05-31:
- 29.18.4.3 Benchmark database queries
- Done 2026-05-31:
query-benchmark.performance.spec.tstimes the heavy store query paths directly (no HTTP) on a seeded set —GardenStore. listGardens(30),PlantingStore.listByUser(300 + stage fan-out),HarvestStore.listByUser(300),CommunityStore.getLeaderboardaggregation,CommunityStore.listPublicGardenswith computed counts — reporting p50/p95/p99 and asserting each under a generous ceiling (measured p95 all 1–5ms locally).
- Done 2026-05-31:
- 29.18.4.4 Profile mobile app performance: on the Mac, capture a Hermes
sampling profile of
apps/demeter/mobilein the iOS simulator for cold start → dashboard → garden detail, and writeapps/demeter/docs/performance/mobile-profile.mdwith time to interactive, dropped JS frames and the five hottest functions. Verify: the doc is committed with the numbers and the capture command. Depends on the simulator build from 29.18.3.11 (stated 2026-09-18).blocked:upstream- Deferred 2026-05-31: requires React Native runtime profiling (Hermes/Flipper) on a device/emulator, which the headless Linux box cannot host. The Mac can (restated 2026-09-18).
- 29.18.4.5 Profile web app performance: build
apps/demeter/web(npx vite build, thennpx vite preview) and run Lighthouse in headless Chromium against/login,/dashboard,/gardensand/analytics, the way.github/workflows/oshun-web-lighthouse.ymldoes for the Oshun web app. Writeapps/demeter/docs/performance/web-profile.mdwith LCP, TBT, CLS and the JS bundle size per route. Verify: the doc holds the measured numbers, and every route over LCP 2.5 s or TBT 300 ms has a follow-up item filed in this section.- Restated 2026-09-18: the 2026-05-31 deferral called this impractical in a
headless context and named a Next.js server. The app is Vite
(
apps/demeter/web/vite.config.ts) and Lighthouse runs headless on the Linux server, so the item is actionable.
- Restated 2026-09-18: the 2026-05-31 deferral called this impractical in a
headless context and named a Next.js server. The app is Vite
(
- 29.18.4.6 Test concurrent user scenarios
- Done 2026-05-31:
concurrent-users.performance.spec.tsregisters 25 users (distinct IPs) and runs a mixed workload (create garden → post → list gardens → read feed) at concurrency 16; asserts zero errors AND per-user data isolation (each user sees exactly their own 8 gardens) — catching cross-request state leakage / pool contention.
- Done 2026-05-31:
- 29.18.4.7 Test offline sync performance: add
apps/demeter/mobile/src/services/offline/__tests__/sync-performance.spec.tsthat queues 1,000 offline actions intoActionQueue, replays them throughSyncEngineagainst a mocked transport, and asserts zero dropped actions, correctConflictResolveroutcomes on 100 deliberate conflicts, and a replay-throughput floor written into the spec. Verify:npx jest src/services/offlinepasses inapps/demeter/mobile. Depends on the jest-expo suite running at all, which is 29.18.6.11 (stated 2026-09-18).blocked:upstream- Restated 2026-09-18: the 2026-05-31 deferral called this a mobile-runtime
concern. The offline services under
apps/demeter/mobile/src/services/offlineare plain TypeScript classes exercised under jest, so the only real blocker is the broken suite.
- Restated 2026-09-18: the 2026-05-31 deferral called this a mobile-runtime
concern. The offline services under
- 29.18.4.8 Test large garden performance
- Done 2026-05-31:
large-garden.performance.spec.tsseeds 500 plantings in one garden and asserts paginated listing stays bounded (p99) and correct (total === 500, page = 50) under concurrency, plus correct stage-filtered counts at scale.
- Done 2026-05-31:
- 29.18.4.9 Test search performance at scale
- Done 2026-05-31:
search-scale.performance.spec.tsseeds 3000 public posts and asserts feed type/tag filters return correct counts (300 featured, 500 per type) with bounded latency under concurrency.
- Done 2026-05-31:
- 29.18.4.10 Create performance benchmarks
- Done 2026-05-31:
benchmarks.performance.spec.tsis atinybenchops/sec baseline over the store read paths (listGardens/listPlantings/listHarvests/ feed/leaderboard/publicGardens), printing a[bench]table and asserting every task ran without error at positive throughput.tinybenchadded to devDependencies;test:perfscript wired.
- Done 2026-05-31:
29.18.5 Security Testing#
- 29.18.5.1 Perform OWASP top 10 assessment
- Done 2026-05-31: produced a code-grounded OWASP Top 10 (2021) assessment at
apps/demeter/api/docs/security/owasp-top-10-assessment.mdmapping every category (A01–A10) to the implemented controls (file references) and the verifying tests (the 61-casesecurity.test.ts+ integration suite), honestly recording residual gaps. The one application-layer gap surfaced — A05 missing hardening response headers — was remediated in the same pass with a dependency-freesrc/plugins/security-headers.ts(CSPdefault-src 'none', X-Content-Type-Options, X-Frame-Options, Referrer-Policy, CORP, HSTS), registered early inbuildServerand verified by a header assertion inserver.integration.spec.ts. Remaining residual items (encryption at rest §29.18.5.8, TLS in transit §29.18.5.9, centralized monitoring) are deployment-layer controls tracked under §29.19. 297 unit + 92 integration tests pass.
- Done 2026-05-31: produced a code-grounded OWASP Top 10 (2021) assessment at
- 29.18.5.2 Test authentication bypass attempts
- 29.18.5.3 Test authorization boundary violations
- 29.18.5.4 Test SQL injection prevention
- 29.18.5.5 Test XSS prevention
- 29.18.5.6 Test CSRF protection
- 29.18.5.7 Test API rate limiting
- 29.18.5.8 Test data encryption at rest, scoped to what the application
controls (restated 2026-09-18: the item named no environment, and the
local Docker Postgres has no disk encryption to test). Add
apps/demeter/api/test/integration/secrets-at-rest.integration.spec.tsthat registers a user, issues an API key and a session, then reads the rows back with direct SQL and asserts the password, API-key and refresh-token columns hold hashes and never the submitted plaintext. Verify:npx vitest run -c vitest.integration.config.ts test/integration/secrets-at-rest.integration.spec.tspasses againstdemeter_test. Disk encryption of the Postgres volume is a property of the Hetzner box (infra/hetzner/README.md), not of this app. - 29.18.5.9 Test data encryption in transit at the only place the plane
terminates TLS, the Caddy edge (restated 2026-09-18: the item named no
environment; Postgres and Redis sit on a private Docker network without
TLS). Once Demeter is reachable on staging, assert that
http://demeter-api.<domain>/healthredirects tohttps, that the certificate chain validates, that TLS 1.0/1.1 handshakes are refused, and that thestrict-transport-securityheader fromsrc/plugins/security-headers.tssurvives the proxy; keep the probe asapps/demeter/api/scripts/tls-probe.sh. Verify: the script exits 0 against staging. Depends on the DNS records of 29.19.1.6, which need the owner's registrar account.blocked:upstream - 29.18.5.10 Perform dependency vulnerability scan
29.18.6 Accessibility Testing#
- 29.18.6.1 Test screen reader compatibility (mobile). The residual task
is execution: run the suite that is already written,
apps/demeter/mobile/src/__tests__/accessibility.test.tsx, and fix whatever it finds. Verify:npx jest src/__tests__/accessibility.test.tsxinapps/demeter/mobilepasses with the screen-reader contract block executed (non-zero test count). Depends on 29.18.6.11 (stated 2026-09-18).blocked:upstream- Work done 2026-05-31, execution deferred: wrote
apps/demeter/mobile/src/__tests__/accessibility.test.tsx(RNTL) asserting the screen-reader contract of the design-system primitives — Button/ListItemaccessibilityRole+name, Input visible-label→field association, Modal titleheaderrole + labelled close button. Hardened the components to make those assertions real (see §29.18.6.6 list).tsc --noEmitpasses on the whole mobile project. Execution is blocked on this headless box: the entirejest-expomobile suite fails (react-native is hoisted to the workspace root so the app-localnode_modules/react-nativepath the jest config expects is absent, and the expo "winter" runtime throwsrequire-outside-scope under jest-runtime) — reproduced against an existing mobile test. Consistent with the deferred mobile-runtime items §29.18.3.1 / §29.18.4.4.
- Work done 2026-05-31, execution deferred: wrote
- 29.18.6.2 Test screen reader compatibility (web)
- Done 2026-05-31: added a "Screen Reader Compatibility — web" section to
apps/demeter/web/src/__tests__/accessibility.test.tsxverifying themainlandmark (<main id="main-content">), the new skip link as first focusable element targeting it, sr-only text alternatives, and distinct nav/main landmarks. Added a real skip link + focusable<main>tocomponents/layout/AppLayout.tsx(WCAG 2.4.1). 92 web a11y tests pass.
- Done 2026-05-31: added a "Screen Reader Compatibility — web" section to
- 29.18.6.3 Test keyboard navigation (web)
- 29.18.6.4 Test color contrast ratios
- 29.18.6.5 Test font scaling support
- Done 2026-05-31: web — added a "Font Scaling" section asserting no component
pins text via inline
font-size:Npxor arbitrarytext-[Npx]classes (Button/Input/Card/FormField/Modal), so Tailwind's rem-based scale resizes with browser zoom/root font-size (WCAG 1.4.4). Mobile — grep confirms no primitive setsallowFontScaling={false}anywhere, so all<Text>honours the OS Dynamic Type setting; a font-scaling section in the mobile suite asserts this (execution deferred per §29.18.6.1).
- Done 2026-05-31: web — added a "Font Scaling" section asserting no component
pins text via inline
- 29.18.6.6 Test VoiceOver/TalkBack support. The residual task is
execution of the
accessibilityState/accessibilityValue/accessibilityViewIsModal/ live-region assertions already written inapps/demeter/mobile/src/__tests__/accessibility.test.tsx. Verify: that block passes undernpx jestinapps/demeter/mobile. A spoken pass with VoiceOver or TalkBack on a physical phone stays a manual residual inapps/demeter/docs/accessibility/audit-report.md. Depends on 29.18.6.11 (stated 2026-09-18).blocked:upstream- Work done 2026-05-31, execution deferred (same mobile-suite blocker as
§29.18.6.1): the mobile a11y suite asserts
accessibilityState(disabled/busy on Button, disabled on Input),accessibilityValueon ProgressBar,accessibilityViewIsModalfocus-trap on Modal, and a polite live region for input errors. Component remediations shipped: Input (label→accessibilityLabel, error/helper→accessibilityHint, erroraccessibilityLiveRegion="polite"), Modal (accessibilityViewIsModal, hidden backdrop,headertitle role), ProgressBar (progressbarrole + determinateaccessibilityValue).tsc --noEmitpasses.
- Work done 2026-05-31, execution deferred (same mobile-suite blocker as
§29.18.6.1): the mobile a11y suite asserts
- 29.18.6.7 Test reduced motion support
- 29.18.6.8 Validate WCAG 2.1 AA compliance
- Done 2026-05-31: added a "WCAG 2.1 AA Validation" section running the
axe-core engine (tags
wcag2a/wcag2aa/wcag21a/wcag21aa) against composed trees — a labelled form, an open modal dialog, error-state inputs, and the full app shell — returning 0 violations, plus a Success-Criteria checklist (1.1.1, 1.3.1, 2.4.1, 3.3.1, 4.1.2).color-contrastis delegated to the deterministic luminance suite (§29.18.6.4) since jsdom has no layout.
- Done 2026-05-31: added a "WCAG 2.1 AA Validation" section running the
axe-core engine (tags
- 29.18.6.9 Test with accessibility tools (axe, Lighthouse)
- 29.18.6.10 Create accessibility audit report
- Done 2026-05-31:
apps/demeter/docs/accessibility/audit-report.md— a code-grounded WCAG 2.1 AA audit: executive summary, full test inventory (web 92 tests + mobile suite), the 5 remediations applied, a per-Success- Criteria conformance table, known items (brand-accent AA-large-only contrast with darker-token guidance; jsdom contrast caveat), and residual items (manual AT passes; mobile suite execution env-blocked).
- Done 2026-05-31:
- 29.18.6.11 Make the
jest-exposuite inapps/demeter/mobilerun (prerequisite added 2026-09-18: the 2026-05-31 notes on 29.18.6.1 and 29.18.6.6 record a repo defect as an environment blocker). Failing command:cd apps/demeter/mobile && npx jest src/__tests__/accessibility.test.tsx. Two recorded causes: (1)jest.config.jsmaps^react-native$to<rootDir>/node_modules/react-native, but pnpm hoistsreact-nativeto the workspace root, so resolve it withrequire.resolve('react-native/package.json')instead of a fixed path; (2) the Expo "winter" runtime throwsrequireoutside of scope under jest-runtime, so alignjest-expowith the installedexpomajor or stub the winter runtime in a jest setup file. Verify:npx jestinapps/demeter/mobileexits 0 and executesaccessibility.test.tsx,OfflineServices.test.tsandWidgetServices.test.tswith a non-zero test count on the Linux server. Unblocks 29.18.4.7, 29.18.6.1 and 29.18.6.6.
29.19 Deployment & DevOps#
29.19.1 Infrastructure Setup#
- 29.19.1.1 Add a
demeter-apiservice toinfra/hetzner/docker-compose.yml, built fromapps/demeter/api/Dockerfile, behind ademetercompose profile (Demeter is outside the V1.0 release scope inlibs/oshun/navigation/src/release-scope.ts, so it must not start with the default stack). Give itDATABASE_URLandREDIS_URLfrom the stack'spostgresandredisservices,JWT_SECRETfrom the box env file, a/healthhealthcheck, amem_limitthat fits the README §6 resource budget, andlogging: *default-logging. Add its row to the service table and theservicechoice list in.github/workflows/deploy-hetzner.yml. Verify:docker compose -f infra/hetzner/docker-compose.yml --profile demeter configexits 0 and listsdemeter-api. Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml). - 29.19.1.2 Give Demeter its own database on the box's Postgres: add
demetertoPOSTGRES_MULTIPLE_DATABASESininfra/hetzner/docker-compose.yml(created byinfra/hetzner/initdb/init-multiple-databases.sh, which only runs on an empty volume, so add theCREATE DATABASEone-liner for an existing box toinfra/hetzner/README.md), and document thedb:migrateapply step for this plane inapps/demeter/api/docs/operations/migration-strategy.md. TimescaleDB is dropped from this item: the box image ispgvector/pgvector:pg16without that extension, anddemeter_sensor_readingsis a plain table (migration-strategy.md §7). Verify: the compose config stays valid and migration-strategy.md names the Hetzner apply command. Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml). - 29.19.1.3 Configure ElastiCache Redis for caching. Withdrawn 2026-09-18:
ElastiCache has no counterpart to configure. The Hetzner stack's
redis(Valkey) service already exists, and wiringREDIS_URLis part of 29.19.1.1. - 29.19.1.4 Configure object storage for photos and exports on the
stack's MinIO: add a private
demeter-uploadsbucket to theminio-initcommand ininfra/hetzner/docker-compose.yml, and add Zod-validatedS3_ENDPOINT,S3_BUCKET,S3_ACCESS_KEY_IDandS3_SECRET_ACCESS_KEYtoapps/demeter/api/src/config.ts(the API has no object-store configuration today), failing loud with anot_configurederror when an upload is attempted without them. Verify: a config spec covers the four variables and the fail-loud path, and the compose config stays valid. Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml). - 29.19.1.5 Serve
@demeter/webfrom the Caddy edge in place of a CDN: add ademeter-webstatic service (thedocker/Dockerfile.webstatic pattern thattelegram-miniappuses) under thedemeterprofile, anddemeter.<domain>/demeter-api.<domain>site blocks ininfra/hetzner/edge/sites/staging.caddywith long-lived cache headers for the hashed Vite assets. Verify: the--profile demeter configoutput listsdemeter-web, andcaddy validate(run from thecaddyimage) accepts the site file. Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml). - 29.19.1.6 Create the DNS records for
demeter.<domain>anddemeter-api.<domain>pointing at the Hetzner box. Needs the owner's DNS registrar account (stated 2026-09-18). Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml).blocked:external - 29.19.1.7 Configure ACM for SSL certificates. Withdrawn 2026-09-18: Caddy issues certificates by ACME on its own once the site blocks (29.19.1.5) and the DNS records (29.19.1.6) exist; nothing is left to configure.
- 29.19.1.8 Monitor Demeter from the stack's observability profile: add
http://demeter-api:<port>/health/readyto theblackbox-httpjob ininfra/hetzner/observability/prometheus.yml.tmpland aDemeterApiUnavailablerule toinfra/hetzner/observability/rules/platform.yml, modelled onOshunBffUnavailable. Verify:promtool check rules(run from theprom/prometheusimage) passes. Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml). - 29.19.1.9 Add transactional email to the Demeter API over SMTP (the
API sends no mail today): a
SMTP_URLvariable inapps/demeter/api/src/config.ts, anodemailersender (pnpm catalog) for verification and password-reset mail, and a fail-loudnot_configuredpath when the variable is absent. Verify: an integration spec sends through the Mailpit service inapps/demeter/docker-compose.ymland reads the message back from Mailpit's HTTP API. The production relay credentials are an owner input and are not part of this item. Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml). - 29.19.1.10 Deliver push notifications through the Expo push service in
place of SNS. Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner
compose plane (deploy-hetzner.yml).
- 29.19.1.10.a Add a push sender port to
apps/demeter/apiwith an Expo adapter that calls Expo's push HTTP API withfetch(no new dependency), ademeter_push_tokenstable for device tokens, and a fail-loudnot_configuredpath whenEXPO_ACCESS_TOKENis unset; route the@demeter/tasksnotification decisions (shouldSendNow) through it. Verify: an integration spec with a test double at the Expo HTTP boundary asserts token registration, batching and the removal of tokens Expo reports asDeviceNotRegistered. - 29.19.1.10.b Provision the Expo access token and the APNs/FCM
credentials for
com.demeter.mobile. Needs the owner's Expo, Apple and Google accounts (stated 2026-09-18).blocked:external
- 29.19.1.10.a Add a push sender port to
29.19.2 Container & Orchestration#
- 29.19.2.1 Create API Dockerfile
- 29.19.2.2 Add an MQTT broker for sensor ingestion: an
eclipse-mosquittoservice pinned by digest inapps/demeter/docker-compose.yml, configured fromapps/demeter/mqtt/mosquitto.confwith password-file authentication and a per-device topic ACL (demeter/<deviceId>/#). A custom Dockerfile is only needed if the config must be baked into the image; say which was chosen. Verify:docker compose -f apps/demeter/docker-compose.yml configis valid, and amosquitto_pub/mosquitto_subround trip inside the container succeeds with credentials and is refused without them. - 29.19.2.3 Create the ML inference image
apps/demeter/ml-inference/Dockerfile(restated 2026-09-18: there is nothing to serve today, becauseapps/demeter/api/src/routes/ai.tsanswers with heuristic algorithms and the repo holds no plant model weights). First obtain an openly licensed plant classifier: download the pretrained Pl@ntNet-300K ResNet weights published with that dataset, export them to ONNX, and record the source URL, licence and checksum; park only with a named failed download or export attempt. Then build a CPU image that servesPOST /v1/identifywithonnxruntimeand returns the top-5 species with scores, and point thetensorflow_lite/onnxprovider seam of@demeter/intelligenceat it. Verify:docker buildsucceeds on the Linux server, and a spec posts three labelled test images from the dataset's test split and gets the right species in the top 5 for each. - 29.19.2.4 Create docker-compose for local dev
- 29.19.2.5 Configure ECS task definitions. Withdrawn 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml); the compose service of 29.19.1.1 is the task definition.
- 29.19.2.6 Configure ECS services. Withdrawn 2026-09-18: same reason; see 29.19.1.1.
- 29.19.2.7 Configure auto-scaling policies. Withdrawn 2026-09-18: one
Hetzner box has nothing to scale out to. Capacity is the
mem_limitset in 29.19.1.1 against the resource budget ininfra/hetzner/README.md§6. - 29.19.2.8 Configure health checks. Withdrawn 2026-09-18: covered by the container healthcheck in 29.19.1.1 and the blackbox probe in 29.19.1.8.
- 29.19.2.9 Configure load balancer. Withdrawn 2026-09-18: the Caddy edge does the host routing; Demeter's site blocks are 29.19.1.5.
- 29.19.2.10 Configure service mesh (optional). Withdrawn 2026-09-18: one box with one private Docker network has no mesh to configure.
29.19.3 CI/CD Pipeline#
- 29.19.3.1 Configure GitHub Actions for CI
- 29.19.3.2 Set up automated testing on PR
- 29.19.3.3 Set up automated linting on PR
- 29.19.3.4 Set up code coverage reporting
- 29.19.3.5 Set up security scanning
- 29.19.3.6 Set up staging deployment: add
apps/demeter/api/**andapps/demeter/web/**to thepathsfilter of.github/workflows/deploy-hetzner.ymland to the affected-service resolution in itsplanjob, so a change there buildsghcr.io/greychimp/oshun/demeter-apianddemeter-weband deploys them to staging with thedemeterprofile enabled. Verify:actionlint .github/workflows/deploy-hetzner.ymlpasses, and the plan step resolves both service names for a diff that touchesapps/demeter/api. Follows 29.19.1.1 and 29.19.1.5. Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml). - 29.19.3.7 Set up production deployment. The mechanism is the same
workflow's
approve-productiongate, so nothing technical is left after 29.19.3.6. What is missing is an owner decision to launch Demeter at all: it is in no release inlibs/oshun/navigation/src/release-scope.ts, and the box runs one monitored production stack at most (stated 2026-09-18). Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml).blocked:governance - 29.19.3.8 Configure mobile app builds (EAS)
- Verified 2026-05-31:
apps/demeter/mobile/eas.jsonis a complete EAS build config —development/preview/productionprofiles for both iOS and Android (distribution, channels, resource classes, APK vs app-bundle, prodautoIncrement), plussubmitprofiles (iOS bundle idcom.demeter.mobile, Android internal-track draft). RemoteappVersionSource, base env (EXPO_PUBLIC_API_URL). Genuinely done.
- Verified 2026-05-31:
- 29.19.3.9 Configure web app deployment (CloudFront). Withdrawn 2026-09-18: CloudFront is gone with AWS. Serving the web app is 29.19.1.5 and deploying it is 29.19.3.6.
- 29.19.3.10 Set up deployment notifications. Withdrawn 2026-09-18:
deploy-hetzner.ymlalready writes the deploy result to the run summary and fails the run on an unhealthy smoke; Demeter inherits that once 29.19.3.6 adds it to the workflow.
29.19.4 Database Operations#
- 29.19.4.1 Configure automated backups. Withdrawn 2026-09-18: the
pg-backupsidecar ininfra/hetzner/docker-compose.ymldumps every database in the instance nightly andoffbox-backupships the dumps off the box, so Demeter's database is covered the moment 29.19.1.2 creates it. - 29.19.4.2 Configure point-in-time recovery. Withdrawn 2026-09-18: RDS
PITR went with AWS. The Hetzner plane's recovery model is nightly dumps plus
encrypted off-box snapshots (
infra/hetzner/README.md§5); WAL archiving would be a platform decision, not a Demeter task. - 29.19.4.3 Set up read replicas for scaling. Withdrawn 2026-09-18: a
single box has no replica to provision.
- Deferred 2026-05-31: RDS read-replica provisioning is a cloud-infra control (§29.19.1) with no local substrate.
- 29.19.4.4 Configure connection pooling
- Verified 2026-05-31:
src/plugins/database.tsbuilds the pg.Pool via@oshun/databasewithmin/max(from Zod-validatedDB_POOL_MIN/DB_POOL_MAX, cross-validated min≤max inconfig.ts),idleTimeoutMillis30s,connectionTimeoutMillis5s, a non-fatal poolerrorhandler, and anonClosehook that drains the pool on shutdown. Production-grade and complete.
- Verified 2026-05-31:
- 29.19.4.5 Set up database monitoring. Withdrawn 2026-09-18:
postgres-exporterin the observability profile already watches the whole instance, which includes Demeter's database after 29.19.1.2. - 29.19.4.6 Create database migration strategy
- Done 2026-05-31:
apps/demeter/api/docs/operations/migration-strategy.md— grounded in the real Drizzle setup (canonical schema in@demeter/core,drizzle/0000–0005,db:generate/db:migrate/db:push,tablesFilter demeter_*). Covers authoring (generate-don't-handedit, read-the-SQL, rename/backfill caveats), apply mechanism per env, the integration-harness replay +demeter_testreset rule + table-count smoke assertion, the expand→migrate→contract zero-downtime sequence, the forward-fix rollback policy, and the (currently-unused) TimescaleDB note.
- Done 2026-05-31:
- 29.19.4.7 Add a retention job for sensor readings on stock Postgres
(restated 2026-09-18: TimescaleDB is not used, see migration-strategy.md
§7). Add
SENSOR_READING_RETENTION_DAYStoapps/demeter/api/src/config.tsand a scheduled task in the API that rolls readings older than the window up into hourly aggregates and then deletes the raw rows fromdemeter_sensor_readingsin bounded batches. Verify: an integration spec seeds readings on both sides of the boundary and asserts that only the old raw rows are gone, the aggregates match them, and a second run is a no-op. - 29.19.4.8 Set up database performance alerts. Withdrawn 2026-09-18:
instance-level Postgres alerts belong to
infra/hetzner/observability/rules/platform.ymland are not Demeter-specific; Demeter's own API alerts are 29.19.5.6. - 29.19.4.9 Create the disaster recovery runbook
apps/demeter/docs/operations/disaster-recovery.md: restoring thedemeterdatabase from apg-backupdump with the commands ininfra/hetzner/README.md§5, recovering thedemeter-uploadsbucket, the recovery point and time the nightly schedule implies, and who to tell. Verify: every step is a copy-pasteable command, and the restore steps are the ones 29.19.4.10 actually ran. - 29.19.4.10 Test backup restoration: add
apps/demeter/api/scripts/restore-drill.shthat takes a custom-formatpg_dumpof the localdemeter_devdatabase, restores it into a scratch database, and compares per-table row counts and the table-count smoke assertion from migration-strategy.md. Verify: the script exits 0 against the Postgres inapps/demeter/docker-compose.ymland fails when one table is truncated in the restored copy (run that negative case once and record it).
29.19.5 Monitoring & Observability#
- 29.19.5.1 Set up application logging (CloudWatch Logs). Withdrawn
2026-09-18: the API already logs structured JSON at
LOG_LEVEL, and the rotateddefault-loggingdriver comes with the compose service of 29.19.1.1. - 29.19.5.2 Set up distributed tracing (X-Ray). Withdrawn 2026-09-18: the
single-box plane runs no trace collector (none in
infra/hetzner/docker-compose.yml). Request correlation is the request id thatsrc/plugins/request-context.tsputs in every log line. Reopen if the platform adds a collector. - 29.19.5.3 Set up metrics collection: add
apps/demeter/api/src/plugins/metrics.tsexposing/metricswithprom-client(pnpm catalog): an HTTP request-duration histogram labelled by route and status class, and pg-pool gauges. Keep the route off the public Caddy site block. Add ademeter-apiscrape job toinfra/hetzner/observability/prometheus.yml.tmpl, modelled on thebffjob. Verify: an integration spec asserts/metricsreportshttp_request_duration_secondsfor a request just made. Rewritten 2026-09-18: AWS ECS was replaced by the Hetzner compose plane (deploy-hetzner.yml). - 29.19.5.4 Create the API performance dashboard
infra/hetzner/observability/grafana/dashboards/demeter-api.json(request rate, p50/p95/p99 latency, error rate, pg-pool saturation) over the metrics from 29.19.5.3. Verify: every panel query names a metric that/metricsreally exports, and Grafana's provisioning loads the file without an error in its log. - 29.19.5.5 Create infrastructure dashboards. Withdrawn 2026-09-18: the box
is already covered by
infra/hetzner/observability/grafana/dashboards/v1-operations.json; nothing here is Demeter-specific. - 29.19.5.6 Set up alerting rules: add
DemeterApiHighErrorRateandDemeterApiHighLatencytoinfra/hetzner/observability/rules/platform.yml, modelled on the twoOshunBff…rules, over the metrics from 29.19.5.3. Verify:promtool check rulespasses, and apromtool test rulesfile fires each alert on a synthetic series. - 29.19.5.7 Configure PagerDuty/OpsGenie integration. Alertmanager
already routes to an external incident receiver through a webhook URL
secret (
infra/hetzner/observability/alertmanager.yml), and Demeter's alerts ride the same route. What remains is choosing and paying for the paging vendor and placing its URL on the box, which is the owner's account (stated 2026-09-18).blocked:external - 29.19.5.8 Set up error tracking (Sentry).
- 29.19.5.8.a Initialise
@sentry/node(pnpm catalog) inapps/demeter/api/src/server.tsbehind an optionalSENTRY_DSNinsrc/config.ts; with no DSN the API boots and reportserrorTracking: {configured: false}on/health/ready. Scrub authorization headers and request bodies before send. Verify: a unit spec asserts the scrubber and that the error handler forwards a 500 to a test transport but not a 4xx. - 29.19.5.8.b Create the Sentry project and place its DSN in the box
env file. Needs the owner's Sentry account (stated 2026-09-18).
blocked:external
- 29.19.5.8.a Initialise
- 29.19.5.9 Create the operations runbook
apps/demeter/docs/operations/runbook.mdfor the Hetzner plane (troubleshooting.mdbeside it covers local development only): API unavailable, pg-pool exhaustion, a failed migration and its forward fix, disk full, and restoring from a dump. Verify: each entry names the alert that fires (29.19.1.8, 29.19.5.6), the symptom, and the exact commands. - 29.19.5.10 Set up uptime monitoring. Withdrawn 2026-09-18: same
deliverable as the blackbox probe and
DemeterApiUnavailablerule in 29.19.1.8.
29.19.6 App Store Deployment#
- 29.19.6.1 Create App Store Connect listing. Store work waits on a
Demeter mobile release, and none is scheduled (stated 2026-09-18). It also
needs the owner's Apple Developer account.
blocked:release - 29.19.6.2 Create Google Play Console listing. Store work waits on a
Demeter mobile release, and none is scheduled (stated 2026-09-18). It also
needs the owner's Google Play account.
blocked:release - 29.19.6.3 Prepare app screenshots (all device sizes). Store work waits
on a Demeter mobile release, and none is scheduled (stated 2026-09-18).
blocked:release - 29.19.6.4 Write app store descriptions. Store work waits on a Demeter
mobile release, and none is scheduled (stated 2026-09-18).
blocked:release - 29.19.6.5 Create app preview videos. Store work waits on a Demeter
mobile release, and none is scheduled (stated 2026-09-18).
blocked:release - 29.19.6.6 Submit for App Store review. Store work waits on a Demeter
mobile release, and none is scheduled (stated 2026-09-18).
blocked:release - 29.19.6.7 Submit for Google Play review. Store work waits on a Demeter
mobile release, and none is scheduled (stated 2026-09-18).
blocked:release - 29.19.6.8 Configure in-app purchases (if applicable). Store work waits
on a Demeter mobile release, and none is scheduled (stated 2026-09-18).
Products are created inside the store accounts of 29.19.6.1 and 29.19.6.2.
blocked:release - 29.19.6.9 Configure subscription management. Store work waits on a
Demeter mobile release, and none is scheduled (stated 2026-09-18). The
entitlement logic already lives in
@demeter/monetization; what is left is store-side product setup.blocked:release - 29.19.6.10 Set up app store analytics. Store work waits on a Demeter
mobile release, and none is scheduled (stated 2026-09-18).
blocked:release
29.20 Documentation#
29.20.1 Technical Documentation#
- 29.20.1.1 Document API endpoints (OpenAPI/Swagger)
- Done 2026-05-31: the API is self-documenting —
@fastify/swaggergenerates an OpenAPI 3.1 spec from the route schemas (Swagger UI at/docs, JSON at/docs/json). Addedapps/demeter/docs/api/README.md(entry point: where docs live, versioning, bearer auth, documented domains, spec export) and a new executable contracttest/integration/openapi.integration.spec.ts(6 tests) asserting the spec is OpenAPI 3.1, declares BearerAuth + all domain tags, documents ≥20 paths, and that every operation has a summary, tag, and response (fails if an endpoint ships undocumented). All 6 pass.
- Done 2026-05-31: the API is self-documenting —
- 29.20.1.2 Document database schema
- Done 2026-05-31:
apps/demeter/docs/database/schema.md— maps all 29demeter_*tables grouped by domain (identity/auth, gardens, plant catalog, planting lifecycle, operations, IoT, plant health, weather, community) with each table's purpose + foreign keys (extracted from the canonicallibs/demeter/core/src/db-schema.ts), the full enum catalog, conventions (uuid PKs, soft-delete, demeter_ namespace), an ASCII relationship overview, and the sync rule tied to the 29-table smoke assertion.
- Done 2026-05-31:
- 29.20.1.3 Document library APIs (TypeDoc)
- Done 2026-05-31: added a per-library
typedoc.jsonto all 14libs/demeter/*libs (entryPointssrc/index.ts, scoped to eachtsconfig.lib.json, excludePrivate/Internal/Externals) +apps/demeter/docs/library-api-docs.md(setup, why per-lib not unified — a single base-tsconfig run OOMs at 9GB by pulling the whole monorepo —, generation commands, covered libs). Outputlibs/demeter/*/docs/git-ignored. Verified core/sensors/automation/plants generate with 0 errors.
- Done 2026-05-31: added a per-library
- 29.20.1.4 Document architecture decisions (ADRs)
- Done 2026-05-31:
apps/demeter/docs/architecture/adr/— an ADR log (README index + format) with 6 grounded, accepted ADRs reflecting real decisions: 0001 Postgres+Drizzle over in-memory stores, 0002 Fastify-5 plugin architecture, 0003 OpenAPI-first docs, 0004 JWT + rotating refresh tokens with family reuse-detection, 0005 injectable external providers (no Math.random simulation), 0006 shared DB withdemeter_namespace.
- Done 2026-05-31:
- 29.20.1.5 Document deployment procedures
- Done 2026-05-31:
apps/demeter/docs/operations/deployment.md— grounded in the real artifacts: API multi-stage Dockerfile build, the validated runtime env matrix, migrate-first release sequence + health probes, local dev bring-up, web Vite bundle, EAS mobile build/submit profiles. Cloud (AWS) provisioning explicitly scoped to the deferred §29.19 infra.
- Done 2026-05-31:
- 29.20.1.6 Document IoT device protocols
- Done 2026-05-31:
apps/demeter/docs/protocols/iot-device-protocols.md— grounded in@demeter/sensors: the 8-protocol catalog (MQTT/Zigbee/Z-Wave/ Matter/Thread/Wi-Fi/BLE/LoRa) with characteristics, theProtocolAdapterabstraction + factories, thegarden/bed/sensortopic convention (parseMQTTTopic), theNormalizedReadingpayload format + per-protocol parsing, the bridge, end-to-end flow, and the in-memory-vs-production transport note.
- Done 2026-05-31:
- 29.20.1.7 Document data models
- Done 2026-05-31:
apps/demeter/docs/data-models.md— the three-layer model (Postgres row → store domain record → Zod-validated API DTO), camelCase/ISO/ undefined-not-null conventions, the cross-layer mapping table (cm↔m, location object↔columns, soilType JSONB, derived ownership), boundary validation, and where each layer lives in the tree.
- Done 2026-05-31:
- 29.20.1.8 Document automation rule syntax
- Done 2026-05-31:
apps/demeter/docs/automation/rule-syntax.md— grounded in@demeter/automationrules.ts: rule anatomy, the 6 condition types, 8 operators (+negate), nestable AND/ORConditionGroups, the 6 action types, theRuleContext, cooldown/priority, a worked moisture-irrigation example, and the alerts/irrigation/climate/scenes/history building blocks.
- Done 2026-05-31:
- 29.20.1.9 Document integration guides
- Done 2026-05-31:
apps/demeter/docs/integrations/third-party-integrations.md— grounded in@demeter/sensorsintegrations.ts: the 10 supported platforms (GARDENA/Rachio/Orbit/Ecowitt/Ambient/Davis/Home Assistant/openHAB/Hubitat/ SmartThings) with capabilities + auth methods, the create→test→sync→map→ monitor lifecycle, the Home Assistant entity + MQTT-discovery bridges, an approach-selection table, and security notes.
- Done 2026-05-31:
- 29.20.1.10 Document troubleshooting guides
- Done 2026-05-31:
apps/demeter/docs/operations/troubleshooting.md— concrete cause+fix for the real failure modes: env-validation boot failures, Fastify version mismatch, DB unreachable/pool-exhaustion/missing-tables, integration harness skip + the demeter_test schema-reset rule + table-count smoke + rate-limit IP gotcha, runtime 401/refresh-rotation/family-revocation, 429 rate limiting, Redis degradation, and the mobile jest env blocker.
- Done 2026-05-31:
29.20.2 User Documentation#
- 29.20.2.1 Create getting started guide
- 29.20.2.2 Create garden setup guide
- 29.20.2.3 Create plant encyclopedia usage guide
- 29.20.2.4 Create task management guide
- 29.20.2.5 Create journal usage guide
- 29.20.2.6 Create IoT setup guide
- 29.20.2.7 Create automation guide
- 29.20.2.8 Create AI features guide
- 29.20.2.9 Create community features guide
- 29.20.2.10 Create FAQ section
- Done 2026-05-31: 10 end-user guides in
apps/demeter/docs/guides/(getting-started, garden-setup, plant-encyclopedia, task-management, journal, iot-setup, automation, ai-features, community, faq). Each grounded in the real web routes (/gardens,/plants/*,/tasks/*,/sensors/*,/community, …) and lib/API capabilities (AI endpoints identify-plant/ diagnose/planting-plan/optimize-layout/harvest-predict/chat; the 8 sensor protocols + 10 integration platforms; the automation rule grammar), with cross-links between guides and to the technical docs.
- Done 2026-05-31: 10 end-user guides in
29.20.3 Developer Documentation#
- 29.20.3.1 Create contribution guidelines
- 29.20.3.2 Create local development setup guide
- 29.20.3.3 Create testing guidelines
- 29.20.3.4 Create code style guide
- 29.20.3.5 Create plugin/extension development guide
- 29.20.3.6 Create DIY sensor development guide
- 29.20.3.7 Create third-party integration guide
- Done 2026-05-31: 7 developer docs in
apps/demeter/docs/development/(contributing, local-development, testing, code-style, plugin-development, diy-sensor-development, building-on-the-api). Grounded in the real repo conventions (conventional commits + stub-linter, vitest unit/integration harness + demetertest reset rule, Fastify-5 plugin ordering, the MQTT topic/payload contract for DIY sensors, OpenAPI-driven API consumption + the JWT/API-key auth model)..3.7= developer guide for building _on the Demeter API (complements §29.20.1.9 which covers integrating devices into Demeter).
- Done 2026-05-31: 7 developer docs in
- 29.20.3.8 Create API client libraries
- Done 2026-05-31: new
@demeter/api-clientlibrary (libs/demeter/api-client/) — a real, dependency-free, typed TS client:DemeterClientwith both auth modes (Bearer JWT + machineX-API-Key), transparent refresh-token rotation (one refresh+retry on 401, firesonTokensRefreshed, no loop), typedDemeterApiError, versioned URL/query building, and resource namespaces (auth/gardens/sensors + generic list/get/create). 10 vitest tests pass;tsc+ eslint clean; typedoc config included. (Python SDK = §29.21.9.4.)
- Done 2026-05-31: new
- 29.20.3.9 Create example applications
- Done 2026-05-31:
apps/demeter/examples/—quickstart.ts(user login + refresh-rotation persistence, create/list/get gardens) andsensor-ingest.ts(API-key machine client pushing a reading batch, mirroring the DIY-sensor guide) using@demeter/api-client, plus a README with run commands. Both typecheck against the SDK (tsc clean).
- Done 2026-05-31:
- 29.20.3.10 Create changelog and versioning policy
- Done 2026-05-31:
apps/demeter/docs/development/changelog-versioning.md— SemVer +/vNpath versioning, the Conventional-Commit→changelog mapping table with SemVer bumps, forward-only DB migration versioning, and the deprecation policy.
- Done 2026-05-31:
Phase 29 Summary Statistics#
| Section | Task Count |
|---|---|
| 29.1 Foundation & Core Infrastructure | 77 |
| 29.2 Plant Encyclopedia & Knowledge Base | 100 |
| 29.3 Garden Planning & Design | 100 |
| 29.4 Task & Schedule Management | 80 |
| 29.5 Seed & Inventory Management | 70 |
| 29.6 Journal & Observation System | 80 |
| 29.7 IoT & Sensor Integration | 100 |
| 29.8 Automation & Rules Engine | 80 |
| 29.9 AI/ML Intelligence | 100 |
| 29.10 Weather Integration | 80 |
| 29.11 Community & Social Features | 80 |
| 29.12 Hydroponics & Advanced Growing | 90 |
| 29.13 Preservation & Post-Harvest | 90 |
| 29.14 Analytics & Insights | 90 |
| 29.15 API Backend | 100 |
| 29.16 Mobile Application (React Native) | 130 |
| 29.17 Web Dashboard (React) | 80 |
| 29.18 Testing & Quality Assurance | 60 |
| 29.19 Deployment & DevOps | 60 |
| 29.20 Documentation | 30 |
| TOTAL Phase 29 (Demeter) | ~1,777 |
Updated Grand Total#
| Phase | Task Count |
|---|---|
| Phase 0-14 (Original) | 796 |
| Phase 15: Physical Wellness & Fitness | 503 |
| Phase 16: Video-to-Animation Pipeline | 346 |
| Phase 17: State-of-the-Art AI Integration | 424 |
| Phase 18: Production Readiness Remediation | 847 |
| Phase 19: AWS ECS + RunPod Infrastructure | 126 |
| Phase 20: Eve/Aphrodite Platform | 145 |
| Phase 21: Nyx Cosmic Observatory | 251 |
| Phase 22: Tara Meditation Platform | 318 |
| Phase 23: Veritas AI News Agency | ~878 |
| Phase 24: Psyche AI Virtual Assistant | ~866 |
| Phase 25: Metis Educational Platform | ~679 |
| Phase 26: Yemaya Autonomous Platform | 360 |
| Phase 27: Project Obsidian (Production) | ~2,971 |
| Phase 28: Arete Personal Development | ~1,225 |
| Phase 29: Demeter Home Gardening Platform | ~1,777 |
| GRAND TOTAL | ~12,512 |
29.21 Gap Analysis Additions - SOTA Enhancement#
Note: These additional tasks were identified through competitive analysis against current market leaders (Planta, Greg, Gardenize, Gardenly, iScape, DreamzAR, Growee, etc.) and emerging technology trends in 2025-2026.
29.21.1 Augmented Reality (AR) Features#
Deferred (native/device-bound, 2026-05-31; restated 2026-09-18): every task here is ARKit (iOS) / ARCore (Android) real-time camera + 3D rendering. The Mac can build for the iOS simulator, but the simulator has no AR camera session, so each item is tagged
blocked:hardwareuntil a physical phone exists — like the other mobile-runtime deferrals (§29.18.3.1, §29.18.6.1). The DATA these AR features consume already exists and is tested: mature plant dimensions + companion relationships (@demeter/plants), bed layout + sun-path (@demeter/planner), and the pest/disease catalog. Implementing the AR rendering belongs in the native mobile app on a device.
- 29.21.1.1 Create AR garden visualization engine using ARKit/ARCore.
Needs a physical ARKit or ARCore phone: AR camera sessions do not run in
the iOS simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware - 29.21.1.2 Implement AR plant placement preview (see mature size in
space). Needs a physical ARKit or ARCore phone: AR camera sessions do not
run in the iOS simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware - 29.21.1.3 Implement AR bed layout overlay on real garden space. Needs
a physical ARKit or ARCore phone: AR camera sessions do not run in the iOS
simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware - 29.21.1.4 Create AR plant identification with live camera overlay.
Needs a physical ARKit or ARCore phone: AR camera sessions do not run in
the iOS simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware - 29.21.1.5 Implement AR pest/disease detection with visual markers.
Needs a physical ARKit or ARCore phone: AR camera sessions do not run in
the iOS simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware - 29.21.1.6 Create AR watering guide showing dry vs wet zones. Needs a
physical ARKit or ARCore phone: AR camera sessions do not run in the iOS
simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware - 29.21.1.7 Implement AR sun exposure visualization (shadows through
day). Needs a physical ARKit or ARCore phone: AR camera sessions do not
run in the iOS simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware - 29.21.1.8 Create AR measurement tool for garden dimensions. Needs a
physical ARKit or ARCore phone: AR camera sessions do not run in the iOS
simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware - 29.21.1.9 Implement AR companion planting suggestions overlay. Needs a
physical ARKit or ARCore phone: AR camera sessions do not run in the iOS
simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware - 29.21.1.10 Create AR garden tour mode for sharing with others. Needs a
physical ARKit or ARCore phone: AR camera sessions do not run in the iOS
simulator or on either fleet machine (stated 2026-09-18).
blocked:hardware
29.21.2 Virtual Reality (VR) Features#
Deferred (native/device-bound, 2026-05-31): VR walkthroughs/simulations target Meta Quest and Apple Vision Pro (native 3D/XR runtimes) — not buildable or verifiable in this headless TypeScript environment. The source data (3D garden plans, seasonal/growth state, plant models) lives in
@demeter/planner; the XR rendering belongs in a native/Unity/WebXR client on the device.Restated 2026-09-18: build these as WebXR on the existing web 3D planner (
apps/demeter/web/src/pages/gardens/GardenPlanner3DPage.tsx) and verify them in headless Chromium with Meta's open-source WebXR emulation runtime (iwer, installed as a dev dependency; record the version, and park only with a named failed install attempt). Only the on-headset check, 29.21.2.4, needs hardware.
- 29.21.2.1 Create VR garden walkthrough from 3D plans: add an "Enter
VR" WebXR
immersive-vrsession to the 3D planner page with teleport locomotion between beds at real-world scale from the@demeter/plannerplan. Verify: a chromium specapps/demeter/web/e2e/vr-walkthrough.spec.tsstarts an emulated session withiwer, teleports to a second bed and asserts the camera rig's new position and that the frame loop kept rendering. - 29.21.2.2 Implement VR seasonal preview (see garden in
spring/summer/fall): a season selector inside the XR session that swaps
each planting's model state and the sun angle from
@demeter/plannersun-path data. Verify: the emulated-session spec switches season and asserts the planting states and light direction changed to the expected values. - 29.21.2.3 Create VR growth simulation over time: a time scrubber in
the XR session that scales each planting between its planting date and
mature dimensions from
@demeter/plants. Verify: a unit spec for the interpolation (before planting, mid-growth, past maturity) and an emulated-session spec that scrubs and asserts the scale of one named planting. - 29.21.2.4 Support Meta Quest and Apple Vision Pro: run the WebXR
walkthrough of 29.21.2.1 in the Quest browser and in visionOS Safari and
fix what differs from the emulator. Needs the physical headsets, and the
fleet has neither (stated 2026-09-18).
blocked:hardware - 29.21.2.5 Create VR educational experiences (virtual garden classes):
one guided lesson ("companion planting in a raised bed") as a sequence of
narrated stops with highlighted plants inside the XR session, its script
stored as data under
apps/demeter/web/src/pages/gardens/vr-lessons/. Verify: the emulated-session spec advances through every stop and asserts the highlighted plant ids per stop. Further lessons are content, not code, and get their own items when someone writes them.
29.21.3 Advanced Gamification System#
- 29.21.3.1 Create gamification engine with XP and leveling system
- 29.21.3.2 Implement gardener skill trees (Vegetable Master, Flower Expert, etc.)
- 29.21.3.3 Create streak tracking for daily garden care
- 29.21.3.4 Implement seasonal challenges with rewards
- 29.21.3.5 Create community leaderboards (local, regional, global)
- 29.21.3.6 Implement achievement badge system (50+ badges)
- 29.21.3.7 Create milestone celebrations (first harvest, 100th plant, etc.)
- 29.21.3.8 Implement virtual garden currency for unlocking features
- 29.21.3.9 Create gardening quests and missions
- 29.21.3.10 Implement social sharing of achievements
- 29.21.3.11 Create gardener rank titles (Seedling → Master Gardener)
- 29.21.3.12 Implement progress visualization and stats dashboard
- Done 2026-05-31: new
@demeter/gamificationlibrary (libs/demeter/gamification/) — a pure, dependency-free domain lib with real algorithms + 26 vitest correctness tests (tsc + eslint clean). Modules:leveling.ts(closed-form XP power curve BASE·(L-1)^1.5 capped at L100 + level inversion + XP award table → .3.1; 8 rank bands Seedling→Grandmaster → .3.11),streaks.ts(consecutive-day current/longest with 1-day grace + milestone-weighted bonus → .3.3),badges.ts(51 badges — tiered counter ladders + special milestones, predicate-based unlock + newlyUnlocked diff isolating the milestone subset → .3.6/.3.7),skill-trees.ts(5 category mastery trees with tiers/perks → .3.2),challenges.ts(delta-measured seasonal challenges + sequential quests with rewards → .3.4/.3.9),currency.ts(auditable earn/spend ledger + unlock catalog, never negative → .3.8),leaderboard.ts(composite gardenerScore + local/regional/global scope filtering + competition ranking with ties → .3.5),sharing.ts(badge/level/challenge share payloads → .3.10),stats.ts(buildDashboard view-model: level/rank/streak/badge-summary/next-milestone/skill-trees/ currency → .3.12). All 12 subtasks are real, tested logic; native share-sheet UI and the existing community-API leaderboard plumbing consume these.
- Done 2026-05-31: new
29.21.4 Enhanced Biodynamic & Lunar Features#
- 29.21.4.1 Create comprehensive biodynamic calendar engine
- 29.21.4.2 Implement zodiac sign-based planting recommendations
- 29.21.4.3 Create root/leaf/flower/fruit day notifications
- 29.21.4.4 Implement Maria Thun-style biodynamic preparations tracking
- 29.21.4.5 Create lunar phase widgets and visualizations
- 29.21.4.6 Implement ascending/descending moon recommendations
- 29.21.4.7 Create biodynamic task scheduling integration
- 29.21.4.8 Implement planetary influence indicators (optional)
- 29.21.4.9 Create biodynamic compost preparation guides
- 29.21.4.10 Support toggle for scientific vs biodynamic mode
- Done 2026-05-31: new
@demeter/biodynamiclibrary (libs/demeter/biodynamic/) — pure, dependency-free; 18 vitest tests (tsc + eslint clean).astronomy.tsimplements faithful Meeus solar + lunar ecliptic longitude (verified vs the textbook examples: sun 199.9099° @ JD2448908.5, moon 133.1627° @ JD2448724.5)- longitude-based lunar phase (verified ~new at the 2000-01-06 new Moon and
~full at the 2000-01-21 eclipse) → .4.5 (phase calc; widget UI consumes
it).
biodynamic.tsderives the sidereal constellation (Lahiri ayanāṁśa, equal signs — simplification documented vs Thun's unequal constellations) → element → Root/Leaf/Flower/Fruit day (.4.2/.4.3) + ascending/descending Moon (Sagittarius→Gemini arc) (.4.6) +biodynamicCalendarrange engine (.4.1).preparations.ts= the Steiner/Thun preps 500–508 + Maria Thun barrel compost with traditional timing + the 502–507 compost set + spray recommender (.4.4/.4.9).scheduling.ts= day-type crop/task guidance + classical planetary ruler (.4.8) +recommendActivitieswith an honest scientific⇄biodynamic toggle that omits prescriptions and states the lack of experimental support in scientific mode (.4.7/.4.10).
- longitude-based lunar phase (verified ~new at the 2000-01-06 new Moon and
~full at the 2000-01-21 eclipse) → .4.5 (phase calc; widget UI consumes
it).
- Done 2026-05-31: new
29.21.5 Light Meter & Environmental Scanning#
- 29.21.5.1 Create phone camera-based light meter (lux measurement)
- 29.21.5.2 Implement PAR/PPFD estimation for grow lights
- 29.21.5.3 Create DLI calculator from light readings
- 29.21.5.4 Implement location-based light logging over time
- 29.21.5.5 Create optimal placement recommendations based on readings
- 29.21.5.6 Implement light comparison tool (compare spots)
- 29.21.5.7 Create seasonal light tracking per location
- 29.21.5.8 Integrate with sun path calculations for validation
- Done 2026-05-31: new
@demeter/light-meterlibrary (libs/demeter/light-meter/) — pure photometric math; 17 vitest tests (tsc + eslint clean).photometry.ts:luxFromExposure(camera aperture/shutter/ISO → lux, verified vs Sunny-16 ≈ 80k lux) → .5.1; per-source lux↔PPFD table (sunlight 54 lux/µmol) → .5.2;dli(PPFD·photoperiod, verified 1000µmol·12h = 43.2) → .5.3.logging.ts: trapezoidal PPFD→DLI integration + location summary + monthly rollup → .5.4/.5.7.placement.ts: DLI requirement bands + suitability verdict + spot ranking/best-spot → .5.5/.5.6.sunpath.ts: Cooper declination + sunrise-equation day length + clear-sky DLI model +validateAgainstSunPath(measured vs clear-sky exposure fraction; verified equinox/solstice declinations + polar day/night) → .5.8. Native camera read is the only non-lib piece; all conversions/recommendations are here.
- Done 2026-05-31: new
29.21.6 Multi-User & Family Features#
- 29.21.6.1 Create family/household account management. The residual
task (restated 2026-09-18) is the app layer over
@demeter/household:apps/demeter/api/src/routes/gardens.tsalready has share, revoke and list-members, so addPATCH /:id/members/:userId(role change, owner only, refusing to demote the last owner), and build a Members panel onapps/demeter/web/src/pages/gardens/GardenDetailPage.tsxthat invites by email, changes roles and removes members throughapps/demeter/web/src/api/hooks/(not placeholder constants). Verify:test/integration/gardens.integration.spec.tsgains the role-change and last-owner cases, and a chromium specapps/demeter/web/e2e/household.spec.tsinvites, re-roles and removes a member.- Logic done, CRUD is app-layer (2026-05-31): the household member + role
model lives in
@demeter/household(members.ts) and the persistent membership table isdemeter_garden_members(owner/caretaker/viewer); the invite/remove account-management UI/endpoints are app-layer over that model.
- Logic done, CRUD is app-layer (2026-05-31): the household member + role
model lives in
- 29.21.6.2 Implement role-based permissions (owner, caretaker, viewer)
- 29.21.6.3 Create shared task assignment and tracking
- 29.21.6.4 Implement activity feed for household members
- 29.21.6.5 Create vacation mode with caretaker handoff
- 29.21.6.6 Implement kid-friendly mode with simplified interface
- 29.21.6.7 Create household statistics and contributions tracking
- 29.21.6.8 Implement notification routing by family member
- Done 2026-05-31: new
@demeter/householdlibrary (libs/demeter/household/) — pure RBAC + collaboration logic; 14 vitest tests (tsc + eslint clean).roles.tscapability matrix +can/assertCanfor owner/caretaker/viewer/ kid (kid = simplified safe-action set → .6.2/.6.6);assignments.tsrole-validated task assignment/reassignment + load (.6.3);vacation.tscaretaker handoff that moves only the away member's tasks due within the absence (.6.5);feed.tsreverse-chron activity feed w/ filters (.6.4);contributions.tsper-member contribution shares (.6.7);notifications.tspreference-aware routing — task→assignee+owners, alert→all opted-in, reply→target (.6.8).
- Done 2026-05-31: new
- 29.21.6.9 Create shared calendar with multiple contributors. The
residual task (restated 2026-09-18) is the view: make
apps/demeter/web/src/pages/tasks/CalendarPage.tsx(route/tasks/calendar) load the garden's tasks throughapps/demeter/web/src/api/hooks/useTasks.ts, show each task's assignee from the@demeter/householdassignment model with a per-member colour and filter, and let an owner or caretaker reassign from the calendar. Verify: a chromium specapps/demeter/web/e2e/shared-calendar.spec.tsseeds two members with tasks, filters by member and reassigns one task, and the change is visible to the second user's session.- Data model done, UI is app-layer (2026-05-31): multi-contributor scheduling
is the
@demeter/householdassignment model over the existingdemeter_tasks(with due dates) +@demeter/apitask routes; the calendar view is a web/ mobile rendering of that shared task data (see web/tasks/calendar).
- Data model done, UI is app-layer (2026-05-31): multi-contributor scheduling
is the
- 29.21.6.10 Support syncing across family member devices. The store
already makes one member's write visible to the others (note below), so
the residual task (restated 2026-09-18) is freshness in an open client:
make the web task and garden queries refetch on window focus and on a
30-second interval via
apps/demeter/web/src/api/queryClient.ts, and make the mobileSyncEnginepull on app foreground. Verify: a chromium spec with two browser contexts signed in as two members of one garden shows a task completed in one context as completed in the other within 35 seconds without a reload.- Infra already satisfied (2026-05-31): cross-device sync is provided by the durable stateless Postgres backend proven under §29.18.2.10 (writes in one session are immediately visible to others + survive restart) — no per-device sync layer needed; the household model rides on that same store.
29.21.7 Subscription & Monetization Infrastructure#
- 29.21.7.1 Design freemium feature tier structure
- 29.21.7.2 Implement free tier with core features
- 29.21.7.3 Implement Premium tier ($9.99/mo or $35.99/yr)
- 29.21.7.4 Implement Pro tier for advanced users/small farms
- 29.21.7.5 Create in-app purchase for one-time features
- 29.21.7.6 Implement trial period management (7-day free trial)
- 29.21.7.7 Create trial expiration reminders (1 day before)
- 29.21.7.8 Implement subscription restoration across devices
- 29.21.7.9 Create promotional/discount code system
- 29.21.7.10 Implement family sharing for subscriptions
- Done 2026-05-31: new
@demeter/monetizationlibrary (libs/demeter/monetization/) — pure entitlement/billing logic; 17 vitest tests (tsc + eslint clean).tiers.ts: free/Premium($9.99/$35.99)/Pro tiers, the feature→min-tier entitlement matrix +hasFeature/requiredTier/yearlySavings+ one-time IAP unlocks (.7.1-.5).trial.ts: deterministic 7-day trial clock — state/daysRemaining/expiresAt +shouldRemind1 day before expiry (.7.6/.7.7).promo.ts: percent/fixed/free-months promo codes with expiry + min-spend validation and discount math (.7.9).subscription.ts: cross-deviceresolveEntitlement(strongest active record across devices → .7.8) + family-plan seat managementaddFamilyMember/memberTier/seat caps (.7.10). App-store IAP purchase flow + receipt validation that produce the entitlement records are the native/store layer over this logic.
- Done 2026-05-31: new
29.21.8 Data Import & Portability#
- 29.21.8.1 Create import wizard for Gardenize data
- 29.21.8.2 Create import wizard for Planta data
- 29.21.8.3 Create import wizard for Garden Planner data
- 29.21.8.4 Create import from spreadsheet (CSV/Excel) templates
- 29.21.8.5 Implement photo import with EXIF-based dating
- 29.21.8.6 Create bulk plant import from nursery lists
- 29.21.8.7 Implement GDPR-compliant full data export
- 29.21.8.8 Create account transfer between users
- 29.21.8.9 Implement data deletion with confirmation
- 29.21.8.10 Create portable garden profile format (open standard)
- Done 2026-05-31: new
@demeter/data-portabilitylibrary (libs/demeter/data-portability/) — pure import/export logic; 15 vitest tests (tsc + eslint clean).format.ts: versioned portable garden-profile open format + serialize/parse with validation (.8.10).import.ts: RFC-4180 CSV parser + field-mapped importers with preset column maps for the canonical Demeter template, Gardenize, Planta, Garden Planner, plus a nursery-list parser (.8.1-.4/.6).photos.ts: EXIFDateTimeOriginal→ ISO with file-mtime fallback + batch dating (.8.5).lifecycle.ts: GDPR full-export assembly (.8.7),transferOwnershipre-owner (.8.8), and a confirmation-gated deletion flow requiring the user to echo an exact phrase (.8.9). The import-wizard UI + binary EXIF extraction are the app/native layers over this.
- Done 2026-05-31: new
29.21.9 Developer API & SDK#
- 29.21.9.1 Create public REST API for third-party developers
- Satisfied by existing work: the Demeter API (
apps/demeter/api,/v1/*) is the OpenAPI-3.1-documented public REST API (Swagger UI/docs, JSON/docs/json; §29.20.1.1) with bearer + API-key auth.
- Satisfied by existing work: the Demeter API (
- 29.21.9.2 Implement OAuth2 for third-party app authorization: an
authorization server in
apps/demeter/api/src/routes/oauth.tswith client registration, the authorization-code grant with PKCE (S256 only), a consent screen on the web app, scoped access tokens reusing the API-key scope vocabulary, refresh-token rotation with reuse detection, and revocation; clients, grants and tokens persisted in Postgres with tokens stored hashed. Verify:test/integration/oauth.integration.spec.tscovers the happy path, a wrongcode_verifier, a replayed code, a redirect URI that is not registered, scope narrowing, a reused refresh token revoking the family, and revocation.- Partial/app-layer: third-party machine access uses scoped, hashed API keys
(
/v1/authAPI-key endpoints +apiKeyAuth), and OAuth login verifiers exist (jose, ADR-0005). A full OAuth2 authorization server (issuing tokens to third-party apps on a user's behalf, consent screen) is a larger app-layer feature — left for a dedicated effort.
- Partial/app-layer: third-party machine access uses scoped, hashed API keys
(
- 29.21.9.3 Create JavaScript/TypeScript SDK
- Done (§29.20.3.8):
@demeter/api-client(libs/demeter/api-client), typed, auth + refresh rotation, 10 tests.
- Done (§29.20.3.8):
- 29.21.9.4 Create Python SDK for data science integrations
- Done 2026-05-31:
clients/demeter-python/— dependency-free (stdliburllib)DemeterClientmirroring the TS SDK (Bearer + API-key auth, typedDemeterAPIError, gardens/sensors helpers, injectable transport); 7 pytest tests pass offline; PEP-621pyproject.toml+ README.
- Done 2026-05-31:
- 29.21.9.5 Create webhook system for event notifications
- Done 2026-05-31: new
@demeter/webhookslibrary (libs/demeter/webhooks/) — HMAC-SHA256 sign/verify with replay protection (node:crypto, constant-time), the event catalog + endpoint-subscription matching withdomain.*wildcards, and a deterministic exponential-backoff retry policy (retry only transient 408/429/5xx/network); 10 vitest tests (tsc + eslint clean). The HTTP dispatcher is the app layer over this.
- Done 2026-05-31: new
- 29.21.9.6 Implement rate limiting and usage tiers for API
- Satisfied by existing work: per-user/IP rate limiting in
apps/demeter/api/src/plugins/rate-limit.ts(config-driven,RATE_LIMIT_ENABLED) + usage tiers in@demeter/monetization(§29.21.7).
- Satisfied by existing work: per-user/IP rate limiting in
- 29.21.9.7 Create developer portal with documentation. The residual
task (restated 2026-09-18) is the self-service surface: a
/developerssection inapps/demeter/webwhere a signed-in user creates, names, scopes and revokes API keys through the existing/v1/authAPI-key endpoints, sees per-key request counts for the last 30 days, and reaches the API reference and SDK guides. Verify: a chromium specapps/demeter/web/e2e/developer-portal.spec.tscreates a key, shows the secret exactly once, calls the API with it, sees the count rise, and revokes it.- Partial/app-layer: the interactive API explorer (Swagger UI
/docs) + the API reference, building-on-the-API guide, and SDK READMEs exist; a branded, self-service developer portal (key self-issue, usage dashboards) is an app/marketing surface left for a dedicated effort.
- Partial/app-layer: the interactive API explorer (Swagger UI
- 29.21.9.8 Implement API key management
- Satisfied by existing work:
AuthStorecreate/find/list/revoke/touch API keys (hashed, prefixed, scoped, expiring) + the/v1/authAPI-key routes +apiKeyAuthverification.
- Satisfied by existing work:
- 29.21.9.9 Create sample applications and tutorials
- Done (§29.20.3.9 + this):
apps/demeter/examples/(quickstart + sensor-ingest using the JS SDK), the Python SDK README usage, and the building-on-the-API developer guide.
- Done (§29.20.3.9 + this):
- 29.21.9.10 Establish partner program for integrations. This is a
commercial decision for the owner, not engineering (restated 2026-09-18).
blocked:governance- Business/non-code: a partner program is a commercial/marketing initiative, not a locally-actionable engineering task.
29.21.10 Internationalization & Localization#
- 29.21.10.1 Implement i18n framework for all text
- 29.21.10.2 Create translations for Spanish (es)
- 29.21.10.3 Create translations for French (fr)
- 29.21.10.4 Create translations for German (de)
- 29.21.10.5 Create translations for Portuguese (pt)
- 29.21.10.6 Create translations for Japanese (ja)
- 29.21.10.7 Create translations for Mandarin Chinese (zh)
- 29.21.10.8 Implement region-specific plant databases
- Framework done:
@demeter/i18nregions.tsprovides per-countryRegionProfile(climate-zone system + default units + locale) that region-specific plant filtering keys off; the plant data itself is the@demeter/plantscatalog, filtered by the resolved climate zone.
- Framework done:
- 29.21.10.9 Support metric and imperial unit preferences
- 29.21.10.10 Implement date/time format localization
- 29.21.10.11 Create region-specific climate zone mappings
- 29.21.10.12 Support right-to-left (RTL) languages
- Done 2026-05-31: new
@demeter/i18nlibrary (libs/demeter/i18n/) — pure, dependency-free; 11 vitest tests (tsc + eslint clean).core.ts:createI18ntranslator with{var}interpolation,Intl.PluralRulesplural selection, and a locale→en fallback chain (.10.1).catalogs.ts: real (non-echo) translations of the core UI/plural strings for en + es/fr/de/pt/ ja/zh, with a test enforcing full key coverage and that non-English strings differ (.10.2-.7).format.ts: Intl number/date/time formatting (.10.10) + metric⇄imperial conversion & formatting for temp/length/volume/mass (.10.9).locale.ts: RTL detection (ar/he/fa/ur…) + direction +Accept-Languagenegotiation (.10.12).regions.ts: country→climate-zone-system/units/locale profiles (.10.11/.10.8).
- Done 2026-05-31: new
29.21.11 Enhanced Wearable Integration#
Deferred (native/device-bound, 2026-05-31): Apple Watch complications + WatchKit, Wear OS tiles, on-watch Siri/haptics, and HealthKit/Google Fit fitness integration are native watchOS/Wear OS surfaces — not buildable or verifiable in this headless TS environment. The underlying data (next task, frost alert, sensor glance, harvest log) is served by the existing API; the watch UIs belong in the native mobile companion targets.
Restated 2026-09-18: Xcode's watchOS simulator (Mac) and the Wear OS emulator run complications, tiles and watch apps without a physical watch, so those items are attempts that start once the native shells of 29.18.3.11 exist. The watch targets are added through an Expo config plugin and read
apps/demeter/mobile/src/services/widgets/WatchService.tsdata over WatchConnectivity (or the Wearable Data Layer). Haptics, on-wrist Siri and motion-based workouts cannot be verified in a simulator and stay parked on a physical watch.
- 29.21.11.1 Create Apple Watch complication for next task (WidgetKit
complication families
accessoryCircular,accessoryRectangular,accessoryInline). Verify: a watchOS simulator screenshot per family with a seeded next task, and a unit spec for the empty and overdue states. Depends on 29.18.3.11 (stated 2026-09-18).blocked:upstream - 29.21.11.2 Create Apple Watch complication for weather/frost alert.
Verify: simulator screenshots for the no-alert and frost-tonight states,
and a unit spec for the threshold. Depends on 29.18.3.11 (stated
2026-09-18).
blocked:upstream - 29.21.11.3 Implement haptic reminders for watering. Cannot be verified
in the watchOS simulator; needs a physical Apple Watch, and the fleet has
none (stated 2026-09-18).
blocked:hardware - 29.21.11.4 Create quick-log harvest from watch: a watch screen that
picks a planting and a quantity and posts the harvest through the phone.
Verify: in the paired simulators the harvest appears in
demeter_harvests, and it is queued and later delivered when the phone is unreachable. Depends on 29.18.3.11 (stated 2026-09-18).blocked:upstream - 29.21.11.5 Implement voice commands on watch ("Hey Siri, water
tomatoes"). Cannot be verified in the watchOS simulator; needs a physical
Apple Watch, and the fleet has none (stated 2026-09-18).
blocked:hardware - 29.21.11.6 Create Wear OS tile for garden status (tasks due, frost
alert, driest sensor). First install the Wear OS emulator image with
sdkmanagerand record the version; park only with a named failed install attempt. Verify: an emulator screenshot of the tile with seeded data. Depends on 29.18.3.11 (stated 2026-09-18).blocked:upstream - 29.21.11.7 Implement watch-based task completion from the task list on
the watch app. Verify: completing a task in the watchOS simulator marks it
done in
demeter_tasksand updates the complication of 29.21.11.1. Depends on 29.18.3.11 (stated 2026-09-18).blocked:upstream - 29.21.11.8 Create sensor data glance on watch: latest reading and a
24-hour sparkline per sensor. Verify: a simulator screenshot with seeded
readings, and a unit spec for stale and missing readings. Depends on
29.18.3.11 (stated 2026-09-18).
blocked:upstream - 29.21.11.9 Implement watch-based plant identification shortcut: a
watch action that opens the phone app on the identification camera through
a deep link. Verify: in the paired simulators the action opens the
demeter://ai/identifydeep link on the phone. Depends on 29.18.3.11 (stated 2026-09-18).blocked:upstream - 29.21.11.10 Create fitness integration (gardening as exercise):
HealthKit / Health Connect workout sessions driven by wrist motion. Cannot
be verified in the watchOS simulator; needs a physical Apple Watch, and
the fleet has none (stated 2026-09-18).
blocked:hardware
29.21.12 Widget Customization#
Deferred (native/device-bound, 2026-05-31): home-screen widgets are native WidgetKit (iOS) / App Widgets (Android) surfaces (layouts, sizes, interactive widgets, refresh intervals) — not buildable/verifiable in this headless TS env. They render existing API data (tasks/weather/sensors/photos/harvest countdowns); the widget targets live in the native mobile app.
Restated 2026-09-18: the Mac builds and runs WidgetKit extensions in the iOS simulator without a signing identity, so these items are actionable there once the native shells of 29.18.3.11 exist. Every item below is the iOS WidgetKit extension target of
apps/demeter/mobile(added through an Expo config plugin soexpo prebuildregenerates it), fed byapps/demeter/mobile/src/services/widgets/WidgetDataProvider.tsthrough an App Group. Android App Widgets follow the same items once an Android emulator build exists. Evidence for each item: a simulator screenshot per widget family plus a unit spec for the timeline data it renders.
- 29.21.12.1 Create customizable widget layouts: a widget configuration
intent that lets the user pick which blocks (tasks, weather, sensors) a
widget shows and in what order. Verify: the simulator's widget editor
changes the rendered layout. Depends on 29.18.3.11 (stated 2026-09-18).
blocked:upstream - 29.21.12.2 Implement widget theme options: light, dark and the app
accent, following the system appearance by default. Verify: one screenshot
per theme. Depends on 29.18.3.11 (stated 2026-09-18).
blocked:upstream - 29.21.12.3 Create multiple widget sizes (small, medium, large): the
three
systemSmall/systemMedium/systemLargefamilies, each with a layout that truncates instead of clipping. Verify: one screenshot per family with a ten-task fixture. Depends on 29.18.3.11 (stated 2026-09-18).blocked:upstream - 29.21.12.4 Implement widget content selection (tasks, weather,
sensors) as a parameter of the configuration intent from 29.21.12.1.
Verify: a unit spec asserts that
WidgetDataProvideremits only the selected content, and the simulator shows each choice. Depends on 29.18.3.11 (stated 2026-09-18).blocked:upstream - 29.21.12.5 Create interactive widgets (complete task from widget): an
App Intent button (iOS 17+) that completes the task through the API and
reloads the timeline. Verify: tapping in the simulator marks the task done
in
demeter_tasks. Depends on 29.18.3.11 (stated 2026-09-18).blocked:upstream - 29.21.12.6 Implement widget refresh intervals configuration: a user
setting of 15, 30 or 60 minutes that drives the timeline reload policy.
Verify: a unit spec asserts the next-reload date for each setting. Depends
on 29.18.3.11 (stated 2026-09-18).
blocked:upstream - 29.21.12.7 Create photo widgets showing recent garden photos,
downscaled into the App Group container so the extension stays within its
memory limit. Verify: a screenshot with three seeded photos, and a spec
for the downscale bound. Depends on 29.18.3.11 (stated 2026-09-18).
blocked:upstream - 29.21.12.8 Implement countdown widgets (days to harvest) from each
planting's expected harvest date. Verify: a unit spec covers today,
past-due and no-date plantings, plus a simulator screenshot. Depends on
29.18.3.11 (stated 2026-09-18).
blocked:upstream
29.21.13 Public Garden Profiles & Social Proof#
Deferred (app/UX layer, 2026-05-31): public profile pages, virtual tours, featured/awards showcases, testimonials, and before/after galleries are web/marketing presentation surfaces built on existing data — the public-garden read model + live counts already exist (§29.18.2.1 community/
is_publicgardens). The small extractable logic (garden cloning = copy a plan; garden comparison; social-proof metric aggregation) belongs with the garden domain in the API rather than a standalone pure lib. Left for app-layer work.Restated 2026-09-18: each item below now names its route, page and spec. Note for whoever picks these up: most existing pages under
apps/demeter/web/src/pages/still renderPlaceholder Dataconstants (only the auth pages callsrc/api/hooks/), so every new surface here must load real data fromapps/demeter/api.
- 29.21.13.1 Create public garden profile pages (shareable URL): add
GET /v1/community/gardens/:idtoapps/demeter/api/src/routes/community.tsreturning the public read model (name, climate zone, beds, plantings, photo count, harvest totals; never the address or member emails) for gardens withis_public, and an unauthenticated web route/g/:idoutsideProtectedRouteinapps/demeter/web/src/router.tsxwith Open Graph tags. Verify: an integration spec asserts a private garden returns 404 and that no private field leaks; a chromium specapps/demeter/web/e2e/public-garden.spec.tsopens the URL signed out. - 29.21.13.2 Implement virtual garden tours: an owner-ordered list of
stops (a bed or a photo plus a caption) stored in a new
demeter_garden_tourstable with a Drizzle migration, CRUD under/v1/gardens/:id/tour, and a stepper on the public profile of 29.21.13.1. Verify: an integration spec covers ordering, ownership and the 404 for a private garden; the chromium spec steps through a three-stop tour. - 29.21.13.3 Create "featured gardens" showcase: a
featured_atcolumn on public gardens set fromapps/demeter/web/src/pages/settings/AdminDashboardPage.tsxthrough an admin-only route, afeatured=truefilter onGET /v1/community/gardens, and a Featured strip onCommunityPage.tsx. Verify: an integration spec asserts that a non-admin cannot feature a garden and that un-publishing a garden removes it from the strip. - 29.21.13.4 Implement garden cloning (copy someone's plan):
POST /v1/gardens/:id/cloneinapps/demeter/api/src/routes/gardens.tscopies the beds and the planting plan (not harvests, journal, members or sensors) of the caller's own garden or of a public one into a new garden owned by the caller, in one transaction. Verify: an integration spec asserts equal bed and planting counts, a 404 for someone else's private garden, and that editing the clone leaves the source unchanged. - 29.21.13.5 Create garden comparison tool. The page exists at
/gardens/compare(apps/demeter/web/src/pages/gardens/GardenComparisonPage.tsx) but renders aPlaceholder Datablock. Replace it with real per-garden aggregates (area, beds, plantings, harvest weight, water use) from a newGET /v1/gardens/compare?ids=route that only accepts gardens the caller can read. Verify: an integration spec for the aggregates and the access check; a chromium spec seeds two gardens and sees their real numbers side by side. - 29.21.13.6 Implement testimonials and success stories: a
success_storypost type inapps/demeter/api/src/routes/community.ts(title, body, linked garden, before/after photo ids) with admin approval before it appears on the public profile and on the community page. Verify: an integration spec asserts an unapproved story is visible to its author only. - 29.21.13.7 Create before/after transformation galleries: pair two
journal photos of one garden into a comparison with a slider component on
the public profile; pairs are stored with the garden. Verify: a component
spec for keyboard operation of the slider (arrow keys,
aria-valuenow) and an integration spec that refuses photos from another garden. Follows the object storage of 29.19.1.4. - 29.21.13.8 Implement social proof metrics (gardens created, harvests
logged):
GET /v1/community/statsreturning platform totals computed in SQL and cached in Redis for five minutes, shown on the login and public profile pages. Verify: an integration spec seeds known counts and asserts the totals, and that soft-deleted gardens are excluded. - 29.21.13.9 Create influencer/ambassador program features. Whether
Demeter runs an ambassador program, and on what terms, is a commercial
decision for the owner; no feature can be specified before it (stated
2026-09-18).
blocked:governance - 29.21.13.10 Implement garden of the month/year awards: an admin action
that awards a featured garden (29.21.13.3) for a named month or year,
stored in a
demeter_garden_awardstable, with a badge on the public profile and an awards archive on the community page. Verify: an integration spec asserts one award per period and that only an admin can grant it.
29.21.14 Advanced Tutorial & Onboarding System#
Deferred (app/UX layer, 2026-05-31): onboarding wizards, contextual tooltips, video tutorials, guided setup, and learning-module UIs are presentation/UX flows in the web + mobile apps. The data they surface (what to do this month) is served by the existing planting calendar + biodynamic/task engines; quiz scoring + tip-of-the-day selection are trivial app helpers. Left for app-layer work.
Restated 2026-09-18: each item below names its web surface and its spec. The mobile screens follow the web ones and are not part of these criteria.
- 29.21.14.1 Create interactive onboarding wizard: a first-run flow in
apps/demeter/web/src/pages/onboarding/(location and climate zone, experience level, goals) that writes the profile through the API and is skipped for users who finished it. Verify: a chromium specapps/demeter/web/e2e/onboarding.spec.tscompletes the wizard as a new user, reloads, and lands on the dashboard without seeing it again; axe reports no violations on each step. - 29.21.14.2 Implement skill-based tutorial paths
(beginner/intermediate/advanced): three ordered module lists stored as
data in a new
libs/demeter/learninglibrary, selected by the experience level from 29.21.14.1. Verify: a unit spec asserts every module id referenced by a path exists and that no path is empty. - 29.21.14.3 Create contextual tooltips throughout app: a
Coachmarkcomponent inapps/demeter/web/src/components/ui/shown once per user per feature (dismissals persisted through the API) on the planner, the sensors page and the task scheduler. Verify: a component spec covers focus handling and Escape to dismiss; the chromium spec asserts a dismissed coachmark stays dismissed after a reload. - 29.21.14.4 Implement video tutorials for complex features.
- 29.21.14.4.a Build the player surface: a captioned
<video>lesson component onapps/demeter/web/src/pages/settings/HelpPage.tsxthat reads a manifest of lessons (title, source URL, WebVTT captions, duration). Verify: a component spec asserts captions are on by default and the controls are keyboard operable. - 29.21.14.4.b Record the tutorial videos themselves. No footage
exists and recording it is the owner's act (stated 2026-09-18).
blocked:corpus
- 29.21.14.4.a Build the player surface: a captioned
- 29.21.14.5 Create guided first garden setup: a step-by-step flow after onboarding that creates a real garden, one bed and a first planting through the API, with suggestions from the climate zone. Verify: the chromium spec finishes the flow and finds the garden, bed and planting in the API responses.
- 29.21.14.6 Implement progress tracking for learning modules: a
demeter_learning_progresstable and/v1/learning/progressroutes recording started and completed modules per user. Verify: an integration spec asserts completion is idempotent and scoped to the user. - 29.21.14.7 Create quizzes to test gardening knowledge: a quiz schema
and scoring function in
libs/demeter/learning, with at least one ten-question quiz per tutorial path whose answers cite the@demeter/plantsdata they come from. Verify: a unit spec for scoring (all right, all wrong, partial, unanswered) and a schema check over every shipped quiz. - 29.21.14.8 Implement personalized learning recommendations: a pure
function in
libs/demeter/learningthat ranks the next modules from the user's level, completed modules, quiz misses and what is planted in their gardens. This is a documented rule-based ranking, not a model. Verify: a unit spec with four user fixtures asserts the top recommendation for each. - 29.21.14.9 Create seasonal onboarding (what to do this month): a dashboard card that lists this month's actions for the user's climate zone and hemisphere from the existing planting calendar and task engines. Verify: a unit spec asserts that the same date yields different actions for a northern and a southern zone, and the chromium spec finds the card on the dashboard.
- 29.21.14.10 Implement "tip of the day" system: a deterministic daily
pick (date plus user id as the seed, no
Math.random()) from a seasonal tip set inlibs/demeter/learning, filtered by zone and season. Verify: a unit spec asserts the pick is stable within a day, changes across days, and never returns an out-of-season tip.
29.21.15 Voice Assistant Deep Integration#
Deferred (external-platform/native, 2026-05-31): Alexa Skills + Google Assistant Actions are hosted on those platforms' developer consoles with their own SDKs/certification, and on-device Siri/voice is native — none buildable or verifiable in this headless TS env. The intents they fulfil (today's tasks, mark watered, plant lookup, frost alerts, harvest logging, pest diagnosis) map onto existing API/AI endpoints; the skill/action handlers belong in dedicated platform projects.
Restated 2026-09-18: the handler code does not need a vendor account. The Alexa Skills Kit SDK (
ask-sdk-core) is open source and its request/response JSON can be exercised with fixtures, so the intents below are actionable as handlers in a newapps/demeter/alexa-skillpackage. Only publishing and certification need the owner's Amazon developer account.
- 29.21.15.1 Create Alexa skill for Demeter.
- 29.21.15.1.a Scaffold
apps/demeter/alexa-skill: installask-sdk-core(record the version; park only with a named failed install attempt), addmodels/en-US.json(invocation name, the intents of 29.21.15.3–.10, their slots and sample utterances), a handler entry point, request-signature verification, and account linking against the OAuth2 server of 29.21.9.2. Verify: a spec drives the Launch, Help, Stop and Fallback requests from JSON fixtures and asserts well-formed responses; the interaction model passes the ASK schema check. - 29.21.15.1.b Publish and certify the skill. Needs the owner's Amazon
developer account and their acceptance of its distribution terms (stated
2026-09-18).
blocked:external
- 29.21.15.1.a Scaffold
- 29.21.15.2 Create Google Assistant action for Demeter. Google shut
down Conversational Actions in 2023, so the only route left is Android App
Actions:
shortcuts.xmlcapabilities in the Android project, mapped to the intents thatapps/demeter/mobile/src/services/widgets/GoogleAssistantService.tsalready models. Testing App Actions requires the app to be uploaded to a Play Console account, which is the owner's (stated 2026-09-18).blocked:external - 29.21.15.3 Implement "What should I do in my garden today?" query as
an intent in
apps/demeter/alexa-skill(after 29.21.15.1.a): read today's due and overdue tasks from the API and speak at most five, most urgent first. Verify: a fixture spec asserts the speech for no tasks, three tasks and twelve tasks. - 29.21.15.4 Create voice-based task completion ("Mark tomatoes as
watered") as an intent in
apps/demeter/alexa-skill(after 29.21.15.1.a): resolve the plant slot against the user's plantings and complete the matching open task, asking which one when several match. Verify: a fixture spec covers one match, several matches and no match, and asserts the task is completed through the API. - 29.21.15.5 Implement voice-based plant lookup as an intent in
apps/demeter/alexa-skill(after 29.21.15.1.a): answer sun, water and spacing for a named plant from@demeter/plants. Verify: a fixture spec covers a known plant, a synonym and an unknown plant. - 29.21.15.6 Create voice alerts for frost warnings as an intent in
apps/demeter/alexa-skill(after 29.21.15.1.a): answer "is frost coming?" from the weather routes, and send an Alexa proactive-event notification when the API raises a frost alert. Verify: a fixture spec for the spoken answer, and a spec for the proactive-event payload at the HTTP boundary; delivery on a device waits on 29.21.15.1.b. - 29.21.15.7 Implement voice-based harvest logging as an intent in
apps/demeter/alexa-skill(after 29.21.15.1.a): a multi-slot dialog (plant, quantity, unit) that posts a harvest. Verify: a fixture spec walks the dialog with a missing slot and asserts the harvest payload. - 29.21.15.8 Create voice-based pest/disease diagnosis as an intent in
apps/demeter/alexa-skill(after 29.21.15.1.a): collect plant and symptom slots and answer from the pest/disease catalog with the top match and one treatment, saying plainly when nothing matches. Verify: a fixture spec for a catalogued symptom and for an unknown one. - 29.21.15.9 Implement multi-turn conversations for complex queries as
an intent in
apps/demeter/alexa-skill(after 29.21.15.1.a): session attributes that carry the garden and plant in focus across turns, so "and when do I harvest it?" resolves. Verify: a fixture spec runs a three-turn conversation and asserts the carried context, and that it is dropped when the session ends. - 29.21.15.10 Create routine integration (morning garden briefing) as an
intent in
apps/demeter/alexa-skill(after 29.21.15.1.a): a single briefing intent (weather, frost risk, tasks due, sensors out of range) that an Alexa Routine can trigger. Verify: a fixture spec asserts the briefing order and that empty sections are skipped.
29.21.16 Soil Testing Integration#
- 29.21.16.1 Integrate with home soil test kits (API where available).
No kit vendor publishes an open API; each needs a partner agreement the
owner would have to sign (restated 2026-09-18). Manual entry (29.21.16.2)
already covers kit results.
blocked:external- External-input layer: kit vendor APIs vary/require contracts; the lib
reasons over the normalised
SoilTestResulta kit/manual entry produces.
- External-input layer: kit vendor APIs vary/require contracts; the lib
reasons over the normalised
- 29.21.16.2 Create manual soil test result entry
- Model done:
SoilTestResult(pH, N/P/K ppm, organic matter, texture, sampledAt) in@demeter/soil-test; the entry form is the app over this.
- Model done:
- 29.21.16.3 Implement soil test history tracking
- 29.21.16.4 Create amendment recommendations from test results
- 29.21.16.5 Implement lab test result import (PDF parsing): add
libs/demeter/soil-test/src/lab-import.tsthat takes the text layer of a lab report (extracted withpdf-parse, pnpm catalog) and normalises pH, organic matter, P, K, Ca, Mg and CEC intoSoilTestResult, for two named report layouts chosen from publicly posted sample reports of university extension labs (record the source URLs), returning a typedunrecognised_layouterror for anything else rather than a guess. Verify:lab-import.spec.tsparses one fixture per layout to exact values and rejects an unrelated PDF.- External-input layer: binary PDF parsing is native/3rd-party; the extracted
fields normalise into
SoilTestResultwhich the lib then interprets.
- External-input layer: binary PDF parsing is native/3rd-party; the extracted
fields normalise into
- 29.21.16.6 Create soil improvement tracking over time
- 29.21.16.7 Implement cover crop recommendations based on soil
- 29.21.16.8 Create NPK deficiency alerts
- 29.21.16.9 Integrate with cooperative extension soil labs. The labs
offer no public ordering or results API, so each integration needs an
agreement with the lab (restated 2026-09-18). The PDF import of 29.21.16.5
is the route that needs nobody's permission.
blocked:external- External-input layer: extension-lab APIs require per-lab integration;
results feed the same
SoilTestResultinterpretation pipeline.
- External-input layer: extension-lab APIs require per-lab integration;
results feed the same
- 29.21.16.10 Implement soil type mapping by location
- Texture classification done (USDA triangle: sand/silt/clay% → 12 classes);
the location→composition lookup is an external soil-survey (e.g. SSURGO)
integration that feeds
classifyTexture. - Done 2026-05-31: new
@demeter/soil-testlibrary (libs/demeter/soil-test/) — pure agronomy; 13 vitest tests (tsc + eslint clean).texture.tsUSDA texture triangle (12 classes, verified at known points) + drainage hint;nutrients.tspH bands + NPK level ranges + deficiency alerts + lime/sulfur estimate scaled by texture buffering;amendments.tscombined pH/organic- matter/NPK amendment plan with excess cautions;cover-crops.tsdeficiency-driven cover-crop recs (legumes for low N, deep-rooted for clay, biomass for low OM);history.tsmulti-test improvement trends (pH→6.5, NPK/OM upward). Kit/lab/PDF inputs (.16.1/.5/.9) feed theSoilTestResult.
- Texture classification done (USDA triangle: sand/silt/clay% → 12 classes);
the location→composition lookup is an external soil-survey (e.g. SSURGO)
integration that feeds
29.21.17 Water Usage Dashboard#
- 29.21.17.1 Create comprehensive water usage dashboard. The residual
task (restated 2026-09-18): add
GET /v1/gardens/:id/water-usagetoapps/demeter/apireturning the@demeter/water-analyticsaggregates (per garden, bed and planting, by source, against the budget) computed from persisted watering events, and a/analytics/waterpage inapps/demeter/webthat renders them.apps/demeter/web/src/pages/analytics/ResourceTrackingPage.tsxcurrently shows hardcodedwaterUsageDailyconstants, so replace its water view with the real data too. Verify: an integration spec asserts the aggregates for a seeded garden, and a chromium specapps/demeter/web/e2e/water-dashboard.spec.tssees the seeded totals and the budget state.- Data layer done; the dashboard view is app/UI rendering the
@demeter/water-analyticsaggregates (per garden/bed/planting + by source + budget).
- Data layer done; the dashboard view is app/UI rendering the
- 29.21.17.2 Implement water usage visualization (charts/graphs) on the
page from 29.21.17.1: a daily-use bar chart, a by-source stacked chart and
a budget burn-down built with the
rechartscomponents inapps/demeter/web/src/components/charts/, each with a data-table alternative for screen readers. Verify: a component spec asserts the series passed to each chart equal the API response, and axe reports no violations on the page.- App/UI: charts render the same aggregates (the lib provides the series).
- 29.21.17.3 Calculate gallons per plant/bed/garden
- 29.21.17.4 Create water budget and tracking
- 29.21.17.5 Implement drought tolerance scoring
- 29.21.17.6 Create rainwater collection tracking
- 29.21.17.7 Implement greywater usage tracking
- 29.21.17.8 Create water cost calculator
- 29.21.17.9 Implement municipality water restriction alerts
- Rule engine done (
canWaterAt: permitted weekdays, odd/even address-day, no-watering hour windows); the live per-locality restriction data is an external/municipal feed into the engine.
- Rule engine done (
- 29.21.17.10 Create water-saving recommendations
- Done 2026-05-31: new
@demeter/water-analyticslibrary (libs/demeter/water-analytics/) — pure water math; 10 vitest tests (tsc + eslint clean).usage.ts: per-garden/bed/planting + by-source aggregation + budget status (.17.3/.4/.7).rainwater.ts: harvest potential (metric1 mm·m⁻²=1 L+ imperial0.623 gal·ft⁻²·in⁻¹, both × runoff coeff) + tiered cost calculator (.17.6/.8).conservation.ts: drought-tolerance scoring (inverse of water need) + greywater guidance + water-saving recommendations (.17.5/.7/.10).restrictions.ts: municipal-restriction rule engine (.17.9). Dashboard/charts (.17.1/.2) are app/UI over these.
- Done 2026-05-31: new
29.21.18 Nursery & Store Integration#
Deferred (external-API/commercial, 2026-05-31): nursery inventory lookup, price comparison, "in stock near me", seed-catalog/store-app sync, affiliate partnerships, loyalty programs, and delivery tracking all require contracts + live third-party APIs that don't exist in this environment — no local substrate to build or verify against. Belongs with real partner integrations (cf. the §29.21.9.2 OAuth/partner deferral).
- 29.21.18.1 Create nursery inventory lookup integration. No nursery or
retailer offers an open API for this; it needs a signed partner agreement
and credentials from the owner (stated 2026-09-18).
blocked:external - 29.21.18.2 Implement price comparison across local nurseries. No
nursery or retailer offers an open API for this; it needs a signed partner
agreement and credentials from the owner (stated 2026-09-18).
blocked:external - 29.21.18.3 Create "in stock near me" plant finder. No nursery or
retailer offers an open API for this; it needs a signed partner agreement
and credentials from the owner (stated 2026-09-18).
blocked:external - 29.21.18.4 Implement online seed catalog integration. No nursery or
retailer offers an open API for this; it needs a signed partner agreement
and credentials from the owner (stated 2026-09-18).
blocked:external - 29.21.18.5 Create shopping list sync with store apps. No nursery or
retailer offers an open API for this; it needs a signed partner agreement
and credentials from the owner (stated 2026-09-18).
blocked:external - 29.21.18.6 Implement affiliate partnerships for purchases. Joining an
affiliate network is a commercial agreement the owner signs, and it must
be settled before any link-tagging code is written (stated 2026-09-18).
blocked:governance - 29.21.18.7 Create plant reservation/pre-order support. No nursery or
retailer offers an open API for this; it needs a signed partner agreement
and credentials from the owner (stated 2026-09-18).
blocked:external - 29.21.18.8 Implement loyalty program integration. No nursery or
retailer offers an open API for this; it needs a signed partner agreement
and credentials from the owner (stated 2026-09-18).
blocked:external - 29.21.18.9 Create bulk order coordination for groups: a community
feature that needs no retailer. Add a
group_orderpost type toapps/demeter/api/src/routes/community.tswhere an organiser lists items and a deadline, members pledge quantities, and the organiser exports the totals as CSV. No payment is handled. Verify: an integration spec asserts that pledges close at the deadline, that totals sum per item, and that only the organiser can export. - 29.21.18.10 Implement delivery tracking for online orders. It depends
on orders placed through a retailer integration that does not exist. No
nursery or retailer offers an open API for this; it needs a signed partner
agreement and credentials from the owner (stated 2026-09-18).
blocked:external
29.21.19 Native Plant & Pollinator Focus#
- 29.21.19.1 Create native plant database by ecoregion
- 29.21.19.2 Implement native plant finder by location
- Region-code finder done; precise lat/lon→ecoregion needs a GIS dataset
(external) —
ecoregionForRegion/nativePlantsForRegionare the offline path.
- Region-code finder done; precise lat/lon→ecoregion needs a GIS dataset
(external) —
- 29.21.19.3 Create pollinator species database
- 29.21.19.4 Implement bloom time calendar for pollinators
- 29.21.19.5 Create pollinator-friendly garden score
- 29.21.19.6 Implement monarch butterfly waystation guidelines
- 29.21.19.7 Create bird-friendly garden features
- 29.21.19.8 Implement wildlife habitat certification tracking
- 29.21.19.9 Create invasive species alerts by region
- Rule engine + sample region invasive lists done; a live invasive feed (per
state/agency) is an external data layer into
invasiveAlerts.
- Rule engine + sample region invasive lists done; a live invasive feed (per
state/agency) is an external data layer into
- 29.21.19.10 Implement native seed source directory
- Done 2026-05-31: new
@demeter/pollinatorslibrary (libs/demeter/pollinators/) — pure logic + curated data; 8 vitest tests (tsc + eslint clean).data.ts: pollinator species, native plants keyed by Level-I ecoregion, region invasive lists, native-seed-source directory, Monarch/NWF criteria (.19.1/.3/.9/.10).finder.ts: native plants by ecoregion/region (.19.2).bloom.ts: month-by-month bloom calendar + growing-season gaps + continuity score (.19.4).score.ts: pollinator-friendly garden score (native share + bloom continuity + pollinator-type diversity + pesticide-free) (.19.5).habitat.ts: Monarch Waystation eval (.19.6), bird-friendly feature guidance/score (.19.7), NWF-style wildlife-habitat certification readiness (.19.8), and region invasive alerts (.19.9).
- Done 2026-05-31: new
29.21.20 Accessibility Enhancements#
- 29.21.20.1 Implement high contrast mode. The residual task (restated
2026-09-18): a high-contrast token set in
apps/demeter/web/src/styles/switched by adata-contrast="high"attribute, a toggle onapps/demeter/web/src/pages/settings/SettingsPage.tsxthat persists per user and defaults fromprefers-contrast: more, with every text/background pair in the set reaching 7:1. Verify: a unit spec runsmeetsContrastfrom@demeter/accessibilityover every token pair at the AAA threshold, and a chromium spec toggles the mode and finds it still set after a reload.- Logic done; theme is CSS: contrast math (
contrastRatio/meetsContrast) is in@demeter/accessibility; the high-contrast theme toggle is an app/CSS layer over verified tokens (§29.18.6.4).
- Logic done; theme is CSS: contrast math (
- 29.21.20.2 Create colorblind-friendly color schemes
- 29.21.20.3 Implement large text mode. The residual task (restated
2026-09-18): a text-size setting (100 %, 125 %, 150 %) on the web settings
page that scales the root font size, persisted per user. Verify: a
chromium spec sets 150 % at a 1280-pixel viewport and asserts that
/dashboard,/gardensand/taskshave no horizontal scroll and no clipped button labels.- Foundation done; toggle is app/CSS: text already scales with browser/OS settings (rem-based, §29.18.6.5); a dedicated large-text toggle is a UI mode.
- 29.21.20.4 Create simplified interface mode: a per-user setting in
apps/demeter/webthat reduces the navigation incomponents/layout/AppLayout.tsxto Dashboard, Gardens, Tasks and Journal, hides the analytics and automation entry points, and switches lists to the single-column card layout. Verify: a chromium spec turns the mode on and asserts the navigation holds exactly those four entries while the hidden routes still open by URL.- App/UI: a reduced-density layout variant (the data/logic is unchanged).
- 29.21.20.5 Implement one-handed operation mode in
apps/demeter/mobile: a setting that moves primary actions and the navigation header controls into the bottom third of the screen and adds a reach-down gesture for the screen title. Verify: an RNTL spec asserts that every primary action on the dashboard, task list and garden detail screens renders inside the bottom-anchored action bar when the mode is on. Depends on the jest-expo suite of 29.18.6.11 (stated 2026-09-18).blocked:upstream- Native/mobile UI: reachability layout for one-handed use.
- 29.21.20.6 Create audio descriptions for images: a "listen" control on
journal and plant photos in
apps/demeter/webthat speaks the image's stored text alternative with the browserspeechSynthesisAPI, hidden when the image has no alternative text or the API is missing. Verify: a component spec with a test double at thespeechSynthesisboundary asserts the spoken text, the stop control and the hidden state. Writing richer descriptions for the plant photo library is content work and is not part of this item.- App/content: images carry text alternatives (a11y suite checks alt text); spoken audio descriptions are a roadmap content feature.
- 29.21.20.7 Implement haptic feedback for confirmations in
apps/demeter/mobile: callexpo-haptics(success, warning, error) from oneuseConfirmationHapticshook on task completion, harvest save and destructive confirmations, honouring a user setting and the OS reduce-motion preference. Verify: an RNTL spec withexpo-hapticsmocked asserts the right feedback type per action and none when the setting is off; how it feels on a phone is a manual residual. Depends on 29.18.6.11 (stated 2026-09-18).blocked:upstream- Native/mobile: device haptics on confirmations.
- 29.21.20.8 Create keyboard-only navigation (web)
- Done (§29.18.6.3): full keyboard tab order, Enter/Space activation, Escape-to-close, focus trapping + visible focus, and the new skip link — verified by the web a11y suite.
- 29.21.20.9 Implement motor accessibility features in
apps/demeter/web: minimum 44 × 44 CSS-pixel targets for every interactive control, a setting that extends toast and session-warning timeouts, and no action that requires a drag (the planner gets keyboard and click-to-place alternatives). Verify: a chromium spec measures the bounding box of every button and link on/dashboard,/tasksand/gardens/:id/plannerand fails under 44 pixels, and places a plant in the planner with the keyboard alone.- App/UI: large touch targets, reduced precision requirements, generous timeouts — presentation-layer settings.
- 29.21.20.10 Create accessibility statement and documentation
- Done 2026-05-31: new
@demeter/accessibilitylibrary (libs/demeter/accessibility/) — pure color a11y; 10 vitest tests (tsc + eslint clean): WCAGcontrastRatio/meetsContrast(21:1 anchor) for high-contrast checks (.20.1); Machado-2009 CVD simulation + the Okabe–Ito colorblind-safe palette +isPaletteCvdSafe(verified distinguishable under protan/deutan/tritan) (.20.2). Plus theapps/demeter/docs/accessibility/accessibility-statement.mdstatement (conformance target, features, known limitations, feedback) (.20.10). Remaining UI modes (.20.1 theme/.3/.4/.5/.6/.7/.9) are app/CSS/native layers over this logic; keyboard nav (.20.8) shipped in §29.18.6.3.
- Done 2026-05-31: new
29.22 Wire the web app to the API (found 2026-09-18)#
The checked web-UI items in §29.x were checked against screens that render
hardcoded placeholder constants: outside the three auth pages, no page under
apps/demeter/web/src/pages/ imports a hook from
apps/demeter/web/src/api/hooks/, and 19 pages carry a Placeholder Data
block. Those boxes are left as they are; §29.22 is the wiring they still owe.
The residual items restated on 2026-09-18 (§29.21.6, §29.21.13, §29.21.17) build
on the same hooks.
29.22.1 Replace placeholder constants with API data#
- 29.22.1.0 Commit the inventory this section works from as
apps/demeter/docs/development/web-placeholder-inventory.md: the 19 pages thatgrep -rli "Placeholder Data" apps/demeter/web/src/pagesreturns, each with the constants it renders. As of 2026-09-18:analytics/AnalyticsPage.tsx(yieldTrendData,harvestByPlantData,taskCompletionData,topPlantsData);analytics/ComparisonReportsPage.tsx(comparisonChartData,comparisonMetrics);analytics/EnvironmentalImpactPage.tsx(monthlyImpactData,organicMatterData,pollinatorPlantingData,badges);analytics/ResourceTrackingPage.tsx(waterUsageDaily,waterUsageMonthly,resourceCostBreakdown,fertilizerLog,seedInventory,toolInventory,seasonalPlanData);analytics/YieldReportsPage.tsx(yieldByPeriodData,yieldByPlantData,yieldByBedData,yieldPerSqFtData,qualityDistributionData,usageBreakdownData,yearComparisonData);dashboard/DashboardPage.tsx(inline placeholder values in the component body);gardens/GardenComparisonPage.tsx(GARDEN_SNAPSHOTS);gardens/GardensPage.tsx(placeholderGardens);gardens/PrintLayoutPage.tsx(PRINT_BEDS,MONTHLY_TASKS);plants/PlantsPage.tsx(placeholderPlants);sensors/AutomationHistoryPage.tsx(events,mostActiveRulesData);sensors/SensorDetailPage.tsx(device,readings,chartData,connectionLog);tasks/BulkTasksPage.tsx(placeholderTasks);tasks/CalendarExportPage.tsx(placeholderTasks);tasks/CalendarPage.tsx(generatePlaceholderTasks);tasks/RecurringTasksPage.tsx(placeholderRules);tasks/SchedulerPage.tsx(generatePlaceholderTasks);tasks/TaskTemplatesPage.tsx(builtInTemplates,customTemplates);tasks/TasksPage.tsx(placeholderTasks). Verify: the doc's page list equals the grep output at the commit that adds it, and each listed constant is found in its file. - 29.22.1.1 Wire
apps/demeter/web/src/pages/analytics/AnalyticsPage.tsxto the API: removeyieldTrendData,harvestByPlantData,taskCompletionDataandtopPlantsData. Feed the yield and plant charts fromuseHarvestSummary(apps/demeter/web/src/api/hooks/useHarvests.ts,GET /v1/harvests/summary) and the task-completion chart fromuseTasks(GET /v1/tasks). Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.2 Wire
apps/demeter/web/src/pages/analytics/ComparisonReportsPage.tsxto the API: removecomparisonChartDataandcomparisonMetrics. Compute the period-over-period deltas from twouseHarvestSummarycalls with different date ranges; ifGET /v1/harvests/summarytakes no date range yet, addfrom/toquery parameters toapps/demeter/api/src/routes/harvests.tswith an integration case. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.3 Wire
apps/demeter/web/src/pages/analytics/EnvironmentalImpactPage.tsxto the API: removemonthlyImpactData,organicMatterData,pollinatorPlantingDataandbadges. No route serves these today: addGET /v1/gardens/:id/environmental-impacttoapps/demeter/api/src/routes/gardens.tsover@demeter/pollinators,@demeter/soil-testand@demeter/water-analytics, and auseEnvironmentalImpacthook inapps/demeter/web/src/api/hooks/useGardens.ts. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.4 Wire
apps/demeter/web/src/pages/analytics/ResourceTrackingPage.tsxto the API: removewaterUsageDaily,waterUsageMonthly,resourceCostBreakdown,fertilizerLog,seedInventory,toolInventoryandseasonalPlanData. The water view is 29.21.17.1. For the rest, addGET /v1/gardens/:id/resourcesover@demeter/inventoryand auseResourceshook in a newapps/demeter/web/src/api/hooks/useResources.ts. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.5 Wire
apps/demeter/web/src/pages/analytics/YieldReportsPage.tsxto the API: removeyieldByPeriodData,yieldByPlantData,yieldByBedData,yieldPerSqFtData,qualityDistributionData,usageBreakdownDataandyearComparisonData. Feed every chart fromuseHarvestsanduseHarvestSummary(GET /v1/harvests,GET /v1/harvests/summary), adding agroupBy=period|plant|bedparameter to the summary route where the grouping is not served yet, with an integration case per grouping. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.6 Wire
apps/demeter/web/src/pages/dashboard/DashboardPage.tsxto the API: remove the inline placeholder values marked "For the scaffold, we show the UI structure with placeholder data". Compose the dashboard fromuseGardens,useTasks(due and overdue,GET /v1/tasks/overdue),useCurrentWeather,useWeatherAlerts,useSensorAlertsanduseHarvestSummary. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.7 Wire
apps/demeter/web/src/pages/gardens/GardenComparisonPage.tsxto the API: removeGARDEN_SNAPSHOTS. This is the web half of 29.21.13.5: read the aggregates fromGET /v1/gardens/compare?ids=through a newuseGardenComparisonhook inuseGardens.ts. Close the two items together. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.8 Wire
apps/demeter/web/src/pages/gardens/GardensPage.tsxto the API: removeplaceholderGardens. List gardens withuseGardens(GET /v1/gardens) and create them withuseCreateGarden; search and the type filter become query parameters or client-side filters over the response, stated in the spec. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.9 Wire
apps/demeter/web/src/pages/gardens/PrintLayoutPage.tsxto the API: removePRINT_BEDSandMONTHLY_TASKS. Read the beds fromuseGarden(GET /v1/gardens/:id,GET /v1/gardens/:id/beds) and the month's tasks fromGET /v1/tasks/calendar. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.10 Wire
apps/demeter/web/src/pages/plants/PlantsPage.tsxto the API: removeplaceholderPlants. List and search withusePlants(GET /v1/plants,GET /v1/plants/search,GET /v1/plants/facetedfor the filters), paginated. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.11 Wire
apps/demeter/web/src/pages/sensors/AutomationHistoryPage.tsxto the API: removeeventsandmostActiveRulesData. No route serves automation history today: addGET /v1/sensors/automation/historytoapps/demeter/api/src/routes/sensors.tsover the persisted@demeter/automationexecutions (add the table and migration if executions are not stored yet), and auseAutomationHistoryhook inapps/demeter/web/src/api/hooks/useSensors.ts. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.12 Wire
apps/demeter/web/src/pages/sensors/SensorDetailPage.tsxto the API: removedevice,readings,chartDataandconnectionLog. Read the device withuseSensor, the chart withuseSensorReadings(GET /v1/sensors/:id/readings) and the alerts withuseSensorAlerts; the connection log needs aGET /v1/sensors/:id/connection-logroute, or the panel is removed and the removal stated in the item. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.13 Wire
apps/demeter/web/src/pages/tasks/BulkTasksPage.tsxto the API: removeplaceholderTasks. List withuseTasks; apply bulk complete, reschedule and delete throughuseCompleteTask,useUpdateTaskand auseDeleteTaskhook to add (DELETE /v1/tasks/:id), reporting per-task failures. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.14 Wire
apps/demeter/web/src/pages/tasks/CalendarExportPage.tsxto the API: removeplaceholderTasks. Build the iCalendar export fromuseTasksover the selected date range; the spec asserts that the generated.icsholds exactly the tasks in the response. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.15 Wire
apps/demeter/web/src/pages/tasks/CalendarPage.tsxto the API: removegeneratePlaceholderTasks. Load the visible month fromGET /v1/tasks/calendarthrough auseTaskCalendarhook to add inuseTasks.ts. This is the prerequisite of the shared calendar in 29.21.6.9. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.16 Wire
apps/demeter/web/src/pages/tasks/RecurringTasksPage.tsxto the API: removeplaceholderRules. Recurrence rules have no list route today: addGET /v1/tasks/recurringandPATCH /v1/tasks/recurring/:id(pause, resume, edit) toapps/demeter/api/src/routes/tasks.tsover the recurrence model in@demeter/tasks, and auseRecurringTaskshook. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.17 Wire
apps/demeter/web/src/pages/tasks/SchedulerPage.tsxto the API: removegeneratePlaceholderTasks. Load the week fromGET /v1/tasks/calendar, and persist a drag-reschedule withuseUpdateTask, rolling the card back when the request fails. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.18 Wire
apps/demeter/web/src/pages/tasks/TaskTemplatesPage.tsxto the API: removebuiltInTemplatesandcustomTemplates. Built-in templates come from@demeter/tasks(imported, not copied into the page). Custom templates need persistence: adddemeter_task_templateswith a migration, CRUD under/v1/tasks/templates, and auseTaskTemplateshook; applying a template creates its tasks throughPOST /v1/tasks(POST /v1/tasks/generateonly returns suggestions). Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.19 Wire
apps/demeter/web/src/pages/tasks/TasksPage.tsxto the API: removeplaceholderTasks. List withuseTasks(status and garden filters as query parameters), complete withuseCompleteTask, snooze throughPOST /v1/tasks/:id/snooze, and show the overdue group fromGET /v1/tasks/overdue. Loading, empty and error states replace the constants, not a fallback to them. Verify: a vitest component spec with the API client mocked at the boundary asserts the rendered values come from the response, and a grep forPlaceholder Datain that file returns nothing. - 29.22.1.20 Audit the pages the marker does not catch. On 2026-09-18,
38 more
*Page.tsxfiles underapps/demeter/web/src/pages/import no hook fromsrc/api/hooks/and carry noPlaceholder Datacomment (for exampleharvests/HarvestsPage.tsx,journal/JournalPage.tsx,sensors/SensorsPage.tsx,weather/WeatherPage.tsx,community/CommunityPage.tsx,gardens/GardenDetailPage.tsx). Read each one, record in the inventory doc of 29.22.1.0 whether it is static by design or renders hardcoded data, and file one29.22.2.Nwiring item per page that renders hardcoded data, in the same form as the items above. Verify: every*Page.tsxfile appears in the inventory with one of the two verdicts and the evidence line.
Phase 29 Updated Summary Statistics#
| Section | Task Count |
|---|---|
| 29.1 Foundation & Core Infrastructure | 77 |
| 29.2 Plant Encyclopedia & Knowledge Base | 100 |
| 29.3 Garden Planning & Design | 100 |
| 29.4 Task & Schedule Management | 80 |
| 29.5 Seed & Inventory Management | 70 |
| 29.6 Journal & Observation System | 80 |
| 29.7 IoT & Sensor Integration | 100 |
| 29.8 Automation & Rules Engine | 80 |
| 29.9 AI/ML Intelligence | 100 |
| 29.10 Weather Integration | 80 |
| 29.11 Community & Social Features | 80 |
| 29.12 Hydroponics & Advanced Growing | 90 |
| 29.13 Preservation & Post-Harvest | 90 |
| 29.14 Analytics & Insights | 90 |
| 29.15 API Backend | 100 |
| 29.16 Mobile Application (React Native) | 130 |
| 29.17 Web Dashboard (React) | 80 |
| 29.18 Testing & Quality Assurance | 60 |
| 29.19 Deployment & DevOps | 60 |
| 29.20 Documentation | 30 |
| 29.21 SOTA Gap Analysis Additions | 200 |
| TOTAL Phase 29 (Demeter) | ~1,977 |
Final Updated Grand Total#
| Phase | Task Count |
|---|---|
| Phase 0-14 (Original) | 796 |
| Phase 15: Physical Wellness & Fitness | 503 |
| Phase 16: Video-to-Animation Pipeline | 346 |
| Phase 17: State-of-the-Art AI Integration | 424 |
| Phase 18: Production Readiness Remediation | 847 |
| Phase 19: AWS ECS + RunPod Infrastructure | 126 |
| Phase 20: Eve/Aphrodite Platform | 145 |
| Phase 21: Nyx Cosmic Observatory | 251 |
| Phase 22: Tara Meditation Platform | 318 |
| Phase 23: Veritas AI News Agency | ~878 |
| Phase 24: Psyche AI Virtual Assistant | ~866 |
| Phase 25: Metis Educational Platform | ~679 |
| Phase 26: Yemaya Autonomous Platform | 360 |
| Phase 27: Project Obsidian (Production) | ~2,971 |
| Phase 28: Arete Personal Development | ~1,225 |
| Phase 29: Demeter Home Gardening Platform | ~1,977 |
| GRAND TOTAL | ~12,712 |