docs updated v1.2.0

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-27 23:27:07 +00:00
parent e0f3060df9
commit 28a60f8141
8 changed files with 380 additions and 29 deletions

View File

@@ -1,5 +1,8 @@
# Page Requirements - Site & Sector Selectors
**Last Verified:** December 27, 2025
**Version:** 1.2.0
This document outlines all pages in the application and their requirements for site/sector selectors.
## Legend
@@ -28,8 +31,8 @@ This document outlines all pages in the application and their requirements for s
| 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` |
| Review | `/writer/review` | ✅ Required | ✅ Required | Filter review items by site/sector | `{count} selected → Approve Selected` OR `{reviewed} reviewed → Approve All` |
| Approved | `/writer/approved` | ✅ Required | ✅ Required | Filter approved items by site/sector | `{count} selected → Sync to WordPress` OR `View All Sites` |
---
@@ -170,9 +173,9 @@ nextAction={selectedIds.length > 0 ? {
## Workflow Pipeline (Planner → Writer)
```
Keywords → Clusters → Ideas → Tasks → Content → Images → Review → Published
Keywords → Clusters → Ideas → Tasks → Content → Images → Review → Approved
↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
Cluster Expand Create Generate Generate Submit Publish Sync to
Cluster Expand Create Generate Generate Submit Approve Sync to
Keywords Ideas Tasks Content Images Review Content WordPress
```

View File

@@ -1,7 +1,7 @@
# Frontend Pages & Routes
**Last Verified:** December 27, 2025
**Version:** 1.1.7
**Version:** 1.2.0
**Framework:** React 19 + TypeScript + React Router 6 + Vite
---
@@ -33,6 +33,20 @@ Routes defined in `/frontend/src/App.tsx`:
|-------|------|-------------|
| `/` | `Dashboard/Home.tsx` | Main dashboard with workflow pipeline, metrics, quick actions |
**v1.2.0 Dashboard Widgets:**
- `WorkflowPipelineWidget` - Visual flow: Sites → Keywords → Clusters → Ideas → Tasks → Drafts → Published
- `AIOperationsWidget` - Operation stats (clustering, ideas, content, images) with time filter (7d/30d/90d)
- `RecentActivityWidget` - Activity feed with type-specific icons
- `ContentVelocityWidget` - Week/Month/Total metrics table
- `AutomationStatusWidget` - Status, schedule, last/next run, run controls
- `NeedsAttentionBar` - Alert bar for pending actions requiring attention
- `QuickActionsWidget` - Quick action buttons for common tasks
**Data Sources:**
- Pipeline counts from actual API calls (keywords, clusters, ideas, tasks, content)
- AI operations derived from content creation totals
- Activity generated from real data with capped display values
---
## SETUP Routes
@@ -102,7 +116,12 @@ Routes defined in `/frontend/src/App.tsx`:
| `/writer/content/:id` | `Writer/ContentView.tsx` | Content detail view (read-only) | - |
| `/writer/images` | `Writer/Images.tsx` | Image management by content | Images |
| `/writer/review` | `Writer/Review.tsx` | Review queue (status=review) | Review |
| `/writer/published` | `Writer/Published.tsx` | Published content (status=published) | Published |
| `/writer/approved` | `Writer/Approved.tsx` | Approved content (status=approved/published) | Approved |
**v1.2.0 Changes:**
- Renamed "Published" to "Approved" page
- Legacy route `/writer/published` redirects to `/writer/approved`
- ThreeWidgetFooter added to Tasks, Content pages
### Automation
@@ -248,10 +267,7 @@ frontend/src/pages/
├── Dashboard/
│ └── Home.tsx
├── Help/
── HelpCenter.tsx
│ ├── Documentation.tsx # Placeholder
│ ├── SystemTesting.tsx # Placeholder
│ └── FunctionTesting.tsx # Placeholder
── Help.tsx # Main help page with docs, FAQ
├── Linker/
│ ├── Content.tsx
│ └── Dashboard.tsx # Not exposed
@@ -283,7 +299,7 @@ frontend/src/pages/
├── ContentView.tsx
├── Images.tsx
├── Review.tsx
└── Published.tsx
└── Approved.tsx # Renamed from Published.tsx (v1.2.0)
```
---
@@ -318,7 +334,7 @@ Dashboard
│ ├── Planner [if planner enabled]
│ │ └── In-page: Keywords → Clusters → Ideas
│ ├── Writer [if writer enabled]
│ │ └── In-page: Queue → Drafts → Images → Review → Published
│ │ └── In-page: Queue → Drafts → Images → Review → Approved
│ ├── Automation [if automation enabled]
│ ├── Linker [if linker enabled]
│ └── Optimizer [if optimizer enabled]

View File

@@ -1,6 +1,7 @@
# Zustand State Management
**Last Verified:** December 25, 2025
**Last Verified:** December 27, 2025
**Version:** 1.2.0
**Framework:** Zustand 4 with persist middleware
---
@@ -315,6 +316,80 @@ interface UIActions {
---
## Notification Store (`notificationStore.ts`) - v1.2.0
**Purpose:** In-app notifications for AI task completions and system events
```typescript
type NotificationType = 'success' | 'error' | 'warning' | 'info';
type NotificationCategory = 'ai_task' | 'system' | 'info';
interface Notification {
id: string;
apiId?: number; // Server ID for synced notifications
type: NotificationType;
category: NotificationCategory;
title: string;
message: string;
timestamp: Date;
read: boolean;
actionLabel?: string;
actionHref?: string;
metadata?: {
taskId?: string;
functionName?: string;
count?: number;
credits?: number;
};
}
interface NotificationStore {
notifications: Notification[];
unreadCount: number;
isLoading: boolean;
lastFetched: Date | null;
// Actions
addNotification(notification: Omit<Notification, 'id' | 'timestamp' | 'read'>): void;
markAsRead(id: string): void;
markAllAsRead(): void;
removeNotification(id: string): void;
clearAll(): void;
fetchFromAPI(): Promise<void>;
syncWithAPI(): Promise<void>;
}
```
**Features:**
- In-memory queue for optimistic UI updates
- API sync for persistent notifications
- Auto-dismissal with configurable timeout
- Read/unread state tracking
- Category-based filtering (ai_task, system, info)
**API Integration:** Uses `notifications.api.ts` service:
- `fetchNotifications()` - List with pagination
- `fetchUnreadCount()` - Unread count
- `markNotificationRead()` - Mark single as read
- `markAllNotificationsRead()` - Mark all as read
- `deleteNotification()` - Delete notification
**Usage:**
```typescript
const { notifications, unreadCount, addNotification, markAsRead } = useNotificationStore();
// Add AI task completion notification
addNotification({
type: 'success',
category: 'ai_task',
title: 'Content Generated',
message: 'Generated 5 articles successfully',
metadata: { count: 5, credits: 250 }
});
```
---
## Store Dependencies
```
@@ -329,6 +404,8 @@ authStore
├── automationStore (scoped to site)
└── integrationStore (scoped to site)
notificationStore (global, polls/syncs independently)
moduleStore (global, loads once per account)
billingStore (global, loads once per account)
uiStore (local only, no API)
@@ -345,6 +422,9 @@ frontend/src/store/
├── sectorStore.ts
├── moduleStore.ts
├── billingStore.ts
├── notificationStore.ts # v1.2.0
├── onboardingStore.ts
├── pageSizeStore.ts
├── plannerStore.ts
├── writerStore.ts
├── automationStore.ts