Intelligent Garden Planning with Crop Rotation, Companion Planting & Pest Protection
A modern, self-contained Progressive Web App for planning your vegetable garden across multiple years, considering crop rotation rules, companion planting relationships, and natural pest protection strategies.
A vibe coding project
Version: 1.2 Easy Layout
Last Updated: February 2025
Status: Production Ready
Languages: English, German, Italian
File: beet-anything.html (single-file PWA)
GitHub: https://github.com/schatzl/beet-anything
License: Free for any use - Personal, commercial, educational, or otherwise.
Live Demo: Beet Anything
- Multi-year tracking: Plan unlimited years, view complete planting history
- Flexible bed management: Create unlimited beds, assign multiple vegetables per bed
- Wishlist system: Build your planting wishlist and get AI-powered suggestions
- Year rotation wizard: Automatically rotate last year's crops with optimal bed assignments
- Smart crop rotation: Warns about same family planting in consecutive years
- Companion planting: Shows beneficial and incompatible plant relationships
- Automated planning: AI-powered optimization of bed layouts
- Two modes:
- Fresh Garden: Start from scratch with selected plants
- Fit to Current: Respect existing beds and enforce crop rotation
- Intelligent scoring: Evaluates layouts based on:
- Companion relationships (good/bad)
- Natural pest protection
- Nutrition balance (heavy/medium/light feeders)
- Crop rotation compliance
- Preview before apply: Review optimized layout before committing
- 35 vegetables & herbs with complete pest profiles
- Natural pest control through companion planting
- Protection relationships: Shows which plants protect others from specific pests
- Vulnerability warnings: Alerts when plants share pest susceptibilities
- Visual indicators: Pest icons and protection badges on each plant
- 3 languages: English, German, Italian
- 245+ translation keys: Complete UI translation
- Dynamic switching: Change language instantly without reload
- Localized plant names: All vegetables translated
- Progressive Web App: Install on any device
- Touch-optimized: Designed for iPhone, Android, tablets
- Responsive layout: Adapts from phone to desktop
- Offline-capable: Works without internet after first load
- Card-style tabs: Modern, accessible navigation
- Auto-save: All changes saved instantly to browser localStorage
- Export/Import: Backup your entire garden as JSON
- Data persistence: Survives browser restarts
- Privacy-focused: All data stays on your device
- Download: Get
beet-anything.htmlfrom the repository - Open: Double-click the file or open in any modern browser
- Install: Click "Install as App" for native-like experience
- Plan: Start adding vegetables and planning your garden!
See INSTALLATION.md for detailed setup instructions.
35 vegetables & herbs with complete data:
- Family classification (for rotation)
- Nutrition needs (heavy/medium/light feeders)
- Companion relationships (good/bad/neutral)
- Pest vulnerabilities (15 common garden pests)
- Protection abilities (which pests they repel)
Categories:
- Leafy Greens: Lettuce, Spinach, Kale, Cabbage, Brussels Sprouts
- Fruiting: Tomato, Pepper, Chili, Eggplant, Cucumber, Zucchini, Pumpkin
- Legumes: Peas, Beans (Bush & Pole)
- Root Vegetables: Carrot, Beet, Radish, Turnip, Parsnip, Potato
- Alliums: Onion, Garlic, Leek
- Herbs: Basil, Dill, Parsley, Rosemary, Oregano, Sage
- Brassicas: Broccoli, Cauliflower, Kohlrabi
- Others: Celery, Corn, Strawberry
- Select Year: Use arrows to navigate to desired year
- Build Wishlist: Add vegetables you want to grow
- Create Beds: Click "+ Add Garden Bed"
- Assign Plants: Click "Plant" button next to each bed
- View Details: Click bed cards to see full companion info
- Rotate Years: Use "🔄 Rotate Last Year's Plan" for next season
- Switch to Easy Layout tab
- Select Plants: Check vegetables you want to include
- Choose Mode:
- Fresh Garden: Ignores existing layout, starts fresh
- Fit to Current: Respects bed count, enforces rotation
- Set Constraints: Plants per bed (2-6), number of beds
- Calculate: Algorithm runs 50 attempts with local optimization
- Review Results: See score, bed assignments, and reasoning
- Apply or Recalculate: Accept layout or try again
- Change to next year (e.g., 2024 → 2025)
- Click "🔄 Rotate Last Year's Plan"
- Review suggestions: See optimized rotation respecting crop families
- Apply: Creates beds with rotated crops
- Adjust manually: Fine-tune as needed
Plants are rated as:
- +1: Good companions (mutually beneficial)
- 0: Neutral (no significant interaction)
- -1: Bad companions (incompatible, should avoid)
The system shows:
- ✓ Good companions in green
- ⚠ Neutral companions in gray
- ✗ Bad companions in red
Prevents planting same family in consecutive years:
- Brassicaceae (cabbage family)
- Solanaceae (nightshade family)
- Apiaceae (carrot family)
- Fabaceae (legume family)
- Amaranthaceae (beet family)
- Cucurbitaceae (squash family)
- Alliaceae (onion family)
Each plant has:
- Vulnerabilities: Which pests attack it
- Protections: Which pests it repels
Visual indicators:
- 🐌 Pest icons show vulnerabilities
- 🛡️ Shield badges show protection abilities
Per bed evaluation:
- +1 per good companion pair
- -50 per bad companion pair
- +20 per pest protection relationship
- -15 per shared pest vulnerability
- +5 for nutrition balance (mix of feeders)
- -10 if all heavy feeders (soil fatigue risk)
Layout-level penalties:
- -30 per crop rotation violation (same family, consecutive years)
Score interpretation:
- 80-100: Excellent
- 70-79: Very Good
- 60-69: Good
- 50-59: Fair
- <50: Poor (consider recalculating)
Algorithm:
- Run 50 random attempts
- For each: Greedy placement + local optimization (up to 20 swaps)
- Return best-scoring layout
Modern, accessible navigation:
- Active tab: Cream background with green top border (4px)
- Inactive tab: Flat dark background, no rounded corners
- Visual continuity: Active tab flows seamlessly into content panel
- Touch-friendly: Large tap targets (44px minimum)
- Leaf Green (#4A7C59): Primary accent, borders, active states
- Cream (#FAF7F0): Background, active tab
- Soil Dark (#3A2F28): Primary text
- Soil Medium (#8B7355): Secondary text, inactive states
- Sage (#8AA888): Subtle accents
Responsive breakpoints:
- Desktop (>968px): Two-column layout
- Tablet (481-968px): Single column, optimized spacing
- Phone (<480px): Compact layout, 2-column grids
Single-file PWA: Everything in one HTML file
- HTML structure
- CSS styling (inline
<style>) - JavaScript logic (inline
<script>) - No external dependencies
- No build process required
Size: ~145 KB (uncompressed)
Lines of code: ~4,300
Minimum:
- Chrome/Edge 90+
- Safari 14+
- Firefox 88+
Features used:
- CSS Grid & Flexbox
- ES6+ JavaScript
- localStorage API
- Service Worker (for PWA)
localStorage keys:
beetAnything_garden: Garden state (beds, plantings)beetAnything_wishlist: Wishlist itemsbeetAnything_currentYear: Active yearbeetAnything_language: UI language
Export format: JSON (human-readable)
beet-anything/
├── beet-anything.html # Main PWA file
├── README.md # This file
├── SPECIFICATION.md # Technical specification
├── INSTALLATION.md # Setup & deployment guide
└── assets/ # (optional) Screenshots, icons
v1.2 - Easy Layout (February 2025)
- Easy Layout Optimizer with AI-powered bed assignments
- Year Rotation Wizard for season-to-season planning
- Card-style tab navigation (Manual Planning | Easy Layout)
- Consolidated wishlist into Manual Planning tab
- Mobile optimizations for iPhone/Android
- 2-tab interface for simplified UX
v1.1 - Pest Protection (February 2025)
- Comprehensive pest protection system
- 35 vegetables & herbs with pest profiles
- Natural pest control through companion planting
- Visual pest indicators and protection badges
- Mobile-optimized tooltips
v1.0 - Foundation (February 2025)
- Multi-year garden planning
- 30 vegetables with companion data
- Crop rotation warnings
- Trilingual support (EN/DE/IT)
- PWA installation
- Export/import functionality
Free for any use - Personal, commercial, educational, or otherwise.
No restrictions, no attribution required (though appreciated!).
This is a personal vibe coding project, but suggestions and improvements are welcome:
- Fork the repository
- Make your changes
- Test thoroughly (especially mobile devices)
- Submit a pull request
Areas for contribution:
- Additional vegetables/herbs
- More companion relationships
- Additional language translations
- Bug fixes
- Mobile optimizations
Project: github.com/schatzl/beet-anything
Live Demo: target23.de/beet-anything.html
Built with:
- Vanilla JavaScript (no frameworks)
- CSS Grid & Flexbox
- localStorage for persistence
- Inter font family (system fallback)
Inspired by the need for a simple, privacy-focused garden planning tool that works offline and respects user data sovereignty.
Happy Gardening! 🌱🥕🍅