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!
2.6 KiB
2.6 KiB
Quick Fix: Add Intelligence Library Fields to Directus
The Problem
The Intelligence Library pages show empty because the Directus collections are missing the required fields. The frontend components are trying to read fields that don't exist yet.
Quick Solution (Manual)
Go to your Directus admin panel and add these fields:
1. Create geo_intelligence Collection (if it doesn't exist)
Settings → Data Model → Create Collection → Name: geo_intelligence
Then add these fields:
location_key(String) - Unique identifiercity(String) - City namestate(String) - State codecounty(String) - County name (Optional)zip_code(String) - ZIP code (Optional)population(Integer) - Population count (Optional)median_income(Float) - Median income (Optional)keywords(Text) - Local keywords (Optional)local_modifiers(Text) - Local phrases (Optional)
2. Update avatar_variants Collection
Add these fields:
avatar_key(String) - Avatar identifiervariant_type(String) - Type: male, female, or neutralpronoun(String) - Pronoun set (e.g., he/him)identity(String) - Full nametone_modifiers(Text) - Tone adjustments (Optional)
3. Update spintax_dictionaries Collection
Add these fields:
category(String) - Dictionary categorydata(JSON) - Array of termsdescription(Text) - Description (Optional)
4. Update cartesian_patterns Collection
Add these fields:
pattern_key(String) - Pattern identifierpattern_type(String) - Pattern categoryformula(Text) - Pattern formulaexample_output(Text) - Example output (Optional)description(Text) - Description (Optional)
5. Update generation_jobs Collection (for Jumpstart fix)
Add this field:
config(JSON) - Job configuration
After Adding Fields
- Hard refresh your browser:
Cmd+Shift+R(Mac) orCtrl+Shift+R(Windows) - Visit the Intelligence Library pages
- Start adding data!
Automated Script (Alternative)
If you want to run the automated script, you need to set environment variables first:
export DIRECTUS_ADMIN_EMAIL="insanecorp@gmail.com"
export DIRECTUS_ADMIN_PASSWORD="Idk@ai2026yayhappy"
export DIRECTUS_PUBLIC_URL="https://spark.jumpstartscaling.com"
cd backend
npx ts-node scripts/add_intelligence_fields.ts
Verification
After adding fields, test by:
- Going to Directus → Content →
geo_intelligence - Click "Create Item"
- You should see all the new fields
- Add a test location
- Go to frontend → Intelligence Library → Geo Intelligence
- You should see your test data!