- Added a new API endpoint in the `IntegrationViewSet` to update the WordPress site structure, including post types and taxonomies. - Implemented a function to retrieve the site structure and sync it to the IGNY8 backend after establishing a connection. - Scheduled a daily cron job to keep the site structure updated. - Enhanced the WordPress plugin to trigger synchronization upon successful API connection. - Updated relevant files to support the new synchronization feature, improving integration capabilities.
6.4 KiB
6.4 KiB
🗂️ Workspace Setup Guide
Current Setup
Your git repository is located at:
/data/app/igny8
Git remote:
https://git.igny8.com/salman/igny8.git
Current branch: main
✅ Recommended Cursor Workspace Configuration
Option 1: Single Workspace (Recommended)
In Cursor, open the workspace folder:
/data/app/igny8
This gives you direct access to:
- ✅ Backend code (
backend/) - ✅ Frontend code (
frontend/) - ✅ WordPress Plugin (
igny8-wp-plugin/) - ✅ All documentation
- ✅ Git integration (all commits visible)
Option 2: Multi-Root Workspace (Advanced)
If you want separate workspaces for frontend and backend:
Workspace A: Backend
/data/app/igny8/backend
Workspace B: Plugin
/data/app/igny8/igny8-wp-plugin
Workspace C: Frontend
/data/app/igny8/frontend
🔧 Quick Setup in Cursor
Step 1: Close current workspace
- Cmd/Ctrl+K, Cmd/Ctrl+W
Step 2: Open folder
- File → Open Folder
- Navigate to:
/data/app/igny8 - Click "Open"
Step 3: Verify setup
- Should see folder tree with:
backend/frontend/igny8-wp-plugin/SYNC-FIX-*.mdfiles.git/folder
Step 4: Verify git
- Open Source Control (Ctrl+Shift+G)
- Should show:
mainbranch - Should show git history
📂 Folder Structure
/data/app/igny8/
├── backend/ # Django REST API
│ └── igny8_core/
│ ├── modules/
│ │ ├── integration/ # Integration views (MODIFIED ✅)
│ │ ├── planner/
│ │ ├── writer/
│ │ └── ...
│ ├── api/
│ ├── settings.py
│ └── ...
│
├── frontend/ # React app
│ ├── src/
│ │ ├── pages/
│ │ ├── components/
│ │ └── ...
│ ├── package.json
│ └── ...
│
├── igny8-wp-plugin/ # WordPress Plugin
│ ├── admin/ # MODIFIED ✅
│ │ ├── class-admin.php
│ │ └── settings.php
│ ├── includes/ # MODIFIED ✅
│ │ ├── functions.php
│ │ ├── class-igny8-api.php
│ │ └── ...
│ ├── sync/ # MODIFIED ✅
│ │ ├── hooks.php
│ │ ├── post-sync.php
│ │ └── ...
│ ├── igny8-bridge.php
│ └── ...
│
├── docs/ # Documentation
├── sites/ # Site configuration
├── master-docs/ # Master documentation
│
├── .git/ # Git repository
├── docker-compose.app.yml # Docker config
├── .gitignore
├── README.md
├── CHANGELOG.md
│
└── SYNC-FIX-*.md # Sync fix documentation (NEW ✅)
├── README-SYNC-FIX.md
├── SYNC-FIX-SUMMARY.md
├── IMPLEMENTATION-COMPLETE.md
├── SYNC-FIX-IMPLEMENTATION.md
├── SYNC-ARCHITECTURE-DIAGRAM.md
├── QUICK-SYNC-TEST.md
└── SYNC-FIX-INDEX.md
🔄 Git Workflow
View changes
cd /data/app/igny8
git status # See modified files
git diff # See what changed
Branches available
git branch -a # List all branches
Current branches:
main(current)feature/phase-0-credit-systemchore-http405-error-*(multiple)
Commit changes
git add .
git commit -m "Fix: WordPress plugin sync with backend"
git push origin main
📝 Modified Files in Git
Stage all changes:
cd /data/app/igny8
git add backend/igny8_core/modules/integration/views.py
git add igny8-wp-plugin/admin/class-admin.php
git add igny8-wp-plugin/includes/functions.php
git add igny8-wp-plugin/sync/hooks.php
View staged changes:
git diff --staged
Commit:
git commit -m "feat: WordPress plugin site structure sync
- Added update-structure endpoint to accept WP site structure
- Plugin now sends post types and taxonomies to backend
- Backend stores structure in SiteIntegration config
- Frontend Content Types tab now displays data
- Added daily cron job for periodic updates
Fixes: WordPress plugin sync not working
Closes: [issue number if applicable]"
🚀 Development Environment
Backend
cd /data/app/igny8/backend
python manage.py runserver
# or
docker-compose restart backend
Frontend
cd /data/app/igny8/frontend
npm start
WordPress Plugin
# Copy to WordPress installation
cp -r /data/app/igny8/igny8-wp-plugin/* /path/to/wordpress/wp-content/plugins/igny8-wp-plugin/
🔍 Key Files for Reference
Backend Changes
backend/igny8_core/modules/integration/views.py(Lines 1-20: imports, Lines 172-221: new endpoint)
Plugin Changes
igny8-wp-plugin/includes/functions.php(Lines 527-707: new functions, Lines 463-489: cron schedule)igny8-wp-plugin/admin/class-admin.php(Lines 283-286: call sync after connection)igny8-wp-plugin/sync/hooks.php(Line 36: register cron hook)
📚 Documentation Index
See SYNC-FIX-INDEX.md for complete documentation guide:
cat /data/app/igny8/SYNC-FIX-INDEX.md
Quick reference:
- Overview:
README-SYNC-FIX.md - Testing:
QUICK-SYNC-TEST.md - Technical:
SYNC-FIX-IMPLEMENTATION.md - Architecture:
SYNC-ARCHITECTURE-DIAGRAM.md
✅ Verification Checklist
- Git repository at
/data/app/igny8 - Remote configured:
git.igny8.com/salman/igny8.git - Main branch active
- Backend folder present
- Frontend folder present
- Plugin folder present
- Documentation files created
- Modified files ready for commit
🎯 Next Steps
- Open workspace: File → Open Folder →
/data/app/igny8 - Review changes: Source Control (Ctrl+Shift+G)
- Test changes: Follow
QUICK-SYNC-TEST.md - Commit changes: Use git commands above
- Deploy: Restart backend and update plugin
📞 Help
For questions about:
- Workspace setup: See this file
- Sync fix details: See
SYNC-FIX-INDEX.md - Testing: See
QUICK-SYNC-TEST.md - Architecture: See
SYNC-ARCHITECTURE-DIAGRAM.md
Setup guide created: November 22, 2025
Workspace location: /data/app/igny8
Git remote: https://git.igny8.com/salman/igny8.git