v2-exece-docs
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# IGNY8 V2 — Master Execution Plan
|
||||
|
||||
**Version:** 1.0 | March 23, 2026
|
||||
**Version:** 1.1 | March 23, 2026
|
||||
**Status:** Active — Execution Reference
|
||||
**Author:** Salman (Alorig Systems) + Claude Opus
|
||||
**Execution Tool:** Claude Code (SSH to VPS)
|
||||
**Source of Truth:** Codebase at `/data/app/igny8/` — all technical claims verified against actual code
|
||||
|
||||
---
|
||||
|
||||
@@ -11,10 +12,12 @@
|
||||
|
||||
This is the single master document governing the complete IGNY8 V2 build — from infrastructure migration through SAG engine, all modules, WordPress ecosystem, business layer, and multi-app deployment. Every sub-phase references a dedicated build doc in this folder that Claude Code can pick up and execute independently.
|
||||
|
||||
## 2. Current State (Confirmed March 23, 2026)
|
||||
## 2. Current State (Verified Against Codebase — March 23, 2026)
|
||||
|
||||
**IGNY8 v1.8.4** is healthy and functionally production-ready.
|
||||
|
||||
### 2.1 Functional Status
|
||||
|
||||
| Area | Status |
|
||||
|------|--------|
|
||||
| Settings save (content, publishing, profile) | ✅ Working |
|
||||
@@ -27,26 +30,107 @@ This is the single master document governing the complete IGNY8 V2 build — fro
|
||||
| `/writer/tasks/{id}/brief/` | No current use case — v2 scope |
|
||||
| Taxonomy sync, Linker/Optimizer, webhooks | Correctly scoped as v2 features, not bugs |
|
||||
|
||||
### 2.2 Verified Codebase Baseline
|
||||
|
||||
| Component | Verified Value |
|
||||
|-----------|---------------|
|
||||
| Django | >=5.2.7 (requirements.txt) |
|
||||
| Python | 3.11-slim (Dockerfile) |
|
||||
| Node | 18-alpine (Dockerfile.dev) |
|
||||
| React | ^19.0.0 |
|
||||
| TypeScript | ~5.7.2 |
|
||||
| Vite | ^6.1.0 |
|
||||
| Zustand | ^5.0.8 |
|
||||
| Tailwind CSS | ^4.0.8 |
|
||||
| Celery | >=5.3.0 |
|
||||
| WP Plugin | IGNY8 WordPress Bridge v1.5.2 |
|
||||
| Primary Key Strategy | BigAutoField (integer, NOT UUID) |
|
||||
| AUTH_USER_MODEL | igny8_core_auth.User |
|
||||
| DEFAULT_AUTO_FIELD | django.db.models.BigAutoField |
|
||||
| Installed Apps | 34 Django apps |
|
||||
| Middleware Stack | 13 middleware classes |
|
||||
| Celery Beat Tasks | 14 scheduled tasks |
|
||||
| AI Functions | 7 (auto_cluster, generate_ideas, generate_content, generate_images, generate_image_prompts, optimize_content, generate_site_structure) |
|
||||
|
||||
### 2.3 Container Inventory (docker-compose.app.yml — 7 containers)
|
||||
|
||||
| Container | Image | Host Port | Role |
|
||||
|-----------|-------|-----------|------|
|
||||
| igny8_backend | igny8-backend:latest | 8011 | Django + Gunicorn (4 workers, 120s timeout) |
|
||||
| igny8_frontend | igny8-frontend-dev:latest | 8021 | Vite dev server (port 5173 internal) |
|
||||
| igny8_marketing_dev | igny8-marketing-dev:latest | 8023 | Marketing site dev server (port 5174 internal) |
|
||||
| igny8_celery_worker | igny8-backend:latest | — | Celery worker (concurrency=4) |
|
||||
| igny8_celery_beat | igny8-backend:latest | — | Celery beat scheduler |
|
||||
| igny8_flower | igny8-backend:latest | 5555 | Celery monitoring |
|
||||
|
||||
*Plus shared infra containers (external to app compose): postgres, redis, caddy, portainer, pgadmin, filebrowser*
|
||||
|
||||
### 2.4 Existing Django Apps (34 in INSTALLED_APPS)
|
||||
|
||||
**Business layer:** automation, notifications, optimization, publishing, integration
|
||||
**Module layer:** planner (keywords/clusters/ideas), writer (tasks/content/images), billing, system, linker (inactive), optimizer (inactive), publisher, integration
|
||||
**Auth & core:** auth (Account, Site, Sector, User, Plan), ai, plugins, admin
|
||||
|
||||
### 2.5 Existing Models (key entities)
|
||||
|
||||
| App | Models |
|
||||
|-----|--------|
|
||||
| auth | Account, Plan, Subscription, Site, Sector, Industry, IndustrySector, SeedKeyword, User, SiteUserAccess |
|
||||
| planning | Clusters (status: new/mapped), Keywords, ContentIdeas |
|
||||
| content | Tasks, Content (content_type: post/page/product/taxonomy), ContentTaxonomy, ContentTaxonomyRelation, Images, ImagePrompts |
|
||||
| automation | DefaultAutomationConfig, AutomationConfig (per-site), AutomationRun |
|
||||
| integration | SiteIntegration, SyncEvent, PublishingSettings |
|
||||
| publishing | PublishingRecord, DeploymentRecord |
|
||||
| billing | CreditTransaction, CreditUsageLog, CreditCostConfig, AccountPaymentMethod, Payment, Invoice |
|
||||
| system | IntegrationProvider, AIPrompt, IntegrationSettings, AuthorProfile |
|
||||
| ai | AITaskLog |
|
||||
| plugins | Plugin, PluginVersion, PluginDownload |
|
||||
| notifications | Notification |
|
||||
| optimization | OptimizationTask |
|
||||
|
||||
### 2.6 7-Stage Automation Pipeline
|
||||
|
||||
| Stage | Function | AI | Batch Size |
|
||||
|-------|----------|-----|-----------|
|
||||
| 1 | Keywords → Clusters | Yes (auto_cluster) | 50 |
|
||||
| 2 | Clusters → Ideas | Yes (generate_ideas) | 1 |
|
||||
| 3 | Ideas → Tasks | No | 20 |
|
||||
| 4 | Tasks → Content | Yes (generate_content) | 1 |
|
||||
| 5 | Content → Image Prompts | Yes (generate_image_prompts) | 1 |
|
||||
| 6 | Image Prompts → Images | Yes (generate_images) | 1 |
|
||||
| 7 | Auto-approval → Publish | No | — |
|
||||
|
||||
### 2.7 What Does NOT Exist (common misconceptions from planning docs)
|
||||
|
||||
- **No `sag/` app** — no SAGBlueprint, SAGAttribute, SAGCluster, or SectorAttributeTemplate models
|
||||
- **No UUID primary keys** — all models use BigAutoField (integer)
|
||||
- **No `sag_blueprint` field on Site model**
|
||||
- **No `blueprint_context` field on Content or Tasks models**
|
||||
- **No `self_hosted_ai` provider** in IntegrationProvider
|
||||
- **No `/sag/site-analysis` endpoint** in the WordPress plugin
|
||||
- **Content already has** `content_type` (post/page/product/taxonomy) and `content_structure` (article/guide/comparison/review/listicle/landing_page/etc) — these are not new fields
|
||||
- **Linker & Optimizer modules** exist in code but are **inactive** (behind feature flags)
|
||||
|
||||
**Conclusion:** Phase 0 is pure migration. No bug-fixing sprint needed. Current environment stays untouched — all new work on new server with zero downtime.
|
||||
|
||||
## 3. Architecture Overview
|
||||
|
||||
**Current:** Single VPS, dev environment running as production, 14 Docker containers (6 unnecessary), Gitea self-hosted, no staging.
|
||||
**Current:** Single VPS running IGNY8 app containers + shared Alorig infrastructure containers. App-level: 7 containers in `docker-compose.app.yml` (backend, frontend, marketing_dev, celery_worker, celery_beat, flower) + shared infra containers (postgres, redis, caddy, portainer, pgadmin, filebrowser). Of the 7 app containers, `marketing_dev` and `flower` are non-essential for production. Gitea self-hosted for git, no staging environment, no GitHub.
|
||||
|
||||
**Target:** New Hostinger KVM 4 (4 vCPU, 16GB RAM, 200GB NVMe), shared Alorig infrastructure, production + staging environments, GitHub for all repos, Cloudflare DNS, self-hosted AI on Vast.ai GPU.
|
||||
**Target:** New Hostinger KVM 4 (4 vCPU, 16GB RAM, 200GB NVMe) with shared Alorig infrastructure stack (PG, Redis, Caddy, Portainer). IGNY8 app runs 3 core containers (backend, celery_worker, celery_beat) + frontend served via Caddy. Same pattern for all other Alorig apps. Production + staging environments, GitHub for all repos, Cloudflare DNS, self-hosted AI on Vast.ai GPU.
|
||||
|
||||
**IGNY8 v2 Transformation:** From keyword-driven content generator → structure-first SAG-powered site architecture engine. Attributes first, not keywords first. Keywords emerge from attribute intersections across 45 industries, 449 sectors.
|
||||
|
||||
## 4. Technology Stack
|
||||
|
||||
| Layer | Current (v1.8.4) | V2 Addition |
|
||||
| Layer | Current (v1.8.4) — Verified | V2 Addition |
|
||||
|-------|-------------------|-------------|
|
||||
| Backend | Django 5.1, DRF, PostgreSQL, Redis, Celery | SAG models, new module APIs |
|
||||
| Frontend | React 19, TypeScript, Zustand, Tailwind | Blueprint UI, wizard, dashboards |
|
||||
| AI (Cloud) | OpenAI GPT/DALL-E, Anthropic Claude, ElevenLabs | — |
|
||||
| Backend | Django >=5.2.7, DRF, PostgreSQL (external), Redis (external), Celery >=5.3.0, Python 3.11 | SAG models, new module APIs |
|
||||
| Frontend | React ^19.0.0, TypeScript ~5.7.2, Zustand ^5.0.8, Tailwind ^4.0.8, Vite ^6.1.0, Node 18 | Blueprint UI, wizard, dashboards |
|
||||
| AI (Cloud) | OpenAI (via IntegrationProvider), Anthropic (via IntegrationSettings), Runware (images), DALL-E (images) | — |
|
||||
| AI (Self-hosted) | — | Qwen3 (text), FLUX/SD (images), Wan 2.1 (video) via Vast.ai |
|
||||
| WordPress | Bridge plugin v1.3.3 | Plugin v2 (14 modules), Companion Theme, Toolkit |
|
||||
| Infrastructure | Single VPS, Gitea, no staging | KVM 4 + Vast.ai GPU, GitHub, Cloudflare, prod + staging |
|
||||
| WordPress | IGNY8 WordPress Bridge v1.5.2 | Plugin v2 (14 modules), Companion Theme, Toolkit |
|
||||
| Infrastructure | Single VPS, Gitea self-hosted, no staging, Caddy reverse proxy | KVM 4 + Vast.ai GPU, GitHub, Cloudflare, prod + staging |
|
||||
| DevOps | Manual | Claude Code via SSH |
|
||||
|
||||
## 5. Complete Execution Map
|
||||
@@ -59,8 +143,8 @@ This is the single master document governing the complete IGNY8 V2 build — fro
|
||||
| 0A | `00A-github-repo-consolidation.md` | All repos → 1 GitHub account, linked to Source-Codes/, remove Gitea | — |
|
||||
| 0B | `00B-vps-provisioning.md` | New KVM 4, Cloudflare DNS, shared Docker infra (PG/Redis/Caddy/Portainer) | 0A |
|
||||
| 0C | `00C-igny8-production-migration.md` | pg_dump → new server, Docker Compose, DNS cutover, zero downtime | 0B |
|
||||
| 0D | `00D-staging-environment.md` | Identical 3-container staging, separate DB + Redis prefix | 0C |
|
||||
| 0E | `00E-legacy-cleanup.md` | Kill Gitea + 5 containers (frontend-dev, marketing, pgadmin, filebrowser, setup-helper), ~1.5GB freed | 0C |
|
||||
| 0D | `00D-staging-environment.md` | Staging environment: backend + celery_worker + celery_beat + frontend, separate DB (`igny8_staging_db`) + Redis DB 1 | 0C |
|
||||
| 0E | `00E-legacy-cleanup.md` | Kill Gitea + non-essential containers (marketing_dev, flower, pgadmin, filebrowser), decommission old VPS | 0C |
|
||||
| 0F | `00F-self-hosted-ai-infra.md` | Vast.ai GPU (2×RTX 3090) + SSH tunnel + LiteLLM + Ollama/Qwen3 + ComfyUI | 0B |
|
||||
|
||||
### Phase 1 — SAG Core Engine
|
||||
@@ -168,13 +252,15 @@ After all V2-Execution-Docs are built, the following source locations get archiv
|
||||
|
||||
## 8. Key Principles
|
||||
|
||||
1. **Nothing working breaks** — nullable fields, feature flags, staging first
|
||||
2. **SAG is attribute-first** — keywords are output, not input
|
||||
3. **Same container pattern everywhere** — backend + celery_worker + celery_beat
|
||||
4. **Current environment never touched** — all new work on new server
|
||||
5. **All development via Claude Code** — SSH to VPS, timelines compressed vs manual dev
|
||||
6. **Each doc is self-contained** — Claude Code executes one doc at a time without losing context
|
||||
7. **Monitor real usage** — upgrade decisions are data-driven, not speculative
|
||||
1. **Codebase is the single source of truth** — every technical claim in execution docs verified against actual code, not planning/reference docs
|
||||
2. **Nothing working breaks** — nullable fields, feature flags, staging first
|
||||
3. **SAG is attribute-first** — keywords are output, not input
|
||||
4. **Same container pattern everywhere** — backend + celery_worker + celery_beat per app, shared infra (PG/Redis/Caddy) across all Alorig apps
|
||||
5. **Current environment never touched** — all new work on new server
|
||||
6. **All development via Claude Code** — SSH to VPS, timelines compressed vs manual dev
|
||||
7. **Each doc is self-contained** — Claude Code executes one doc at a time without losing context
|
||||
8. **Coexistence with existing models** — new SAG models must define migration path for existing Clusters/Keywords/Content, not ignore them
|
||||
9. **Monitor real usage** — upgrade decisions are data-driven, not speculative
|
||||
|
||||
## 9. Timeline Estimate (Claude Code Execution)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user