final docs for final audit implemenation

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-27 00:34:22 +00:00
parent 277ef5c81d
commit 7a9fa8fd8f
12 changed files with 2565 additions and 1590 deletions

View File

@@ -0,0 +1,242 @@
# 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 |
---

View File

@@ -0,0 +1,313 @@
# Section 3: WORKFLOW Modules - Audit & Action Plan
**Date:** December 27, 2025
**Status:** Finalized for Implementation
**Scope:** Planner, Writer, Automation (Linker & Optimizer excluded - not active modules)
---
## 3.1 Planner
**Route:** `/planner/keywords`
**Files:** `pages/Planner/Keywords.tsx`, `pages/Planner/Clusters.tsx`, `pages/Planner/ClusterView.tsx`, `pages/Planner/Ideas.tsx`, `pages/Planner/KeywordOpportunities.tsx`
**Tabs:** Keywords, Clusters, Ideas
### Current Functionality
- **Keywords:** CRUD, bulk status updates, auto-cluster AI, filters
- **Clusters:** CRUD, bulk operations, auto-generate ideas AI
- **Ideas:** CRUD, bulk queue to writer, filters
- **Flow:** Keywords → Auto-Cluster → Clusters → Auto-Generate Ideas → Ideas → Queue to Writer
---
### Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | KeywordOpportunities page exists but orphaned | High | **DELETE** - Remove `pages/Planner/KeywordOpportunities.tsx` and all references to it. Add Keywords page is the source of truth for seed keywords |
| 2 | No "Add to Existing Cluster" | Medium | Add option to assign keywords to existing clusters (not just create new) |
| 3 | No cluster progress indicator | High | Show which clusters already have ideas generated (badge/indicator) |
| 4 | Ideas missing queued count | Medium | Add indicator showing how many ideas are pending vs processed |
| 5 | Cluster → Ideas transition unclear | Medium | Make it clear which clusters need ideas generated |
| 6 | No return path from Ideas to source cluster | Low | Make cluster name clickable on Ideas page to navigate back |
---
### Issues NOT Being Addressed (Per Discussion)
| Issue | Reason |
|-------|--------|
| No cluster merge/split | Risk of breaking functional workflow, complex implementation |
---
### Implementation Notes
**For Issue #1 (Remove KeywordOpportunities):**
- Delete file: `pages/Planner/KeywordOpportunities.tsx`
- Remove route from App.tsx or router config
- Remove any navigation links to `/planner/keyword-opportunities`
- Remove from sidebar if present
- The Add Keywords page (`/setup/add-keywords`) is the active workflow item for seed keywords
**For Issue #3 (Cluster progress indicator):**
- On Clusters table, show badge: "X ideas" or "No ideas yet"
- Visual distinction between clusters with/without ideas
- Consider color coding or icon
**For Issue #5 (Cluster → Ideas transition):**
- Add "Generate Ideas" button prominently on clusters without ideas
- Filter option: "Show clusters without ideas"
---
## 3.2 Writer
**Route:** `/writer/tasks`
**Files:** `pages/Writer/Tasks.tsx`, `pages/Writer/Drafts.tsx`, `pages/Writer/ContentView.tsx`, `pages/Writer/Images.tsx`, `pages/Writer/Review.tsx`, `pages/Writer/Published.tsx`
**Tabs:** Queue, Drafts, Images, Review, Published
### Current Functionality
- **Tasks (Queue):** CRUD, generate content (row action only), generate images bulk
- **Drafts:** List drafts, view details, status updates
- **Images:** Grouped by content, image generation
- **Review:** Status=review filter, publish to WordPress
- **Published:** Status=published, WordPress sync status
---
### Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | Status progression confusion | High | Streamline Draft → Review → Published flow - should not require navigating different pages for status changes |
| 2 | Images detached from content workflow | High | Integrate images into content workflow - show/manage images within content view |
| 3 | ContentView shows tags and categories twice | High | Fix template to display tags and categories only once |
---
### Issues NOT Being Addressed (Per Discussion)
| Issue | Reason |
|-------|--------|
| No bulk content generation | Not an issue per current workflow |
| No content editing | Not an issue per current workflow |
| No manual task creation | Not an issue per current workflow |
| No content regeneration | Not an issue per current workflow |
| Review → Published manual only | Not an issue per current workflow |
| ContentView missing actions bar | Not an issue per current workflow |
| No send_to_linker action | Linker not active module |
---
### Implementation Notes
**For Issue #1 (Status progression):**
- Allow status changes from any tab/view without forcing navigation
- Consider unified content list with status filter instead of separate pages
- Or add status change dropdown/buttons within each view
**For Issue #2 (Images integration):**
- Show image thumbnails within ContentView
- Allow image generation from ContentView
- Show image count on content list items
**For Issue #3 (Duplicate tags/categories):**
- Audit ContentView.tsx template
- Find and remove duplicate rendering of tags and categories
- Should display once in appropriate section
---
## 3.3 Automation
**Route:** `/automation`
**Files:** `pages/Automation/AutomationPage.tsx` (or Dashboard.tsx)
**Tabs:** None (single page)
### Current Functionality
- Pipeline overview (7 stages: Keywords → Clusters → Ideas → Tasks → Content → Image Prompts → Images)
- Schedule configuration (frequency, time, enable/disable)
- Run controls (Run Now, Pause, Resume)
- Real-time progress polling
- Metrics display and activity log
---
### Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | No stage-by-stage control | Medium | Add toggles to enable/disable individual pipeline stages |
| 2 | No review gate config | Low | Add UI to configure review gate rules (Stage 7) |
| 3 | No error recovery | High | Add retry capability for failed items (per-item or per-stage) |
| 4 | No batch size config | Medium | Add setting to throttle items processed per run |
| 5 | No dry run/preview | Medium | Add preview mode to show what WOULD be processed before running |
| 6 | Activity log not filterable | Medium | Add filters: by stage, status, date |
| 7 | Credit estimation unclear | High | Clarify labeling - consistent terminology (credits vs content pieces) |
| 8 | Run history depth unknown | Low | Add pagination to run history |
| 9 | No indication of manual vs automated | Low | Show source indicator for processed items |
---
### Implementation Notes
**Critical Constraint:** All changes must NOT affect the actual AI functions that run on module pages. Automation uses the same functions - only UI/control changes, not function logic.
**For Issue #1 (Stage toggles):**
- Add on/off toggle for each of the 7 stages
- When stage is off, automation skips it
- Visual indicator showing which stages are active
**For Issue #3 (Error recovery):**
- Show failed items in activity log with "Retry" button
- Option to retry all failed items from a run
- Clear error messages explaining what failed
**For Issue #5 (Dry run/preview):**
- "Preview Run" button shows list of items that would be processed
- Shows count per stage
- User can then confirm or cancel
**For Issue #7 (Credit estimation):**
- Use consistent terminology matching the pricing simplification plan
- Show estimated cost before running
---
## 3.4 Linker
**Status:** ❌ NOT ACTIVE MODULE - Skipped
Not part of current phase. No issues to address.
---
## 3.5 Optimizer
**Status:** ❌ NOT ACTIVE MODULE - Skipped
Not part of current phase. No issues to address.
---
## 3.6 WORKFLOW Cross-Module Issues
### Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | No Planner → Writer visibility | Medium | After queuing ideas to writer, provide clear feedback and link to Writer |
| 2 | No cross-module notifications | High | Log all AI runs in notification dropdown (bell icon) with correct end results |
| 3 | Progress modals have wrong texts | High | Fix placeholder text, wrong wording, inaccurate counts (showing "X" or placeholders) |
| 4 | Progress modal counts inaccurate | High | Ensure counts reflect actual items being processed |
| 5 | No breadcrumb navigation | Medium | Add breadcrumbs showing workflow path (Cluster → Idea → Task → Content) |
| 6 | No "Next Step" suggestions | Medium | After each action, suggest what to do next |
---
### Issues NOT Being Addressed (Per Discussion)
| Issue | Reason |
|-------|--------|
| No Writer → Linker integration | Linker not active module |
| No Writer → Optimizer integration | Optimizer not active module |
---
### Implementation Notes
**For Issue #2 (Notifications):**
- Bell icon dropdown should show log of all AI function runs
- Each entry shows: function type, status (success/failed/in-progress), timestamp
- Include runs from: Clustering, Idea Generation, Content Generation, Image Generation
- Show result: "Generated 5 ideas from Cluster X" or "Failed: insufficient credits"
- Link to relevant content/page
**For Issues #3 & #4 (Progress modals):**
- Audit all progress modals across modules
- Replace placeholder text ("X", "processing...", wrong labels)
- Ensure counts match actual items:
- "Processing 5 of 12 keywords" (not "Processing X of Y")
- "Generated 3 ideas" (actual count, not placeholder)
- Match text to actual AI function being performed
- Consistent terminology across all modals
**Progress Modals to Audit:**
- Keyword clustering modal
- Idea generation modal
- Content generation modal
- Image prompt extraction modal
- Image generation modal
- Any bulk operation modals
---
## Summary
### Total Issues by Section
| Section | High | Medium | Low | Total |
|---------|------|--------|-----|-------|
| 3.1 Planner | 2 | 3 | 1 | 6 |
| 3.2 Writer | 3 | 0 | 0 | 3 |
| 3.3 Automation | 2 | 5 | 2 | 9 |
| 3.4 Linker | - | - | - | Skipped |
| 3.5 Optimizer | - | - | - | Skipped |
| 3.6 Cross-Module | 2 | 4 | 0 | 6 |
| **TOTAL** | **9** | **12** | **3** | **24** |
---
### High Priority Items
1. **Planner** - Delete KeywordOpportunities page and all references
2. **Planner** - Add cluster progress indicator (which have ideas)
3. **Writer** - Fix status progression confusion
4. **Writer** - Integrate images into content workflow
5. **Writer** - Fix duplicate tags/categories in ContentView
6. **Automation** - Add error recovery/retry for failed items
7. **Automation** - Clarify credit/content terminology
8. **Cross-Module** - Fix progress modal texts and counts
9. **Cross-Module** - Implement notification logging for AI runs
---
### Files to Delete
| File | Reason |
|------|--------|
| `pages/Planner/KeywordOpportunities.tsx` | Orphaned page, Add Keywords is source of truth |
---
### Files to Modify
| File | Changes |
|------|---------|
| `pages/Planner/Keywords.tsx` | Remove any KeywordOpportunities references |
| `pages/Planner/Clusters.tsx` | Add ideas count badge, "Generate Ideas" prominence |
| `pages/Planner/Ideas.tsx` | Add queued count indicator, clickable cluster name |
| `pages/Writer/Tasks.tsx` | Streamline status changes |
| `pages/Writer/Drafts.tsx` | Streamline status changes |
| `pages/Writer/ContentView.tsx` | Fix duplicate tags/categories, integrate images |
| `pages/Writer/Images.tsx` | Better integration with content workflow |
| `pages/Writer/Review.tsx` | Streamline status changes |
| `pages/Automation/AutomationPage.tsx` | Stage toggles, batch size, preview, filters, error retry |
| All progress modal components | Fix placeholder text, counts, wording |
| Notification dropdown component | Add AI run logging |
| Router/App.tsx | Remove KeywordOpportunities route |
| Sidebar component | Remove KeywordOpportunities link if present |
---
### Backend Work Required
| Area | Work |
|------|------|
| Automation stage control | API to save stage enable/disable preferences |
| Automation batch size | API to save batch size setting |
| Error recovery | API to retry failed items |
| Notification logging | Ensure AI runs are logged for notification display |
---

