Intelligence Library: - Add full CRUD managers for Avatar Variants, Spintax, Cartesian Patterns - Update GeoIntelligenceManager to work with cluster/location structure - Create reusable DataTable, CRUDModal, DeleteConfirm components - Add TanStack Table for sorting/filtering/pagination - Add React Hook Form + Zod for form validation - Add export to JSON functionality - Add real-time stats dashboards - Update all Intelligence Library pages to use React components Jumpstart Fix: - Fix 'Error: undefined' when creating generation jobs - Change from storing 1456 posts to config-only approach - Store WordPress URL and auth instead of full inventory - Improve error logging to show actual error messages - Engine will fetch posts directly from WordPress Frontend Master Upgrade: - Install nanostores for state management - Add enhanced Directus client with auth and realtime - Configure PWA with offline support - Enable auto-sitemap generation for SEO - Add Partytown for web worker analytics - Implement image optimization - Add bundle visualizer and Brotli compression - Create sidebar state management Documentation: - Add data structure documentation - Add manual fix guides for Intelligence Library - Add schema migration scripts - Document all new features and fixes All components tested and ready for deployment.
1.4 KiB
1.4 KiB
Fix Intelligence Library Collections
Problem
The Intelligence Library pages don't work on launch because the Directus collections are missing the required fields.
Collections Affected
geo_intelligence- Missing entirely or has wrong fieldsavatar_variants- Has wrong field structurespintax_dictionaries- Missingdatafieldcartesian_patterns- Missing proper fields
Solution
Run the field migration script to add all missing fields:
cd backend
npx ts-node scripts/add_intelligence_fields.ts
What It Does
The script will:
- Connect to your Directus instance
- Add missing fields to each collection:
- geo_intelligence: location_key, city, state, county, zip_code, population, median_income, keywords, local_modifiers
- avatar_variants: avatar_key, variant_type, pronoun, identity, tone_modifiers
- spintax_dictionaries: category, data, description
- cartesian_patterns: pattern_key, pattern_type, formula, example_output, description
- generation_jobs: config field for Jumpstart fix
After Running
- Hard refresh your browser (Cmd+Shift+R or Ctrl+Shift+R)
- Visit the Intelligence Library pages
- They should now work and allow you to add data!
Manual Alternative
If you prefer to add fields manually in Directus:
- Go to Settings → Data Model
- For each collection, add the fields listed above
- Use the correct field types (string, text, json, integer, float)