Files
igny8/STAGE_2_PLAN.md
IGNY8 VPS (Salman) a5ef36016c stage2 plan
2025-11-25 16:59:48 +00:00

6.7 KiB

🚀 IGNY8 — STAGE 2 FRONTEND REFACTOR PROMPT (FINAL + SAFE + BACKEND-LOCKED) Frontend Realignment & UX Refactor Based on Completed Backend (Stage 1)

IMPORTANT — DO NOT SKIP THIS HEADER

Backend is fully completed according to STAGE_1_COMPLETE.md and must NOT be modified.

You MUST NOT:

Modify backend models

Modify backend serializers

Modify backend enums

Modify backend endpoints

Add new backend fields

Change existing backend choice values

Add new DB fields (like word_count or image_count)

You are ONLY updating the React frontend (pages, components, Zustand stores, API hooks, UI, routing, layouts).

All frontend changes must strictly match the final backend schema described in STAGE_1_COMPLETE.md (treat it as the single source of truth).

STAGE 2 — OBJECTIVE

Realign the entire frontend UI/UX to match the finalized backend architecture:

New simplified model fields

New statuses

New flows

New cluster + taxonomy mappings

New content_types and content_structures (from backend choices)

Clean, consistent UI across all modules

Content Manager becomes the final, authoritative content pipeline

Sites module cleaned according to your 18-point correction

Your output MUST include:

All changed frontend files

All removed frontend files

All new components/pages

Updated Zustand stores

Updated hooks & service calls

Updated documentation

Updated changelog

Implement EVERY ITEM below exactly — nothing added, nothing skipped.

🔷 PART A — GLOBAL FRONTEND UPDATES A.1 Update all API hooks & service files

Replace ALL references to deprecated backend fields:

Remove:

cluster_role

sync_status

context_type

content_role

dimension_meta

any legacy entity_type

any old WP sync status fields

✔ Replace with final backend fields:

content_type

content_structure

taxonomy_term

taxonomy_terms

external_id

external_url

status = draft/published

source = igny8/wordpress

Use EXACT choice values returned by backend. Frontend labels may be prettier, but backend values MUST not be touched.

A.2 Update Zustand Stores Task Store

status: queued / completed

Remove: cluster_role, sync_status, entity_type

Content Store

status: draft / published

source: igny8 / wordpress

Existing fields only — no new fields

A.3 UI Consistency

All modules use same button types (Primary, Secondary, Ghost, Icon)

Fix mismatched paddings, icons, alignments

Remove all old icons or styles referencing removed backend fields

🔷 PART B — PLANNER MODULE B.1 Cluster List

Make cluster name clickable

Navigate to /clusters/:id

Remove UI touches showing:

cluster roles

context types

unused metadata

B.2 Idea Cards

Each idea must show:

cluster

content_type (backend choices)

content_structure (backend choices)

B.3 Task Creation

Task creation form MUST include:

✔ cluster ✔ content_type ✔ content_structure ✔ primary_keyword ✔ taxonomy_term (only when content_type = taxonomy)

Remove: Blog post sync_status cluster_role unused dropdowns

🔷 PART C — WRITER MODULE C.1 Tasks Table

Columns:

Title

Cluster

Content Type

Content Structure

Status (queued/completed)

Created Date

Actions

Remove:

sync_status

cluster_role

entity_type

any deprecated WP sync fields

C.2 Task Detail

After content is generated, redirect to Content Manager for editing

Task status becomes completed

No legacy fields displayed

C.3 Filters

Allow:

content_type

content_structure

cluster

status

Remove:

sync_status

cluster_role

unused filters

🔷 PART D — SITES MODULE (18-POINT FIX)

You MUST implement your EXACT 18-point spec.

D.1 Sites Page Layout

Grid view ONLY

Remove table toggle

Collapsible Add Site form (shown when no sites exist)

Add Site button triggers collapsible form, not modal

D.2 Remove These

Pages button Sectors button Blueprints button Create Site (builder) Banner notifications “Sites Configuration” text Any code behind these

D.3 Site Card

Top-right: ✔ Active/inactive switch

Bottom buttons (ONLY): ✔ Dashboard ✔ Content ✔ Settings

D.4 Settings Page

Two-row grid of 4 cards:

General

SEO Meta

Open Graph

Schema

Below: ✔ Sector/Industry selector (moved from card)

🔷 PART E — CLUSTER DETAIL PAGE

Create/Refactor /clusters/🆔

Tabs/Sections:

Articles

Pages

Products

Taxonomy Pages

Each item must list:

Title

content_type

content_structure

taxonomy_terms (names)

status

source

Actions (edit/view in CM)

No: cluster_role old counters legacy metadata

🔷 PART F — CONTENT MANAGER This is the most critical component. F.1 Content Table Columns

Title (clickable → edit page)

Content Type

Content Structure

Cluster

Taxonomy Terms

Status (draft/published)

Source (IGNY8/WP)

URL (if published)

Word Count (frontend computed from content_html — DO NOT add backend fields)

Images (only if existing API/image relations exist — DO NOT add backend fields)

Actions

F.2 Filters

cluster

content_type

content_structure

taxonomy (dropdown)

status

source

F.3 Row Actions

Edit Content

Publish to WordPress

View in WordPress (if external_url exists)

Assign taxonomy

Assign cluster

View images (if supported by existing API)

F.4 Bulk Actions

Bulk publish

Bulk assign cluster

Bulk assign taxonomy

F.5 Content Editor Page

Editable:

title

content_html

Selectable:

cluster

taxonomy_terms

content_type (backend choices)

content_structure (backend choices)

Remove: sync_status cluster_role WP meta fields

F.6 Publish to WP

Button must:

Call /content/{id}/publish/

On success:

Set status = published

Update external_id

Update external_url

🔷 PART G — GLOBAL UI CLEANUP Remove all UI references to:

Blog post type

sync_status

cluster_role

context_type

content_role

any labels from old WP sync

Ensure:

button consistency

icon consistency

spacing and padding

correct grid layouts

🔷 PART H — FRONTEND DOCUMENTATION UPDATE

Update the frontend reference docs to include:

Final UI structure

Page responsibilities

New pipeline (Planner → Writer → Content Manager → WP Publish)

All dropdown fields and mappings

All component flows

Remove all old/legacy references.

🔷 PART I — CHANGELOG UPDATE

Append entry:

v1.0 — Stage 2 Frontend Refactor

Planner, Writer, Sites, Clusters, Content Manager UI fully updated

Deprecated UI elements removed

Full alignment with Stage 1 backend

Unified statuses, content types, and structures

Correct WordPress publish and import integration

Documentation updated

🔥 FINAL EXECUTION INSTRUCTIONS

You MUST:

Implement ALL changes above

Output ALL updated frontend files

Remove ALL deprecated frontend code

Update documentation

Update changelog

Provide a final summary listing:

Updated pages

Updated components

Updated stores

Updated hooks

Removed files

Any new components added