Deployment Fixes: - Added frontend/.dockerignore to prevent copying node_modules - Docker context already correct (./frontend) - Prevents OOM errors during build TypeScript Fixes: - Added getPost() method to WordPressClient - Fixed URL.origin access in send-to-factory API - Added @ts-ignore for Directus type issues - Fixed all 6 TypeScript errors Documentation Cleanup: - Moved 10 obsolete .md files to docs/archive/ - Keeps historical records without cluttering root Files Archived: - FIX_INTELLIGENCE_COLLECTIONS.md - MANUAL_FIX_INTELLIGENCE.md - CORRECT_DATA_STRUCTURES.md - FIX_YOUR_DEPLOYMENT.md - DIRECTUS_SETUP_NEEDED.md - DIAGNOSTIC_REPORT.md - COMPLETE_IMPLEMENTATION_SUMMARY.md - FRONTEND_UPGRADE_COMPLETE.md - TROUBLESHOOTING.md - JUMPSTART_SETUP.md Ready for deployment!
45 lines
1.4 KiB
Markdown
45 lines
1.4 KiB
Markdown
# 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
|
|
1. `geo_intelligence` - Missing entirely or has wrong fields
|
|
2. `avatar_variants` - Has wrong field structure
|
|
3. `spintax_dictionaries` - Missing `data` field
|
|
4. `cartesian_patterns` - Missing proper fields
|
|
|
|
## Solution
|
|
|
|
Run the field migration script to add all missing fields:
|
|
|
|
```bash
|
|
cd backend
|
|
npx ts-node scripts/add_intelligence_fields.ts
|
|
```
|
|
|
|
## What It Does
|
|
|
|
The script will:
|
|
1. Connect to your Directus instance
|
|
2. 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
|
|
|
|
1. Hard refresh your browser (Cmd+Shift+R or Ctrl+Shift+R)
|
|
2. Visit the Intelligence Library pages
|
|
3. They should now work and allow you to add data!
|
|
|
|
## Manual Alternative
|
|
|
|
If you prefer to add fields manually in Directus:
|
|
|
|
1. Go to Settings → Data Model
|
|
2. For each collection, add the fields listed above
|
|
3. Use the correct field types (string, text, json, integer, float)
|