290 lines
11 KiB
Markdown
290 lines
11 KiB
Markdown
# Section 2: SETUP Modules - Audit & Action Plan
|
|
|
|
**Date:** December 27, 2025
|
|
**Status:** Finalized for Implementation
|
|
**Scope:** Add Keywords, Content Settings, Sites (Thinker excluded - admin only)
|
|
|
|
---
|
|
|
|
## 2.1 Add Keywords
|
|
|
|
**Route:** `/setup/add-keywords`
|
|
**File:** `pages/Setup/AddKeywords.tsx`
|
|
|
|
### Current Functionality
|
|
- Browse pre-populated seed keywords from global database (admin-imported CSV)
|
|
- Filter by active site's industry/sector
|
|
- Bulk select and add keywords to Planner workflow
|
|
- Tracks which keywords are already added
|
|
- Filters: Search, Country, Difficulty
|
|
|
|
### Important Clarification
|
|
- **This page:** Browse/select from global seed keyword database only
|
|
- **Manual keyword entry:** Available in Planner/Keywords page (user's own workflow), NOT here
|
|
- **Keyword imports:** Admin-only via backend admin panel
|
|
|
|
---
|
|
|
|
### Issues to Address
|
|
|
|
| # | Issue | Priority | Action |
|
|
|---|-------|----------|--------|
|
|
| 1 | Sector requirement unclear | High | Add tooltip/message explaining why buttons are disabled when no sector is selected |
|
|
| 2 | No "already added" filter | Medium | Add filter toggle: "Show not-yet-added only" |
|
|
| 3 | No "Next Step" CTA | High | Add button after keywords added: "Next: Plan Your Content →" linking to Planner |
|
|
| 4 | No keyword count summary | Medium | Display: "X keywords in your workflow • Y available to add" |
|
|
| 5 | Import/manual add buttons exist | High | Remove any UI elements for importing or manually adding keywords - this is global DB, read-only for users |
|
|
| 6 | No Keyword Research indication | Low | Add small teaser text: "Looking for more keywords? Keyword Research coming soon" (user-friendly, non-technical wording) |
|
|
|
|
---
|
|
|
|
### Implementation Notes
|
|
|
|
**For Issue #1 (Sector requirement):**
|
|
- When buttons are disabled, show tooltip: "Please select an industry and sector in your Site Settings to browse relevant keywords"
|
|
- Consider linking directly to Site Settings
|
|
|
|
**For Issue #3 (Next Step CTA):**
|
|
- Button should appear after user has added at least 1 keyword
|
|
- Route to `/planner/keywords`
|
|
|
|
**For Issue #5 (Remove import/add):**
|
|
- Audit the page for any "Import Keywords" or "Add Custom Keyword" buttons
|
|
- Remove from UI completely
|
|
- Keywords only come from admin-imported global database
|
|
|
|
---
|
|
|
|
## 2.2 Content Settings
|
|
|
|
**Route:** `/account/content-settings`
|
|
**File:** `pages/account/ContentSettingsPage.tsx`
|
|
**Tabs:** Content Generation, Publishing, Image Settings
|
|
|
|
### Current Functionality
|
|
- **Content Generation Tab:** Append to prompt, default tone, default length
|
|
- **Publishing Tab:** Auto-publish toggle, keep updated toggle
|
|
- **Image Settings Tab:** Quality, style, sizes, format (DALL-E 2/3/Runware)
|
|
|
|
### Current State
|
|
- ⚠️ **Content Generation:** Shows "saved" but does NOT persist (TODO in code)
|
|
- ⚠️ **Publishing:** Shows "saved" but does NOT persist (no backend API)
|
|
- ✅ **Image Settings:** Works correctly (has API integration)
|
|
|
|
---
|
|
|
|
### Issues to Address
|
|
|
|
| # | Issue | Priority | Action |
|
|
|---|-------|----------|--------|
|
|
| 1 | Content Generation NOT PERSISTED | 🔴 Critical | Implement backend API endpoint to save Content Generation settings |
|
|
| 2 | Publishing NOT PERSISTED | 🔴 Critical | Implement backend API endpoint - simple toggle for auto-publish (true/false) |
|
|
| 3 | False "saved" confirmation | 🔴 Critical | Fix after #1 and #2 - currently misleads users |
|
|
|
|
---
|
|
|
|
### Implementation Notes
|
|
|
|
**For Issue #1 (Content Generation API):**
|
|
- Fields to persist: append_to_prompt, default_tone, default_length
|
|
- Should save at account level (global, not per-site)
|
|
|
|
**For Issue #2 (Publishing API):**
|
|
- Simple boolean toggle: auto_publish (true/false)
|
|
- When true: content automatically publishes to WordPress after generation
|
|
- When false: content stays in Review status for manual publishing
|
|
|
|
**Not Needed for Launch:**
|
|
- Per-site content settings
|
|
- Thinker prompts connection explanation (handled via shortcodes in prompts)
|
|
|
|
---
|
|
|
|
## 2.3 Sites
|
|
|
|
**Route:** `/sites`
|
|
**Files:** `pages/Sites/List.tsx`, `pages/Sites/SiteSettings.tsx`, `pages/Sites/SiteDashboard.tsx`
|
|
**Tabs (Site Settings):** General, Integrations, Content Types
|
|
|
|
### Current Functionality
|
|
- List all sites with filtering (search, type, hosting, status)
|
|
- Create sites via WorkflowGuide (requires industry + sectors)
|
|
- Activate/deactivate sites
|
|
- Navigate to site dashboard, content, settings
|
|
- Settings: Name, URL, SEO, WordPress integration, content type mapping
|
|
|
|
### What Sites Module Should Be (Launch Scope)
|
|
- Connect/manage WordPress sites for content publishing
|
|
- Configure WordPress integration (API credentials)
|
|
- Set active site for content workflow
|
|
- Industry/sector selection (for keyword filtering)
|
|
|
|
---
|
|
|
|
### Issues to Address
|
|
|
|
#### A. Fix/Improve (From Audit)
|
|
|
|
| # | Issue | Priority | Action |
|
|
|---|-------|----------|--------|
|
|
| 1 | Dashboard stats are mock data | Medium | Implement real site statistics endpoint OR remove stats display |
|
|
| 2 | No inline editing | Low | Add inline edit for site name from list view |
|
|
| 3 | No site cloning | Low | Add "Duplicate Site" action to copy configuration |
|
|
| 4 | No bulk operations | Low | Add bulk activate/deactivate/delete |
|
|
| 5 | Complex site creation flow | High | Allow site creation without requiring industry/sector upfront |
|
|
| 6 | Integration tab default after creation | Medium | Default to General tab, not Integrations (less confusing for non-technical users) |
|
|
| 7 | No setup progress indicator | High | Add visual checklist showing what's configured vs pending (see below) |
|
|
|
|
#### B. Remove (Legacy Site Builder)
|
|
|
|
| # | Issue | Priority | Action |
|
|
|---|-------|----------|--------|
|
|
| 8 | Site Builder legacy pages | High | Remove all frontend pages/components related to site builder feature |
|
|
| 9 | WordPress content fetching | High | Remove code that fetches existing content FROM WordPress (only IGNY8-generated content should exist) |
|
|
| 10 | Duplicate Manage.tsx | High | Delete `pages/Sites/Manage.tsx` - redundant with List.tsx |
|
|
| 11 | Backend site builder code | High | Remove backend APIs/models related to site builder and external content fetching |
|
|
|
|
---
|
|
|
|
### Setup Completion Checklist (New Feature)
|
|
|
|
Display this checklist on Site card or Site Dashboard to guide users:
|
|
|
|
```
|
|
Site Setup Progress
|
|
───────────────────
|
|
☑ Site created
|
|
☐ Industry/Sectors selected
|
|
☐ WordPress integration configured (or skipped)
|
|
☐ Keywords added
|
|
☐ Content settings configured
|
|
|
|
[Complete Setup →]
|
|
```
|
|
|
|
**Implementation Notes:**
|
|
- Show on each site card in list view (compact version)
|
|
- Show expanded on Site Dashboard
|
|
- Each item links to relevant settings page
|
|
- "Complete Setup" button goes to first incomplete item
|
|
- When all complete, show "✓ Ready to create content"
|
|
|
|
---
|
|
|
|
## 2.4 SETUP Cross-Module Issues
|
|
|
|
| # | Issue | Priority | Action |
|
|
|---|-------|----------|--------|
|
|
| 1 | No guided flow | High | After completing setup tasks, guide user to start content workflow (link to Planner) |
|
|
| 2 | Scattered settings | Medium | Document where settings live; consider consolidation in future |
|
|
| 3 | No onboarding checklist | High | Implement Setup Completion Checklist (see 2.3 above) |
|
|
|
|
---
|
|
|
|
## Summary
|
|
|
|
### Total Issues by Section
|
|
|
|
| Section | Critical | High | Medium | Low | Total |
|
|
|---------|----------|------|--------|-----|-------|
|
|
| 2.1 Add Keywords | 0 | 3 | 2 | 1 | 6 |
|
|
| 2.2 Content Settings | 3 | 0 | 0 | 0 | 3 |
|
|
| 2.3 Sites | 0 | 6 | 2 | 3 | 11 |
|
|
| 2.4 Cross-Module | 0 | 2 | 1 | 0 | 3 |
|
|
| **TOTAL** | **3** | **11** | **5** | **4** | **23** |
|
|
|
|
### Critical Items (Must Fix)
|
|
|
|
1. **Content Settings - Content Generation tab not saving** → Implement backend API
|
|
2. **Content Settings - Publishing tab not saving** → Implement backend API
|
|
3. **Content Settings - False "saved" message** → Fix after APIs implemented
|
|
|
|
### High Priority Items
|
|
|
|
1. Add Keywords - Sector requirement tooltip
|
|
2. Add Keywords - Next Step CTA to Planner
|
|
3. Add Keywords - Remove import/manual add buttons
|
|
4. Sites - Allow simpler site creation flow
|
|
5. Sites - Add Setup Completion Checklist
|
|
6. Sites - Remove Site Builder legacy code (frontend)
|
|
7. Sites - Remove WordPress content fetching code
|
|
8. Sites - Delete duplicate Manage.tsx
|
|
9. Sites - Remove Site Builder backend code
|
|
10. Cross-Module - Guided flow after setup
|
|
11. Cross-Module - Onboarding checklist implementation
|
|
|
|
### Files to Delete
|
|
|
|
| File | Reason |
|
|
|------|--------|
|
|
| `pages/Sites/Manage.tsx` | Duplicate of List.tsx |
|
|
| Site Builder related pages | Legacy feature removed |
|
|
| Site Builder related components | Legacy feature removed |
|
|
|
|
### Files to Modify
|
|
|
|
| File | Changes |
|
|
|------|---------|
|
|
| `pages/Setup/AddKeywords.tsx` | Add tooltip, filter, CTA, count summary, remove import buttons, add teaser |
|
|
| `pages/account/ContentSettingsPage.tsx` | Connect to new backend APIs |
|
|
| `pages/Sites/List.tsx` | Add setup checklist, inline edit, bulk operations |
|
|
| `pages/Sites/SiteSettings.tsx` | Default to General tab |
|
|
| `pages/Sites/SiteDashboard.tsx` | Fix mock stats, add setup checklist |
|
|
|
|
### Backend Work Required
|
|
|
|
| Area | Work |
|
|
|------|------|
|
|
| Content Settings API | Create endpoints for Content Generation and Publishing settings |
|
|
| Site Statistics API | Implement real stats OR remove from frontend |
|
|
| Cleanup | Remove Site Builder and content fetching APIs/models |
|
|
|
|
---
|
|
|
|
Status after implementation
|
|
|
|
|
|
## Summary of Section 2 Implementation
|
|
|
|
### 2.1 Add Keywords (IndustriesSectorsKeywords.tsx)
|
|
- ✅ Added `showNotAddedOnly` filter state with "Not Yet Added Only" filter option
|
|
- ✅ Added `addedCount` and `availableCount` state variables for keyword count tracking
|
|
- ✅ Added keyword count summary showing "X keywords in your workflow • Y available to add"
|
|
- ✅ Added "Next: Plan Your Content →" CTA button that appears when keywords are added
|
|
- ✅ Added "Looking for more keywords? Keyword Research coming soon!" teaser text
|
|
- ✅ Sector requirement tooltip already existed - no changes needed
|
|
- ✅ No visible import buttons to remove (dead code existed but was not exposed)
|
|
|
|
### 2.2 Content Settings (ContentSettingsPage.tsx)
|
|
- ✅ Created new backend API endpoint `/v1/system/settings/content/<pk>/` for content_generation and publishing
|
|
- ✅ Added `ContentSettingsViewSet` to backend with retrieve/update/save actions
|
|
- ✅ Updated frontend to load content_generation and publishing settings from API
|
|
- ✅ Updated frontend to save content_generation settings (append_to_prompt, default_tone, default_length)
|
|
- ✅ Updated frontend to save publishing settings (auto_publish_enabled, auto_sync_enabled)
|
|
- ✅ Removed TODO comments - settings now actually persist
|
|
|
|
### 2.3 Sites
|
|
- ✅ Created `SiteSetupChecklist` component showing setup progress with checklist
|
|
- ✅ Updated Dashboard.tsx to use the new checklist component
|
|
- ✅ Removed mock stats from Dashboard (were showing all zeros)
|
|
- ✅ Deleted Manage.tsx (redundant duplicate of List.tsx)
|
|
- ✅ Removed empty `Builder/` folder structure
|
|
- ✅ Removed routes to deleted pages in App.tsx
|
|
- ✅ Site Settings already defaults to "general" tab - no changes needed
|
|
|
|
### Files Modified
|
|
1. IndustriesSectorsKeywords.tsx
|
|
2. ContentSettingsPage.tsx
|
|
3. settings_views.py
|
|
4. urls.py
|
|
5. Dashboard.tsx
|
|
6. App.tsx
|
|
|
|
### Files Created
|
|
1. SiteSetupChecklist.tsx
|
|
|
|
### Files Deleted
|
|
1. Manage.tsx
|
|
2. `frontend/src/pages/Sites/Builder/` (empty folder)
|
|
|