View File

@@ -0,0 +1,363 @@
# Section 4: ACCOUNT Modules - Audit & Action Plan
**Date:** December 27, 2025
**Status:** Finalized for Implementation
**Scope:** Account Settings, Plans & Billing, Usage (AI Models excluded - admin only)
---
## 4.1 Account Settings
**Route:** `/account/settings`
**File:** `pages/account/AccountSettingsPage.tsx`
**Tabs:** Account, Profile, Team
### Current Functionality
- **Account Tab:** Organization name, billing email, full billing address, tax ID/VAT
- **Profile Tab:** First/last name, email, phone, timezone, language, notifications, security
- **Team Tab:** List team members, invite via email, remove members, role display
---
### Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | Profile NOT connected to API | 🔴 Critical | Study existing backend - if profile API exists and is consistent with system, connect it. If not present, create consistent with existing API structure |
| 2 | Change Password does nothing | 🔴 Critical | Implement password change functionality |
| 3 | No role assignment on invite | High | Add role dropdown (Admin/Member) to invitation form |
| 4 | No role editing for members | High | Add ability to change member role after invitation |
| 5 | No email verification | High | Implement email verification flow when email is changed |
| 6 | Orphaned TeamManagement.tsx | High | Delete `pages/account/TeamManagement.tsx` - functionality exists in AccountSettingsPage |
| 7 | No 2FA option | Medium | Add two-factor authentication option in security section |
| 8 | No account deletion | Medium | Add account closure/deletion capability |
| 9 | No session management | Medium | Add view/revoke active sessions capability |
| 10 | No pending invitation management | Medium | Add ability to resend or cancel pending invitations |
| 11 | No team member limit display | Medium | Show "X of Y team members" based on plan limit |
| 12 | Inconsistent role system | Medium | Backend returns `is_admin` boolean but UI shows Admin/Member - align these |
---
### Implementation Notes
**For Issue #1 (Profile API):**
- First: Audit backend to check if profile endpoint exists
- If exists: Study implementation, verify consistency with other APIs, then connect frontend
- If not exists: Create new endpoint following existing API patterns in the codebase
- Fields to persist: first_name, last_name, email, phone, timezone, language, notification preferences
**For Issue #2 (Password change):**
- Implement secure password change requiring current password
- Validate new password meets requirements
- Consider session invalidation after password change
**For Issue #12 (Role consistency):**
- Decide on role system: boolean `is_admin` or role enum (admin/member/viewer)
- Align frontend display with backend data structure
---
## 4.2 Plans & Billing
**Route:** `/account/plans`
**Files:** `pages/account/PlansAndBillingPage.tsx`, `pages/Billing/CreditPurchase.tsx`
**Tabs:** Current Plan, Upgrade Plan, History
### Current Functionality
- **Current Plan:** Plan name, status, credits, balance, renewal date, features
- **Upgrade:** Pricing table, plan comparison, change policy
- **History:** Invoices with PDF download, payments, payment methods
### Payment Context
Currently using manual payment methods only (bank transfer, wallet). No automatic payment processing.
---
### Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | No proration preview | High | Show prorated amount before plan upgrade/downgrade |
| 2 | Credit purchase not linked | Medium | Link to credit purchase from Plans & Billing page |
| 3 | Cancellation is immediate | High | Add confirmation dialog before plan cancellation |
| 4 | No downgrade proration display | Medium | Show calculation when downgrading plan |
| 5 | Throttling errors surface to users | Medium | Replace raw throttling messages with user-friendly spinner/message |
| 6 | No billing cycle visualization | Medium | Make renewal date prominent, show billing cycle clearly |
| 7 | No cancellation reason collection | Low | Add optional reason selection when cancelling |
---
### Issues NOT Being Addressed (Per Discussion)
| Issue | Reason |
|-------|--------|
| No payment failure retry | Manual payment only - no auto-retry needed |
| Payment method UI incomplete | Manual payment only - limited methods by design |
---
### Implementation Notes
**For Issue #1 (Proration preview):**
- Before confirming plan change, show:
- Current plan remaining value
- New plan cost
- Prorated amount due/credited
- Calculate based on days remaining in billing cycle
**For Issue #3 (Cancellation confirmation):**
- Modal dialog: "Are you sure you want to cancel?"
- Show what they'll lose (features, remaining credits)
- Require explicit confirmation
**For Issue #5 (Throttling messages):**
- Intercept throttling errors
- Show spinner with "Processing your request..." instead of technical error
- Implement proper retry logic behind the scenes
---
## 4.3 Usage
**Route:** `/account/usage`
**Files:** `pages/account/UsageAnalyticsPage.tsx`, `pages/account/UsageLimits.tsx`, `pages/account/CreditActivity.tsx`
**Tabs:** Your Limits & Usage, Credit History, API Activity
### Current Functionality
- **Quick Stats:** Credits left, used this month, monthly limit, usage %
- **Limits:** Hard limits (sites, users, keywords, clusters) + Monthly limits
- **Credit History:** Transaction log with type, amount, description
- **API Activity:** Call statistics, endpoint breakdown
---
### Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | API Activity is HARDCODED | 🔴 Critical | Implement real API activity tracking - replace fake values (1,234, 567, 342) |
| 2 | Success rate is fake | 🔴 Critical | Calculate and display real success rate from actual data |
| 3 | No usage alerts | High | Implement default alerts at usage thresholds (80%, 90%, 100%) - sent to all users automatically |
| 4 | No per-site usage | High | Add breakdown showing which site consumed what |
| 5 | No usage forecasting | Medium | Add "At current rate, you'll reach limit in X days" |
| 6 | No actionable insights | Medium | Suggest upgrade when approaching limits |
| 7 | Credit history lacks context | Medium | Add links from credit transactions to related content/operations |
---
### Issues NOT Being Addressed (Per Discussion)
| Issue | Reason |
|-------|--------|
| No per-user usage | Not needed for current phase |
| No usage export | Not needed for current phase |
---
### Implementation Notes
**For Issue #1 & #2 (Real API Activity):**
- Backend needs to log API calls (may already exist)
- Track: endpoint, timestamp, status (success/fail), response time
- Aggregate for display: total calls, success rate, calls by endpoint
- Replace hardcoded values with real calculated data
**For Issue #3 (Usage alerts):**
- Default behavior: all users receive alerts
- Trigger points: 80%, 90%, 100% of limits
- Delivery: in-app notification + email
- No user preferences needed - alerts go to everyone
**For Issue #4 (Per-site usage):**
- Break down credit usage by site
- Show: "Site A: 450 credits, Site B: 230 credits"
- Pie chart or table visualization
---
## 4.4 AI Models (Admin Only)
**Status:** ❌ SKIP ENTIRELY
Not part of user-facing modules. Admin only - no changes needed.
---
## 4.5 ACCOUNT Cross-Module Issues (MAJOR)
These are architectural issues requiring proper analysis and solutions.
### Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | Multiple credit balance sources | 🔴 Critical | Establish ONE source of truth for credit balance. Analyze: Plans page, Usage page, billingStore - determine which is authoritative, remove others, refactor all references |
| 2 | Fragmented billing pages | High | **AI Agent Task:** Audit system to identify all billing-related pages/functions, find duplicates/redundancies, propose consolidation solution |
| 3 | Legacy routes still exist | High | Remove legacy routes (`/billing/overview`, `/team`, `/profile`), remove redirect code, refactor any references throughout codebase |
| 4 | No notification preferences | Low | Not needed - default alerts go to all users |
---
### Implementation Notes
**For Issue #1 (Single source of truth for balance):**
*Phase 1: Analysis*
- Identify all places that fetch/display credit balance:
- `billingStore.ts` (Zustand store)
- Plans & Billing page
- Usage page
- Dashboard (if applicable)
- Header component (if showing balance)
- Document how each fetches data (API endpoint, frequency)
*Phase 2: Decision*
- Determine which should be THE source:
- Likely `billingStore` as central state management
- Single API endpoint for balance data
- All components should read from this one source
*Phase 3: Implementation*
- Refactor all components to use single source
- Remove duplicate API calls
- Remove duplicate state management
- Ensure consistency across all views
**For Issue #2 (Fragmented billing pages):**
*AI Agent Audit Task:*
```
TASK: Billing Pages Consolidation Audit
1. DISCOVER all billing-related files:
- pages/account/PlansAndBillingPage.tsx
- pages/Billing/CreditPurchase.tsx
- pages/Billing/Credits.tsx (if exists)
- pages/Settings/CreditsAndBilling.tsx (if exists)
- Any other billing-related pages
2. ANALYZE each page:
- What functionality does it provide?
- What routes point to it?
- Is it actively used or orphaned?
- Does it duplicate functionality from another page?
3. IDENTIFY redundancies:
- Same functionality in multiple places
- Overlapping features
- Dead/orphaned pages
4. PROPOSE solution:
- Which pages to keep
- Which pages to merge
- Which pages to delete
- Final consolidated structure
5. DOCUMENT migration path:
- What routes need updating
- What references need changing
- What imports need refactoring
```
**For Issue #3 (Legacy routes removal):**
*Routes to remove:*
- `/billing/overview`
- `/team`
- `/profile`
*Process:*
1. Find route definitions in router/App.tsx
2. Remove route entries
3. Find and remove redirect logic
4. Search codebase for any links to these routes
5. Update or remove those links
6. Delete any orphaned components only used by these routes
---
## Summary
### Total Issues by Section
| Section | Critical | High | Medium | Low | Total |
|---------|----------|------|--------|-----|-------|
| 4.1 Account Settings | 2 | 4 | 6 | 0 | 12 |
| 4.2 Plans & Billing | 0 | 2 | 4 | 1 | 7 |
| 4.3 Usage | 2 | 2 | 3 | 0 | 7 |
| 4.4 AI Models | - | - | - | - | Skipped |
| 4.5 Cross-Module | 1 | 2 | 0 | 1 | 4 |
| **TOTAL** | **5** | **10** | **13** | **2** | **30** |
---
### Critical Items (Must Fix)
1. **Account Settings** - Profile tab not connected to API
2. **Account Settings** - Password change does nothing
3. **Usage** - API Activity tab shows hardcoded fake data
4. **Usage** - Success rate is fake (98.5%)
5. **Cross-Module** - Multiple credit balance sources causing inconsistency
---
### High Priority Items
1. Account Settings - Role assignment on invite
2. Account Settings - Role editing for members
3. Account Settings - Email verification
4. Account Settings - Delete orphaned TeamManagement.tsx
5. Plans & Billing - Proration preview
6. Plans & Billing - Cancellation confirmation dialog
7. Usage - Usage alerts at thresholds
8. Usage - Per-site usage breakdown
9. Cross-Module - Billing pages consolidation audit
10. Cross-Module - Legacy routes removal
---
### Files to Delete
| File | Reason |
|------|--------|
| `pages/account/TeamManagement.tsx` | Orphaned - functionality in AccountSettingsPage |
| Legacy route redirect handlers | After removing `/billing/overview`, `/team`, `/profile` |
| Duplicate billing pages | After consolidation audit determines which to remove |
---
### Files to Modify
| File | Changes |
|------|---------|
| `pages/account/AccountSettingsPage.tsx` | Connect profile API, implement password change, add role management, add invitation management |
| `pages/account/PlansAndBillingPage.tsx` | Add proration preview, cancellation confirmation, link credit purchase |
| `pages/account/UsageAnalyticsPage.tsx` | Implement real API activity, add per-site breakdown, add forecasting |
| `store/billingStore.ts` | Establish as single source of truth for balance |
| Router/App.tsx | Remove legacy routes |
| All components using credit balance | Refactor to use single source |
---
### Backend Work Required
| Area | Work |
|------|------|
| Profile API | Audit existing endpoint OR create new one consistent with API structure |
| Password change API | Implement secure password change endpoint |
| API Activity tracking | Ensure backend logs API calls, create endpoint to retrieve activity data |
| Usage alerts | Backend service to check thresholds and trigger notifications |
| Per-site usage | Endpoint to return credit usage broken down by site |
---
### AI Agent Specific Tasks
| Task | Description |
|------|-------------|
| Billing Pages Audit | Discover all billing pages, analyze functionality, identify redundancies, propose consolidation |
| Credit Balance Refactor | Identify all balance sources, determine single source, refactor all references |
| Legacy Routes Cleanup | Remove routes, remove redirects, update all references |
| Profile API Study | Check if endpoint exists, verify consistency, connect or create |
---

