appa dn plugin udpates for integrationa dn final touches
This commit is contained in:
@@ -122,12 +122,20 @@ This document covers the **app-side** management of WordPress integration:
|
||||
│ │ ├── igny8-bridge.php # Main plugin file
|
||||
│ │ ├── includes/ # PHP classes
|
||||
│ │ ├── admin/ # Admin interface
|
||||
│ │ │ ├── class-admin.php # Menu registration
|
||||
│ │ │ ├── layout-header.php # Layout wrapper + sidebar
|
||||
│ │ │ ├── layout-footer.php # Footer
|
||||
│ │ │ ├── settings.php # Settings handler
|
||||
│ │ │ └── pages/ # Admin pages (3 pages)
|
||||
│ │ │ ├── connection.php # Dashboard (connection + stats)
|
||||
│ │ │ ├── settings.php # Post types, taxonomies, sync
|
||||
│ │ │ └── logs.php # Webhook activity logs
|
||||
│ │ ├── sync/ # Sync functionality
|
||||
│ │ ├── templates/ # Frontend templates
|
||||
│ │ └── docs/ # Plugin-internal docs
|
||||
│ └── dist/ # Distribution files
|
||||
│ ├── igny8-wp-bridge-v1.1.1.zip # Version ZIP
|
||||
│ ├── igny8-wp-bridge-v1.1.1.sha256
|
||||
│ ├── igny8-wp-bridge-v1.x.x.zip # Version ZIP
|
||||
│ ├── igny8-wp-bridge-v1.x.x.sha256
|
||||
│ └── igny8-wp-bridge-latest.zip # Symlink to latest
|
||||
│
|
||||
└── backend/
|
||||
@@ -141,6 +149,21 @@ This document covers the **app-side** management of WordPress integration:
|
||||
└── urls.py # URL routing
|
||||
```
|
||||
|
||||
### Plugin Admin Pages
|
||||
|
||||
The WordPress plugin provides 3 admin pages:
|
||||
|
||||
| Page | File | Purpose |
|
||||
|------|------|---------|
|
||||
| Dashboard | `connection.php` | Connection status, Site ID, API key, content stats |
|
||||
| Settings | `settings.php` | Post types, default post status, taxonomies, sync toggle |
|
||||
| Logs | `logs.php` | Webhook activity with timestamps, event types, status |
|
||||
|
||||
**Layout:**
|
||||
- Dashboard: 2-column grid (Connection Status + Content Stats)
|
||||
- Settings: 3-column top row (Post Types + Default Post Status + IGNY8 Sync) + dynamic taxonomy cards
|
||||
- Logs: Full-width table with search
|
||||
|
||||
### How ZIP Files Are Created
|
||||
|
||||
#### Automatic Build (Recommended)
|
||||
@@ -523,19 +546,38 @@ The frontend shows:
|
||||
|
||||
### Integration Data Model
|
||||
|
||||
**Authentication (Source of Truth):**
|
||||
|
||||
```python
|
||||
# SiteIntegration model (in auth/models.py)
|
||||
# Site model (in auth/models.py) - SINGLE source of truth for API auth
|
||||
|
||||
class Site(models.Model):
|
||||
wp_api_key = models.CharField(max_length=255) # API key for WP authentication
|
||||
# Used by: PublisherService, test connection, plugin verification
|
||||
```
|
||||
|
||||
**Sync Tracking (SiteIntegration):**
|
||||
|
||||
```python
|
||||
# SiteIntegration model (in auth/models.py) - Tracks sync status, NOT auth
|
||||
|
||||
class SiteIntegration(models.Model):
|
||||
site = models.ForeignKey(Site, ...) # IGNY8 site
|
||||
platform = models.CharField(...) # "wordpress"
|
||||
platform = models.CharField(...) # "wordpress", "shopify"
|
||||
external_site_url = models.URLField() # WordPress URL
|
||||
api_key = models.CharField(...) # Encrypted key
|
||||
sync_enabled = models.BooleanField()
|
||||
last_sync = models.DateTimeField()
|
||||
sync_status = models.CharField(...) # "pending", "syncing", "completed"
|
||||
last_sync_at = models.DateTimeField()
|
||||
sync_error = models.TextField(null=True)
|
||||
connection_status = models.CharField(...) # "connected", "error"
|
||||
```
|
||||
|
||||
**Key Architecture Points:**
|
||||
- `Site.wp_api_key` is the **SINGLE source of truth** for API authentication
|
||||
- `SiteIntegration` provides sync tracking but NOT authentication
|
||||
- Publishing uses `Site.wp_api_key` via `X-IGNY8-API-KEY` header
|
||||
- SiteIntegration kept for future multi-platform support (Shopify, custom)
|
||||
|
||||
---
|
||||
|
||||
## 9. Troubleshooting
|
||||
@@ -638,7 +680,20 @@ unzip -p /data/app/igny8/plugins/wordpress/dist/igny8-wp-bridge-v1.1.1.zip \
|
||||
- `/register/` - Installation registration
|
||||
- `/health-check/` - Plugin health monitoring
|
||||
|
||||
### WordPress Plugin Updates (v1.3.0 → v1.3.3)
|
||||
### WordPress Plugin Updates (v1.3.0 → v1.5.1)
|
||||
|
||||
**v1.5.1 - Admin UI Consolidation:**
|
||||
- Reduced admin pages from 6 to 3: Dashboard, Settings, Logs
|
||||
- Renamed Connection page to Dashboard with content stats
|
||||
- Removed redundant pages: Data, Sync, old Dashboard
|
||||
- Settings redesigned with 3-column layout (Post Types + Default Post Status + IGNY8 Sync)
|
||||
- Fixed header alignment across all pages with proper width styling
|
||||
- Cleaned up orphaned code and functions
|
||||
|
||||
**v1.5.0 - Authentication Simplification:**
|
||||
- Simplified authentication to use Site.wp_api_key as single source of truth
|
||||
- Removed redundant access_token handling
|
||||
- Improved test connection flow using authenticated /verify-key endpoint
|
||||
|
||||
**v1.3.3 - Template Design Improvements:**
|
||||
- Fixed square images displaying in 2 rows (now side-by-side)
|
||||
@@ -665,11 +720,12 @@ unzip -p /data/app/igny8/plugins/wordpress/dist/igny8-wp-bridge-v1.1.1.zip \
|
||||
### Version Progression Timeline
|
||||
|
||||
```
|
||||
v1.7.0 (Jan 10, 2026) - App infrastructure + plugin v1.3.3
|
||||
v1.7.0 (Jan 10, 2026) - App infrastructure + plugin v1.5.1
|
||||
├── Plugin admin UI consolidation (6→3 pages)
|
||||
├── Authentication simplification
|
||||
├── Plugin distribution system complete
|
||||
├── Template design overhaul
|
||||
├── Image layout fixes
|
||||
└── Pre-launch cleanup (Phases 1, 5, 6)
|
||||
└── Pre-launch cleanup complete
|
||||
|
||||
v1.6.2 (Jan 8, 2026) - Design refinements
|
||||
└── Marketing site updates
|
||||
|
||||
Reference in New Issue
Block a user