header rekated fixes
This commit is contained in:
179
docs/30-FRONTEND/PAGE-REQUIREMENTS.md
Normal file
179
docs/30-FRONTEND/PAGE-REQUIREMENTS.md
Normal file
@@ -0,0 +1,179 @@
|
||||
# Page Requirements - Site & Sector Selectors
|
||||
|
||||
This document outlines all pages in the application and their requirements for site/sector selectors.
|
||||
|
||||
## Legend
|
||||
- **Site Selector**: Whether the page needs a site selector dropdown
|
||||
- **Sector Selector**: Whether the page needs a sector selector dropdown
|
||||
- **Implementation**: How the selectors should behave on this page
|
||||
- **Next Action**: Recommended workflow guidance for Planner/Writer pages
|
||||
|
||||
---
|
||||
|
||||
## Planner Module (Content Planning)
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Keywords | `/planner/keywords` | ✅ Required | ✅ Required | Filter keywords by site/sector | `{count} selected → Auto-Cluster` OR `{clustered} clustered → Generate Ideas` |
|
||||
| Clusters | `/planner/clusters` | ✅ Required | ✅ Required | Filter clusters by site/sector | `{count} selected → Expand Clusters` OR `{ready} ready → Generate Ideas` |
|
||||
| Cluster Detail | `/planner/clusters/:id` | ✅ Read-only | ✅ Read-only | Display only (inherited from cluster) | `Back to Clusters` OR `Generate Ideas from Cluster` |
|
||||
| Ideas | `/planner/ideas` | ✅ Required | ✅ Required | Filter ideas by site/sector | `{count} selected → Create Tasks` OR `{approved} approved → Create Tasks` |
|
||||
|
||||
---
|
||||
|
||||
## Writer Module (Content Creation)
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Tasks | `/writer/tasks` | ✅ Required | ✅ Required | Filter tasks by site/sector | `{count} selected → Generate Content` OR `{ready} ready → Generate Content` |
|
||||
| Content | `/writer/content` | ✅ Required | ✅ Required | Filter content by site/sector | `{count} selected → Generate Images` OR `{draft} drafts → Add Images` |
|
||||
| Images | `/writer/images` | ✅ Required | ✅ Required | Filter images by site/sector | `{count} selected → Submit for Review` OR `{ready} ready → Submit for Review` |
|
||||
| Review | `/writer/review` | ✅ Required | ✅ Required | Filter review items by site/sector | `{count} selected → Publish Selected` OR `{approved} approved → Publish All` |
|
||||
| Published | `/writer/published` | ✅ Required | ✅ Required | Filter published items by site/sector | `{count} selected → Sync to WordPress` OR `View All Sites` |
|
||||
|
||||
---
|
||||
|
||||
## Linker Module (Internal Linking)
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Content List | `/linker/content` | ✅ Required | ✅ Optional | Filter content by site/sector | N/A |
|
||||
|
||||
---
|
||||
|
||||
## Optimizer Module (Content Optimization)
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Content Selector | `/optimizer/content` | ✅ Required | ✅ Optional | Filter content for optimization | N/A |
|
||||
| Analysis Preview | `/optimizer/analyze/:id` | ✅ Read-only | ❌ Not needed | Display only (inherited from content) | N/A |
|
||||
|
||||
---
|
||||
|
||||
## Thinker Module (AI Configuration) - Admin Only
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Prompts | `/thinker/prompts` | ❌ Global | ❌ Global | System-wide prompts | N/A |
|
||||
| Author Profiles | `/thinker/author-profiles` | ❌ Global | ❌ Global | System-wide profiles | N/A |
|
||||
| Strategies | `/thinker/strategies` | ❌ Global | ❌ Global | System-wide strategies | N/A |
|
||||
| Image Testing | `/thinker/image-testing` | ❌ Global | ❌ Global | Testing interface | N/A |
|
||||
|
||||
---
|
||||
|
||||
## Sites Module (Site Management)
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Site List | `/sites` | ❌ Shows all | ❌ Not applicable | Lists all sites | N/A |
|
||||
| Site Dashboard | `/sites/:id` | ✅ Read-only | ❌ Not needed | Inherited from route param | N/A |
|
||||
| Site Content | `/sites/:id/content` | ✅ Read-only | ✅ Optional | Filter by sector within site | N/A |
|
||||
| Page Manager | `/sites/:id/pages` | ✅ Read-only | ❌ Not needed | Inherited from route param | N/A |
|
||||
| Site Settings | `/sites/:id/settings` | ✅ Read-only | ❌ Not needed | Inherited from route param | N/A |
|
||||
| Sync Dashboard | `/sites/:id/sync` | ✅ Read-only | ❌ Not needed | Inherited from route param | N/A |
|
||||
| Deployment Panel | `/sites/:id/deploy` | ✅ Read-only | ❌ Not needed | Inherited from route param | N/A |
|
||||
|
||||
---
|
||||
|
||||
## Account & Billing
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Account Settings | `/account/settings` | ❌ Not needed | ❌ Not needed | Account-level settings | N/A |
|
||||
| Plans & Billing | `/account/plans` | ❌ Not needed | ❌ Not needed | Account-level billing | N/A |
|
||||
| Purchase Credits | `/account/purchase-credits` | ❌ Not needed | ❌ Not needed | Account-level purchase | N/A |
|
||||
| Usage Analytics | `/account/usage` | ✅ Optional | ❌ Not needed | Filter usage by site | N/A |
|
||||
| Content Settings | `/account/content-settings` | ❌ Not needed | ❌ Not needed | Account-level settings | N/A |
|
||||
|
||||
---
|
||||
|
||||
## Settings (Admin)
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| General Settings | `/settings` | ❌ Not needed | ❌ Not needed | System-wide settings | N/A |
|
||||
| Users | `/settings/users` | ❌ Not needed | ❌ Not needed | User management | N/A |
|
||||
| Subscriptions | `/settings/subscriptions` | ❌ Not needed | ❌ Not needed | Subscription management | N/A |
|
||||
| System | `/settings/system` | ❌ Not needed | ❌ Not needed | System configuration | N/A |
|
||||
| Account | `/settings/account` | ❌ Not needed | ❌ Not needed | Account settings | N/A |
|
||||
| AI Settings | `/settings/ai` | ❌ Not needed | ❌ Not needed | AI model configuration | N/A |
|
||||
| Plans | `/settings/plans` | ❌ Not needed | ❌ Not needed | Plan management | N/A |
|
||||
| Industries | `/settings/industries` | ❌ Not needed | ❌ Not needed | Industry reference data | N/A |
|
||||
| Integration | `/settings/integration` | ❌ Not needed | ❌ Not needed | API integrations | N/A |
|
||||
| Publishing | `/settings/publishing` | ❌ Not needed | ❌ Not needed | Publishing defaults | N/A |
|
||||
| Sites | `/settings/sites` | ❌ Not needed | ❌ Not needed | Site configuration | N/A |
|
||||
|
||||
---
|
||||
|
||||
## Reference Data
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Seed Keywords | `/reference/seed-keywords` | ✅ Optional | ✅ Optional | Filter reference keywords | N/A |
|
||||
| Industries | `/reference/industries` | ❌ Not needed | ❌ Not needed | Global reference data | N/A |
|
||||
|
||||
---
|
||||
|
||||
## Setup
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Add Keywords | `/setup/add-keywords` | ✅ Required | ✅ Required | Target site/sector for import | N/A |
|
||||
|
||||
---
|
||||
|
||||
## Other Pages
|
||||
|
||||
| Page | Route | Site Selector | Sector Selector | Implementation | Recommended Next Action |
|
||||
|------|-------|---------------|-----------------|----------------|-------------------------|
|
||||
| Home Dashboard | `/` | ✅ Optional | ❌ Not needed | Overview all sites or filter | N/A |
|
||||
| Help | `/help` | ❌ Not needed | ❌ Not needed | Documentation | N/A |
|
||||
| Components | `/components` | ❌ Not needed | ❌ Not needed | Design system showcase | N/A |
|
||||
|
||||
---
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
### Site Selector Behavior
|
||||
- **Required**: User must select a site before content is displayed
|
||||
- **Optional**: Shows all sites by default, can filter to specific site
|
||||
- **Read-only**: Shows the current site but cannot be changed (inherited from route/context)
|
||||
- **Not needed**: Page operates at account/system level
|
||||
|
||||
### Sector Selector Behavior
|
||||
- **Required**: User must select both site and sector
|
||||
- **Optional**: Shows all sectors by default within selected site
|
||||
- **Read-only**: Shows current sector but cannot be changed
|
||||
- **Not needed**: Page doesn't operate at sector level
|
||||
|
||||
### Next Action Patterns (Planner/Writer)
|
||||
The next action button should follow this pattern:
|
||||
1. If items are selected → Action on selected items
|
||||
2. If no selection but ready items exist → Workflow progression action
|
||||
3. If nothing actionable → Hide or disable
|
||||
|
||||
Example:
|
||||
```tsx
|
||||
nextAction={selectedIds.length > 0 ? {
|
||||
label: 'Process Selected',
|
||||
message: `${selectedIds.length} items selected`,
|
||||
onClick: handleBulkAction,
|
||||
} : workflowStats.ready > 0 ? {
|
||||
label: 'Continue to Next Step',
|
||||
href: '/next/page',
|
||||
message: `${workflowStats.ready} items ready`,
|
||||
} : undefined}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Workflow Pipeline (Planner → Writer)
|
||||
|
||||
```
|
||||
Keywords → Clusters → Ideas → Tasks → Content → Images → Review → Published
|
||||
↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
||||
Cluster Expand Create Generate Generate Submit Publish Sync to
|
||||
Keywords Ideas Tasks Content Images Review Content WordPress
|
||||
```
|
||||
|
||||
Each page's "next action" guides users through this pipeline.
|
||||
Reference in New Issue
Block a user