View File

@@ -0,0 +1,610 @@
# Section 5: HELP Module - Audit & Action Plan
**Date:** December 27, 2025
**Status:** Finalized for Implementation
**Scope:** Help Center, Documentation, Support Channels
---
## 5.1 Help & Docs
**Route:** `/help`
**File:** `pages/Help/HelpCenter.tsx`
### Current Functionality
- Table of Contents with jump-to-section navigation
- Getting Started: Quick Start Guide, Workflow Overview
- Planner Module: Keywords, Clusters, Ideas documentation
- Writer Module: Tasks, Content, Images documentation
- Automation Setup overview
- FAQ section (~20 questions)
- Support CTA buttons (non-functional)
---
### Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | Support dropdown link broken | 🔴 Critical | Fix link - currently goes to `/profile` which is 404 |
| 2 | Contact Support button does nothing | 🔴 Critical | Implement mailto: or external support URL |
| 3 | Feature Request button does nothing | 🔴 Critical | Implement mailto: or external feedback URL |
| 4 | No actual support channel | 🔴 Critical | Configure working support email/system |
| 5 | Placeholder pages exist | High | **DELETE** `/help/docs`, `/help/system-testing`, `/help/function-testing` pages |
| 6 | No search functionality | Medium | Add search within help content |
| 7 | No contextual help | Low | Consider adding in-app tooltips or "?" icons (future) |
| 8 | Stale content risk | Medium | Help content is hardcoded in TSX - document update process |
---
### Pages to Delete
| File | Route | Reason |
|------|-------|--------|
| `pages/Help/Documentation.tsx` | `/help/docs` | Empty placeholder - not needed |
| `pages/Help/SystemTesting.tsx` | `/help/system-testing` | Empty placeholder - not needed |
| `pages/Help/FunctionTesting.tsx` | `/help/function-testing` | Empty placeholder - not needed |
---
## 5.2 Documentation Requirements (NEW)
### Documentation Approach
Create detailed, step-by-step documentation for each module and flow. Documentation should be:
- **Easy to use** - Clear language, no technical jargon
- **Step-by-step** - Numbered instructions with expected outcomes
- **Visual** - Screenshots or diagrams where helpful
- **Current** - Matches exactly how the system is implemented
---
### Modules to Document
| Module | Status | Documentation Needed |
|--------|--------|---------------------|
| **Dashboard** | Active | Overview, metrics explanation, navigation |
| **Add Keywords** | Active | How to browse, filter, select, add keywords |
| **Content Settings** | Active | Content Generation, Publishing, Image Settings tabs |
| **Sites** | Active | Site creation, WordPress integration, site management |
| **Planner - Keywords** | Active | Adding, managing, clustering keywords |
| **Planner - Clusters** | Active | Understanding clusters, generating ideas |
| **Planner - Ideas** | Active | Managing ideas, queueing to writer |
| **Writer - Queue** | Active | Task management, content generation |
| **Writer - Drafts** | Active | Reviewing drafts, status management |
| **Writer - Images** | Active | Image generation, management |
| **Writer - Review** | Active | Review process, approval workflow |
| **Writer - Published** | Active | Published content, WordPress sync |
| **Automation** | Active | Pipeline setup, scheduling, monitoring |
| **Account Settings** | Active | Account, Profile, Team management |
| **Plans & Billing** | Active | Plans, upgrades, payment, invoices |
| **Usage** | Active | Understanding limits, credit usage, history |
| Linker | ❌ Not Active | Skip - not documenting |
| Optimizer | ❌ Not Active | Skip - not documenting |
| Sites/Site Builder | ❌ Not Active | Skip - legacy feature removed |
| Thinker | Admin Only | Skip - not user-facing |
---
### Documentation Structure
For each module, document:
```
## [Module Name]
### Overview
Brief description of what this module does and its purpose in the workflow.
### How to Access
- Navigation path to reach this module
- Direct URL
### Step-by-Step Guide
#### [Task 1 Name]
1. Step one with specific instruction
2. Step two with expected result
3. Step three...
#### [Task 2 Name]
1. Step one...
2. Step two...
### Key Features
- Feature 1: What it does
- Feature 2: What it does
### Tips & Best Practices
- Tip 1
- Tip 2
### Common Questions
Q: Question?
A: Answer
### Troubleshooting
- Problem: X
Solution: Y
```
---
### Detailed Documentation Outlines
#### Dashboard Documentation
```
## Dashboard
### Overview
Your command center showing workflow progress, key metrics, and quick actions.
### Metrics Explained
- Keywords: Total keywords in your workflow
- Articles: Content pieces created
- Images: Images generated
- Completion %: Overall workflow progress
### Workflow Progress
Visual pipeline showing: Sites → Keywords → Clusters → Ideas → Content → Published
### Quick Actions
- [Action 1]: What it does, when to use
- [Action 2]: What it does, when to use
### Setup Checklist
Understanding the setup completion indicator...
```
#### Add Keywords Documentation
```
## Add Keywords
### Overview
Browse and add keywords from our curated database to your content workflow.
### Prerequisites
- Active site with industry and sector selected
### Step-by-Step: Adding Keywords
1. Navigate to SETUP → Add Keywords
2. Browse available keywords filtered by your site's industry/sector
3. Use filters to narrow results:
- Search: Find specific keywords
- Country: Filter by target country
- Difficulty: Filter by SEO difficulty
4. Select keywords by clicking checkboxes
5. Click "Add to Workflow" button
6. Keywords are now in your Planner
### After Adding Keywords
Click "Next: Plan Your Content →" to proceed to the Planner module.
### Tips
- Start with 10-20 keywords to test your workflow
- Mix high and low difficulty keywords
- Focus on your core topics first
```
#### Planner Documentation
```
## Planner
### Overview
Organize keywords into topic clusters and generate content ideas.
### The Planner Flow
Keywords → Clusters → Ideas → Writer Queue
---
### Keywords Tab
#### Adding Keywords Manually
1. Click "Add Keyword" button
2. Enter keyword text
3. Set initial status
4. Save
#### Clustering Keywords
1. Select keywords to cluster (checkboxes)
2. Click "Auto-Cluster" button
3. AI analyzes and groups related keywords
4. Review created clusters in Clusters tab
---
### Clusters Tab
#### Understanding Clusters
Clusters group related keywords by topic for focused content creation.
#### Generating Ideas from Clusters
1. Select cluster(s) to generate ideas for
2. Click "Generate Ideas" button
3. AI creates content ideas based on cluster keywords
4. Review ideas in Ideas tab
#### Cluster Progress
- Badge shows "X ideas" for clusters with generated ideas
- "No ideas yet" indicates pending clusters
---
### Ideas Tab
#### Reviewing Ideas
Each idea shows: title, target keyword, cluster source
#### Sending Ideas to Writer
1. Select ideas to write (checkboxes)
2. Click "Queue to Writer" button
3. Ideas become tasks in Writer Queue
```
#### Writer Documentation
```
## Writer
### Overview
Generate, review, and publish AI-created content.
### The Writer Flow
Queue → Drafts → Review → Published
---
### Queue Tab (Tasks)
#### Understanding Tasks
Tasks are content pieces waiting to be generated.
#### Generating Content
1. Find task in queue
2. Click "Generate Content" action
3. AI writes the article
4. Content moves to Drafts
---
### Drafts Tab
#### Reviewing Drafts
1. Click on draft to view full content
2. Review AI-generated article
3. Check content quality and accuracy
#### Moving to Review
1. Select draft(s)
2. Change status to "Review"
3. Content moves to Review tab
---
### Images Tab
#### Generating Images
1. Select content needing images
2. Click "Generate Images"
3. AI creates images based on content
4. Images attach to content
---
### Review Tab
#### Final Review Process
1. Review content and images together
2. Make any final adjustments
3. Approve for publishing
#### Publishing to WordPress
1. Select reviewed content
2. Click "Publish" button
3. Content syncs to WordPress
4. Moves to Published tab
---
### Published Tab
#### Viewing Published Content
- See all published articles
- WordPress sync status
- Publication dates
```
#### Automation Documentation
```
## Automation
### Overview
Automate your entire content pipeline from keywords to published articles.
### Pipeline Stages
1. Keywords → Clustering
2. Clusters → Idea Generation
3. Ideas → Task Creation
4. Tasks → Content Generation
5. Content → Image Prompt Extraction
6. Prompts → Image Generation
7. Review Gate
---
### Setting Up Automation
#### Configure Schedule
1. Set frequency (daily, weekly, etc.)
2. Set preferred run time
3. Enable/disable automation
#### Stage Controls
Enable or disable individual stages as needed.
#### Batch Size
Set how many items process per run.
---
### Running Automation
#### Manual Run
Click "Run Now" to start pipeline immediately.
#### Monitoring Progress
- Real-time progress display
- Stage-by-stage status
- Activity log
#### Handling Errors
- Failed items shown in log
- Click "Retry" to reprocess failed items
---
### Best Practices
- Start with small batch sizes
- Monitor first few runs closely
- Review automation output regularly
```
#### Account Settings Documentation
```
## Account Settings
### Overview
Manage your account, profile, and team.
---
### Account Tab
- Organization name
- Billing email
- Billing address
- Tax ID/VAT number
---
### Profile Tab
- Personal information (name, email, phone)
- Timezone and language preferences
- Notification settings
- Security settings (password, 2FA)
#### Changing Password
1. Go to Profile tab
2. Click "Change Password"
3. Enter current password
4. Enter and confirm new password
5. Save changes
---
### Team Tab
#### Inviting Team Members
1. Click "Invite Member"
2. Enter email address
3. Select role (Admin or Member)
4. Send invitation
#### Managing Members
- View all team members
- Change member roles
- Remove members
#### Team Limits
Your plan allows X team members. Currently using Y.
```
#### Plans & Billing Documentation
```
## Plans & Billing
### Overview
Manage your subscription, view invoices, and track payments.
---
### Current Plan Tab
- Plan name and features
- Credit balance
- Renewal date
- Usage summary
---
### Upgrade Plan Tab
#### Changing Plans
1. Review available plans
2. Compare features
3. Click "Upgrade" on desired plan
4. Review proration (credit for remaining time)
5. Confirm change
#### Cancelling Plan
1. Click "Cancel Plan"
2. Review what you'll lose
3. Confirm cancellation
---
### History Tab
- Invoice history with PDF download
- Payment records
- Payment method management
```
#### Usage Documentation
```
## Usage
### Overview
Track your credit usage, limits, and activity.
---
### Your Limits & Usage Tab
#### Understanding Limits
- **Hard Limits:** Maximum allowed (sites, users, keywords)
- **Monthly Limits:** Reset each billing cycle
#### Credit Balance
- Credits remaining
- Credits used this month
- Monthly allocation
---
### Credit History Tab
Transaction log showing all credit activity:
- Credit additions (plan, purchases)
- Credit usage (content, images, etc.)
---
### API Activity Tab
- Total API calls
- Success rate
- Activity by endpoint
---
### Usage Alerts
Automatic alerts at 80%, 90%, and 100% of limits.
```
---
## 5.3 FAQ Updates
### Current FAQ Topics (~20 questions)
Review and update existing FAQ to ensure accuracy.
### Additional FAQ Topics Needed
| Topic | Questions to Add |
|-------|------------------|
| Credits | How credits work, what uses credits, credit costs |
| Automation | How to set up, troubleshooting, best practices |
| WordPress | Integration setup, sync issues, troubleshooting |
| Content | Generation tips, quality settings, editing |
| Images | Generation options, formats, sizes |
| Billing | Payment methods, invoices, plan changes |
---
## Summary
### Total Issues
| Category | Critical | High | Medium | Low | Total |
|----------|----------|------|--------|-----|-------|
| Support/Links | 4 | 0 | 0 | 0 | 4 |
| Pages to Delete | 0 | 1 | 0 | 0 | 1 |
| Features | 0 | 0 | 2 | 1 | 3 |
| Documentation | 0 | 1 | 0 | 0 | 1 |
| **TOTAL** | **4** | **2** | **2** | **1** | **9** |
---
### Critical Items (Must Fix)
1. Fix Support dropdown link (currently 404)
2. Implement Contact Support button (mailto: or support URL)
3. Implement Feature Request button (mailto: or feedback URL)
4. Configure working support channel
---
### High Priority Items
1. Delete placeholder pages (`/help/docs`, `/help/system-testing`, `/help/function-testing`)
2. Create comprehensive step-by-step documentation for all active modules
---
### Files to Delete
| File | Reason |
|------|--------|
| `pages/Help/Documentation.tsx` | Empty placeholder |
| `pages/Help/SystemTesting.tsx` | Empty placeholder |
| `pages/Help/FunctionTesting.tsx` | Empty placeholder |
---
### Files to Modify
| File | Changes |
|------|---------|
| `pages/Help/HelpCenter.tsx` | Fix support link, implement button handlers, add comprehensive documentation, update FAQ |
| Router/App.tsx | Remove routes for deleted help pages |
---
### Documentation Modules (Do NOT Document)
| Module | Reason |
|--------|--------|
| Linker | Not active |
| Optimizer | Not active |
| Sites/Site Builder | Legacy feature removed |
| Thinker | Admin only - not user-facing |
---
### Documentation Deliverables
Create detailed step-by-step documentation for:
1. ✅ Dashboard
2. ✅ Add Keywords
3. ✅ Content Settings
4. ✅ Sites (WordPress integration focus, not site builder)
5. ✅ Planner - Keywords
6. ✅ Planner - Clusters
7. ✅ Planner - Ideas
8. ✅ Writer - Queue/Tasks
9. ✅ Writer - Drafts
10. ✅ Writer - Images
11. ✅ Writer - Review
12. ✅ Writer - Published
13. ✅ Automation
14. ✅ Account Settings
15. ✅ Plans & Billing
16. ✅ Usage
---

