๐ Admin Guide – Security & Database
Technical Administration Guide for Farmers Bounty v3.5.0
This guide covers the technical architecture, security features, database management, and administrative tools available in Farmers Bounty. Intended for WordPress administrators and developers.
๐ Table of Contents
- Credential Store
- Database Architecture
- Conversation Database
- Query Optimizer
- Garden Data Service
- Georgia Planting Calendar
- Knowledgebase System
- Privacy & Compliance
- Diagnostics
- All Shortcodes
- Changelog
๐ Credential Store
Encrypted API Key Storage
Farmers Bounty v3.5.0 introduces the Farmers_Bounty_Credential_Store class for secure API key management:
Supported Keys:
- Weather Underground API Key and Station ID
- Perenual API Key
- Claude AI (Anthropic) API Key
- Tavily API Key
- PlantNet API Key
Security Features:
- Encryption at Rest: All API keys are encrypted before storage in the database
- WordPress NONCE Integration: All credential operations use WordPress security nonces
- Capability Checks: Only administrators can view or modify credentials
- Masked Display: Keys are masked (e.g.,
sk-ant-...****) in the admin interface
Key Resolution Order:
The system resolves API keys in this priority order:
- wp-config.php Constants: Highest priority (e.g.,
FARMERS_BOUNTY_CLAUDE_API_KEY) - Encrypted Credential Store: Stored in
wp_optionswith encryption - wp_options Fallback: Legacy plain-text storage (for backward compatibility)
wp-config.php. This prevents them from being stored in the database entirely.๐๏ธ Database Architecture
37 Tables Organized by Version
Farmers Bounty creates 37 database tables, organized by the version that introduced them:
Core Tables (v1.0):
| Table | Description |
|---|---|
wp_fb_plants | Plant library with API-sourced data |
wp_fb_user_gardens | User garden instances and locations |
wp_fb_user_plants | Plants in user’s garden with status |
wp_fb_weather_cache | Weather data from PWS |
wp_fb_calendar_events | Garden calendar events |
wp_fb_api_cache | API response cache |
Extended Tables (v2.0):
wp_fb_seed_inventoryโ Seed packet trackingwp_fb_harvestsโ Harvest records and yieldswp_fb_care_logsโ Plant care activity logswp_fb_garden_layoutsโ Visual garden designswp_fb_succession_plansโ Succession planting scheduleswp_fb_purchase_listsโ Shopping listswp_fb_purchase_itemsโ Individual list items
Feature Tables (v3.0):
wp_fb_pollinator_sightingsโ Pollinator observation logswp_fb_preservation_recipesโ Preservation recipeswp_fb_preserved_goodsโ Preserved food inventorywp_fb_learningsโ Season learning entrieswp_fb_notificationsโ User notificationswp_fb_plant_diagnosesโ AI diagnosis recordswp_fb_plant_photosโ Plant photo gallerywp_fb_layout_snapshotsโ Garden layout snapshots
AI & Integration Tables (v4.0-v4.4):
wp_fb_conversationsโ AI conversation threadswp_fb_conversation_messagesโ Individual conversation messageswp_fb_gdd_trackingโ Growing degree day recordswp_fb_soil_testsโ Soil test resultswp_fb_companion_plantsโ Companion planting relationshipswp_fb_water_logsโ Watering event recordswp_fb_water_zonesโ Irrigation zone definitionswp_fb_integrationsโ Third-party integration settingswp_fb_sync_logโ Desktop app sync historywp_fb_knowledgebaseโ Custom knowledge articleswp_fb_plant_identificationsโ PlantNet ID recordswp_fb_crop_rotationโ Crop rotation historywp_fb_personasโ User persona selectionswp_fb_feature_flagsโ Feature customization flagswp_fb_analytics_cacheโ Pre-computed analytics datawp_fb_error_logโ Plugin error tracking
๐ฌ Conversation Database
Shared Conversation Storage
The conversation database is shared between Farmers Bounty and the companion Gardener’s Bounty AI Assistant plugin:
wp_fb_conversations Table:
- id: Unique conversation identifier
- user_id: WordPress user who owns the conversation
- title: Conversation title (auto-generated or user-defined)
- created_at: When conversation started
- updated_at: Last message timestamp
- source: Which plugin created it (farmers-bounty or gardeners-bounty)
wp_fb_conversation_messages Table:
- id: Unique message identifier
- conversation_id: Parent conversation
- role: “user” or “assistant”
- content: Message text
- metadata: JSON with sources, context used, token counts
- created_at: Message timestamp
โก Query Optimizer
Farmers_Bounty_Query_Optimizer Class
The Query Optimizer manages token budgeting for Claude API context assembly:
How It Works:
- Token Budget: Calculates available context window based on model limits
- Priority Ranking: Ranks context fragments by relevance to the user’s question
- Fragment Assembly: Assembles the most relevant context within the token budget:
- System prompt (always included)
- Weather data (high priority for weather questions)
- Plant database (high priority for plant questions)
- Knowledgebase articles (matched by relevance)
- Conversation history (most recent messages)
- GDD and frost data (seasonal context)
- Planting calendar (timing context)
- Overflow Handling: Gracefully truncates least important context when budget is exceeded
๐ฑ Garden Data Service
Farmers_Bounty_Garden_Data_Service Class
Builds real-time context for AI responses by assembling data from multiple sources:
Context Components:
- Weather Context: Current conditions, forecast, recent rainfall, temperature trends from PWS
- Plant Context: User’s active plants, their status, locations, and care history
- GDD Context: Current growing degree day accumulation and plant development predictions
- Frost Context: Last frost date, first frost date, days in growing season
- Calendar Context: Upcoming events, overdue tasks, planting windows
- Seasonal Context: Current season, what to plant now, what to harvest
Data Freshness:
- Weather data: Refreshed every 15 minutes from PWS
- Plant data: Real-time from database
- GDD data: Calculated daily from weather history
- Calendar data: Real-time from events table
๐ Georgia Planting Calendar
Farmers_Bounty_Georgia_Planting_Calendar Class
Provides month-by-month planting data optimized for USDA Zone 7b/8a (Atlanta, Georgia):
Data Includes:
- Monthly Planting Recommendations: What to plant each month
- Indoor vs Outdoor: When to start indoors vs direct sow
- Transplant Timing: When to move seedlings outside
- Last Frost Date: March 15-April 1 (average for Atlanta)
- First Frost Date: November 1-15 (average for Atlanta)
- Season Extension: Recommendations for extending growing season
Integration:
The planting calendar is used by:
- AI Assistant (provides timing context for planting questions)
- Calendar auto-generation (creates planting events)
- Dashboard widgets (shows “what to plant now”)
- Succession planting calculator
๐ Knowledgebase System
Reference Data Directories
The knowledgebase is stored in the knowledgebase/ directory of the plugin:
| Directory | Contents |
|---|---|
knowledgebase/pests/ | Pest identification guides, treatment options, prevention strategies for Georgia |
knowledgebase/diseases/ | Plant disease reference, symptoms, organic and conventional treatments |
knowledgebase/soil/ | Soil management, amendments, testing guides, Georgia clay soil solutions |
knowledgebase/reference-data/ | Atlanta climate data, Georgia native plants, companion planting charts, USDA zone data |
Knowledge Loader Admin Tool
Access at Farmers Bounty โ Knowledge Base โ Load Data
- Import reference data files into the searchable knowledgebase
- Index content for fast retrieval
- Update existing entries
- View loaded data statistics
RAG-Powered Search
The knowledgebase supports Retrieval-Augmented Generation (RAG) search:
- User queries are matched against knowledgebase content
- Most relevant articles are included in AI context
- Reduces AI hallucination by providing authoritative local data
- Prioritizes Georgia-specific information
๐ก๏ธ Privacy & Compliance
Farmers_Bounty_Privacy_Compliance Class
GDPR Consent Notices:
- Consent banner displayed on first use of AI features
- Clear explanation of data usage
- Opt-in/opt-out controls
- Consent status stored per user
Data Handling:
| Service | Data Sent | Data Stored |
|---|---|---|
| Claude AI (Anthropic) | Question text, garden context, conversation history | Anthropic does not store prompts for training |
| Tavily (Web Search) | Search query text only | Standard search logging |
| Weather Underground | Station ID for data retrieval | Public weather data |
Key Privacy Principles:
- No third-party sharing: Garden data is never sold or shared with third parties
- Minimal data transmission: Only necessary context is sent to AI services
- Local storage: All garden data remains in your WordPress database
- User control: Export or delete all your data at any time
- Transparent sources: AI responses indicate which data sources were used
๐ Diagnostics
Access at Farmers Bounty โ Diagnostics
System Information:
- WordPress, PHP, MySQL versions
- Plugin version and active features
- Server configuration details
- Memory usage and limits
Health Checks:
- Database: All 37 tables exist and are healthy
- APIs: Connection status for all configured APIs
- Permissions: File and folder permissions
- Cron Jobs: Scheduled tasks running correctly
- Cache: Cache system functioning
- Credential Store: Encryption working correctly
Error Logs:
- View recent plugin errors
- Filter by severity (info, warning, error, critical)
- Search and export logs
- Clear old log entries
API Usage Monitoring:
- Calls made per API per day/week/month
- Estimated costs for Claude AI
- Rate limit status
- Failed request tracking
- Average response times
๐ All Shortcodes Reference
| Shortcode | Description |
|---|---|
| AI Chatbot with conversation management |
| Main garden dashboard |
| Plant management interface |
| Garden calendar view |
| Weather dashboard with PWS data |
[fb_garden_designer] | Visual garden layout designer |
| Seed packet tracking |
[fb_water_management] | Water tracking and recommendations |
| Garden performance analytics |
[fb_plant_diagnosis] | AI plant problem diagnosis |
[fb_plant_id] | PlantNet photo identification |
[fb_native_plants] | Native plant database browser |
[fb_pollinators] | Pollinator dashboard and tracker |
[fb_preservation] | Preservation guide and recipes |
[fb_knowledge_base] | Searchable knowledge base |
[fb_glossary] | Gardening terminology glossary |
[fb_gdd_tracker] | Growing degree day tracker |
[fb_csv_export] | Data export interface |
๐ Changelog – v3.5.0 Highlights
Version 3.5.0 โ February 14, 2026
๐ New Features:
- AI-Powered Chatbot: Full-featured AI gardening assistant with three-panel interface, powered by Claude AI
- Conversation Management: Create, rename, delete, search, export, and import conversations
- Encrypted Credential Store:
Farmers_Bounty_Credential_Storeclass for secure API key storage with encryption at rest - Georgia Planting Calendar:
Farmers_Bounty_Georgia_Planting_Calendarwith month-by-month data for Zone 7b/8a - Query Optimizer:
Farmers_Bounty_Query_Optimizerfor intelligent token budgeting in AI context assembly - Garden Data Service:
Farmers_Bounty_Garden_Data_Servicefor real-time context building (weather, plants, GDD, frost, calendar) - Conversation Database: Dedicated
wp_fb_conversationsandwp_fb_conversation_messagestables with import/export - Privacy Compliance:
Farmers_Bounty_Privacy_Complianceclass with GDPR consent management
๐ Enhanced Knowledgebase:
- New
knowledgebase/pests/directory with Georgia-specific pest guides - New
knowledgebase/diseases/directory with plant disease reference - New
knowledgebase/soil/directory with soil management guides - Expanded
knowledgebase/reference-data/with regional planting data - Knowledge Loader admin tool for importing reference data
- RAG-powered search for AI context retrieval
๐ง Improvements:
- Enhanced
shortcode with configurable attributesGarden Assistant
OnlineAsk anything about gardening โ planting, pests, watering, harvest timing, and moreQuick Actions
Suggestions
What I Can Help With
- ๐ฑ Planting advice
- ๐ง Watering guidelines
- ๐ Pest management
- โ๏ธ Weather-based tips
- ๐ Crop rotation
- ๐ Planting schedules
- Quick Actions buttons (Today’s Tasks, Weather Impact, Harvest Ready, Pest Check)
- Suggestion chips for follow-up questions
- Source indicators showing data provenance in AI responses
- Shared conversation database with Gardener’s Bounty AI Assistant plugin
- Improved diagnostics with credential store health checks
๐ Related Guides
- Getting Started: Installation and initial setup
- AI Assistant & Chatbot: Using the AI gardening assistant
- Integrations & Settings: API key configuration
- Tools & Features: Data management and diagnostics