View File

@@ -0,0 +1,464 @@
# Section 6: Sidebar & Navigation - Audit & Action Plan
**Date:** December 27, 2025
**Status:** Finalized for Implementation
**Scope:** Sidebar structure, navigation restructure (tabs → sidebar dropdowns)
---
## 6.1 Current Navigation Structure
**File:** `layout/AppSidebar.tsx`
```
Dashboard (standalone)
├─ SETUP
│ ├─ Add Keywords → /setup/add-keywords
│ ├─ Content Settings → /account/content-settings
│ ├─ Sites → /sites
│ └─ Thinker (admin only) → /thinker/prompts
├─ WORKFLOW
│ ├─ Planner → /planner/keywords
│ ├─ Writer → /writer/tasks
│ ├─ Automation → /automation
│ ├─ Linker → /linker/content [NOT ACTIVE - REMOVE]
│ └─ Optimizer → /optimizer/content [NOT ACTIVE - REMOVE]
├─ ACCOUNT
│ ├─ Account Settings → /account/settings
│ ├─ Plans & Billing → /account/plans
│ ├─ Usage → /account/usage
│ └─ AI Models (admin only) → /settings/integration
└─ HELP
└─ Help & Docs → /help
```
### Current In-Page Navigation (TO BE REMOVED)
| Module | Current Tabs/Buttons | Location |
|--------|---------------------|----------|
| **Planner** | Keywords, Clusters, Ideas | Tab buttons in page header |
| **Writer** | Queue, Drafts, Images, Review, Published | Tab buttons in page header |
| **Account Settings** | Account, Profile, Team | Tabs in page |
| **Plans & Billing** | Current Plan, Upgrade Plan, History | Tabs in page |
| **Usage** | Your Limits & Usage, Credit History, API Activity | Tabs in page |
| **Content Settings** | Content Generation, Publishing, Image Settings | Tabs in page |
---
## 6.2 Issues to Address
| # | Issue | Priority | Action |
|---|-------|----------|--------|
| 1 | Linker in navigation | High | **REMOVE** - not active module |
| 2 | Optimizer in navigation | High | **REMOVE** - not active module |
| 3 | KeywordOpportunities reference | High | **REMOVE** - page being deleted |
| 4 | Help sub-pages in routes | High | **REMOVE** - pages being deleted |
| 5 | Menu order incorrect | High | Reorder SETUP: Sites → Add Keywords → Content Settings → Thinker |
| 6 | Tabs/buttons clutter page headers | High | **MOVE to sidebar dropdowns** |
| 7 | No breadcrumb navigation | Medium | Add breadcrumbs (space now available in header) |
| 8 | No "Next Step" guidance | Medium | Add contextual next step (space now available in header) |
| 9 | No active section highlighting | Medium | Highlight current section/page in sidebar |
| 10 | Credit purchase not in sidebar | Low | Accessible from Plans & Billing |
---
## 6.3 New Navigation Structure: Sidebar Dropdowns
### Decision: Move All Sub-Navigation to Sidebar
**Rationale:**
- New app launch - no existing user patterns to unlearn
- Desktop-only app - no mobile concerns
- Same number of clicks - active dropdown stays expanded automatically
- Cleaner page headers - space for breadcrumbs and "Next Step" CTAs
- Better discoverability - all navigation visible in one place
- Scalable - easy to add new sub-pages in future
- Consistent pattern across all modules
### New Sidebar Structure
```
Dashboard
SETUP
├─ Sites ▼
│ ├─ All Sites → /sites
│ └─ Site Settings → /sites/:id/settings (contextual)
├─ Add Keywords → /setup/add-keywords
├─ Content Settings ▼
│ ├─ Content Generation → /account/content-settings/generation
│ ├─ Publishing → /account/content-settings/publishing
│ └─ Image Settings → /account/content-settings/images
└─ Thinker (admin only) ▼
├─ Prompts → /thinker/prompts
└─ Author Profiles → /thinker/author-profiles
WORKFLOW
├─ Planner ▼
│ ├─ Keywords → /planner/keywords
│ ├─ Clusters → /planner/clusters
│ └─ Ideas → /planner/ideas
├─ Writer ▼
│ ├─ Queue → /writer/tasks
│ ├─ Drafts → /writer/drafts
│ ├─ Images → /writer/images
│ ├─ Review → /writer/review
│ └─ Published → /writer/published
└─ Automation → /automation
ACCOUNT
├─ Account Settings ▼
│ ├─ Account → /account/settings/account
│ ├─ Profile → /account/settings/profile
│ └─ Team → /account/settings/team
├─ Plans & Billing ▼
│ ├─ Current Plan → /account/plans/current
│ ├─ Upgrade Plan → /account/plans/upgrade
│ └─ History → /account/plans/history
├─ Usage ▼
│ ├─ Limits & Usage → /account/usage/limits
│ ├─ Credit History → /account/usage/credits
│ └─ API Activity → /account/usage/api
└─ AI Models (admin only) → /settings/integration
HELP
└─ Help & Docs → /help
```
---
## 6.4 Sidebar Behavior Specification
### Dropdown Behavior
1. **Active Page Detection:**
- When user navigates to any page, its parent dropdown auto-expands
- Current page is highlighted within the dropdown
- Active dropdown stays expanded - does NOT collapse
2. **Click Behavior:**
- Click on dropdown parent (if not expanded) → expands dropdown
- Click on dropdown parent (if expanded) → collapses dropdown
- Click on sub-item → navigates to that page, dropdown stays open
- Only active page's dropdown auto-opens on page load
3. **Visual States:**
```
Planner ▼ ← Parent: expanded indicator
Keywords ← Normal sub-item
Clusters ● ← Active page: highlighted
Ideas ← Normal sub-item
Writer ▶ ← Collapsed (not active)
```
4. **Persistence:**
- Active dropdown remains expanded during navigation within that module
- On direct URL access or refresh, opens dropdown containing current page
- Non-active dropdowns default to collapsed state
### Example Flow
User is on `/planner/clusters`:
```
WORKFLOW
├─ Planner ▼ [EXPANDED - contains active page]
│ ├─ Keywords [clickable]
│ ├─ Clusters ● [ACTIVE - highlighted]
│ └─ Ideas [clickable]
├─ Writer ▶ [COLLAPSED]
└─ Automation [no dropdown - single page]
```
User clicks "Ideas":
- Navigates to `/planner/ideas`
- Planner dropdown stays expanded
- "Ideas" becomes highlighted
- "Clusters" returns to normal state
User clicks "Writer":
- Writer dropdown expands
- Planner dropdown can stay expanded or collapse (design choice)
- Shows Writer sub-items
---
## 6.5 Page Header Structure (After Tabs Removal)
### Before (Current)
```
┌─────────────────────────────────────────────────────────────────────┐
│ [Keywords] [Clusters] [Ideas] [+ Add] [Bulk ▼] [Filter] [Search] │
├─────────────────────────────────────────────────────────────────────┤
│ Content area... │
```
### After (New)
```
┌─────────────────────────────────────────────────────────────────────┐
│ Planner > Clusters [+ Add] [Bulk ▼] [Next: Ideas →] │
├─────────────────────────────────────────────────────────────────────┤
│ [Filter] [Search...] │
├─────────────────────────────────────────────────────────────────────┤
│ Content area... │
```
### Header Components
| Component | Position | Purpose |
|-----------|----------|---------|
| Breadcrumb | Left | Shows: Section > Page (e.g., "Planner > Clusters") |
| Primary Actions | Center-Right | Add, Bulk actions |
| Next Step CTA | Right | Contextual "Next: [Action] →" button |
| Filters/Search | Below header or inline | Data filtering |
---
## 6.6 Breadcrumb Implementation
### Breadcrumb Pattern
```
[Section] > [Page]
[Section] > [Page] > [Detail]
```
### Examples
| Route | Breadcrumb Display |
|-------|-------------------|
| `/planner/keywords` | Planner > Keywords |
| `/planner/clusters` | Planner > Clusters |
| `/planner/clusters/:id` | Planner > Clusters > [Cluster Name] |
| `/writer/drafts` | Writer > Drafts |
| `/writer/drafts/:id` | Writer > Drafts > [Content Title] |
| `/account/settings/team` | Account Settings > Team |
| `/account/plans/upgrade` | Plans & Billing > Upgrade Plan |
### Implementation
- Create reusable `<Breadcrumb />` component
- Each page defines its breadcrumb trail via props or route config
- Clickable links except for current page (last item)
---
## 6.7 "Next Step" CTA Implementation
### Contextual Next Steps
| Current Location | Condition | Next Step CTA |
|------------------|-----------|---------------|
| Sites | Site created | "Next: Add Keywords →" |
| Add Keywords | Keywords added (count > 0) | "Next: Plan Your Content →" |
| Planner > Keywords | Has unclustered keywords | "Next: Cluster Keywords →" |
| Planner > Clusters | Cluster selected/has clusters | "Next: Generate Ideas →" |
| Planner > Ideas | Has ideas | "Next: Queue to Writer →" |
| Writer > Queue | Has tasks | "Next: Generate Content →" |
| Writer > Drafts | Has drafts | "Next: Review Drafts →" |
| Writer > Review | Has reviewed content | "Next: Publish →" |
### Implementation
- Create `<NextStepCTA />` component
- Each page determines when to show and what action
- Button styled prominently but not intrusive
- Links to logical next step in workflow
---
## 6.8 Route Updates Required
### Routes to Add/Update
To support sidebar navigation, routes need restructuring:
| Current Route | New Route | Notes |
|---------------|-----------|-------|
| `/account/content-settings` | `/account/content-settings/generation` | Default to first sub-page |
| (same page, different tab) | `/account/content-settings/publishing` | Separate route |
| (same page, different tab) | `/account/content-settings/images` | Separate route |
| `/account/settings` | `/account/settings/account` | Default to first sub-page |
| (same page, different tab) | `/account/settings/profile` | Separate route |
| (same page, different tab) | `/account/settings/team` | Separate route |
| `/account/plans` | `/account/plans/current` | Default to first sub-page |
| (same page, different tab) | `/account/plans/upgrade` | Separate route |
| (same page, different tab) | `/account/plans/history` | Separate route |
| `/account/usage` | `/account/usage/limits` | Default to first sub-page |
| (same page, different tab) | `/account/usage/credits` | Separate route |
| (same page, different tab) | `/account/usage/api` | Separate route |
### Routes to Remove
| Route | Reason |
|-------|--------|
| `/linker/*` | Module not active |
| `/optimizer/*` | Module not active |
| `/planner/keyword-opportunities` | Page deleted |
| `/help/docs` | Page deleted |
| `/help/system-testing` | Page deleted |
| `/help/function-testing` | Page deleted |
| `/billing/overview` | Legacy route |
| `/team` | Legacy route |
| `/profile` | Legacy route |
---
## 6.9 Implementation Plan
### Phase 1: Sidebar Restructure
1. **Update `AppSidebar.tsx`:**
- Add dropdown functionality for multi-page modules
- Implement expand/collapse with active state detection
- Remove Linker and Optimizer
- Reorder SETUP: Sites → Add Keywords → Content Settings → Thinker
- Add visual indicators (▼ expanded, ▶ collapsed, ● active)
2. **Create dropdown data structure:**
```typescript
const sidebarConfig = [
{
section: 'SETUP',
items: [
{ label: 'Sites', path: '/sites', icon: Globe },
{ label: 'Add Keywords', path: '/setup/add-keywords', icon: Key },
{
label: 'Content Settings',
icon: Settings,
children: [
{ label: 'Content Generation', path: '/account/content-settings/generation' },
{ label: 'Publishing', path: '/account/content-settings/publishing' },
{ label: 'Image Settings', path: '/account/content-settings/images' },
]
},
// ... etc
]
},
// ... other sections
];
```
### Phase 2: Route Updates
1. **Update Router/App.tsx:**
- Add new sub-routes for tabbed pages
- Set up redirects from parent routes to default child
- Remove deleted/inactive routes
2. **Example route structure:**
```typescript
// Content Settings
<Route path="/account/content-settings" element={<Navigate to="/account/content-settings/generation" />} />
<Route path="/account/content-settings/generation" element={<ContentSettingsGeneration />} />
<Route path="/account/content-settings/publishing" element={<ContentSettingsPublishing />} />
<Route path="/account/content-settings/images" element={<ContentSettingsImages />} />
```
### Phase 3: Page Header Updates
1. **Remove tab components from all pages:**
- Planner (Keywords, Clusters, Ideas tabs)
- Writer (Queue, Drafts, Images, Review, Published tabs)
- Account Settings (Account, Profile, Team tabs)
- Plans & Billing (Current, Upgrade, History tabs)
- Usage (Limits, Credits, API tabs)
- Content Settings (Generation, Publishing, Images tabs)
2. **Add Breadcrumb component to each page**
3. **Add NextStepCTA component where applicable**
4. **Reorganize header layout:**
- Left: Breadcrumb
- Right: Actions + Next Step CTA
### Phase 4: Component Creation
1. **Create `components/navigation/Breadcrumb.tsx`**
2. **Create `components/navigation/NextStepCTA.tsx`**
3. **Create `components/navigation/SidebarDropdown.tsx`** (if not using existing UI library component)
---
## Summary
### Total Issues
| Category | High | Medium | Low | Total |
|----------|------|--------|-----|-------|
| Remove inactive modules | 2 | 0 | 0 | 2 |
| Remove deleted pages | 2 | 0 | 0 | 2 |
| Menu order | 1 | 0 | 0 | 1 |
| Navigation restructure | 1 | 0 | 0 | 1 |
| New features | 0 | 3 | 1 | 4 |
| **TOTAL** | **6** | **3** | **1** | **10** |
---
### High Priority Items
1. Remove Linker from sidebar navigation
2. Remove Optimizer from sidebar navigation
3. Remove KeywordOpportunities route references
4. Remove Help sub-page routes
5. Reorder SETUP menu: Sites → Add Keywords → Content Settings → Thinker
6. **Implement sidebar dropdown navigation (replace all tabs)**
---
### Medium Priority Items
1. Add breadcrumb navigation component
2. Add "Next Step" contextual guidance
3. Add active section highlighting in sidebar
---
### Files to Delete
| File | Reason |
|------|--------|
| Tab components in page headers | Replaced by sidebar navigation |
| Any standalone tab navigation components | No longer needed |
---
### Files to Create
| File | Purpose |
|------|---------|
| `components/navigation/Breadcrumb.tsx` | Reusable breadcrumb component |
| `components/navigation/NextStepCTA.tsx` | Contextual next step button |
| Possibly split page components | If current tabbed pages are single files, may need to split |
---
### Files to Modify
| File | Changes |
|------|---------|
| `layout/AppSidebar.tsx` | Complete restructure with dropdowns, remove inactive modules, reorder |
| `Router/App.tsx` | Add sub-routes, remove inactive routes, add redirects |
| `pages/Planner/*.tsx` | Remove tab navigation from header |
| `pages/Writer/*.tsx` | Remove tab navigation from header |
| `pages/account/AccountSettingsPage.tsx` | Split into separate route components OR remove tabs |
| `pages/account/PlansAndBillingPage.tsx` | Split into separate route components OR remove tabs |
| `pages/account/UsageAnalyticsPage.tsx` | Split into separate route components OR remove tabs |
| `pages/account/ContentSettingsPage.tsx` | Split into separate route components OR remove tabs |
| All page headers | Add Breadcrumb, reorganize layout, add NextStepCTA |
---
### Implementation Decision
**CONFIRMED: Implement sidebar-based navigation with dropdowns**
- Remove all tab/button navigation from page headers
- All sub-navigation moves to sidebar as expandable dropdowns
- Active dropdown stays expanded (same click count as current tabs)
- Page headers gain space for breadcrumbs and "Next Step" CTAs
- Clean, consistent navigation pattern across all modules
---