docs updated v1.2.0
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# System Architecture
|
||||
|
||||
**Last Verified:** December 25, 2025
|
||||
**Last Verified:** December 27, 2025
|
||||
**Version:** 1.2.0
|
||||
**Backend Path:** `backend/igny8_core/`
|
||||
**Frontend Path:** `frontend/src/`
|
||||
|
||||
@@ -114,6 +115,7 @@ backend/igny8_core/
|
||||
│ ├── content/ # Content generation orchestration
|
||||
│ ├── integration/ # Sync services
|
||||
│ ├── linking/ # Link processing
|
||||
│ ├── notifications/ # Notification system (v1.2.0)
|
||||
│ ├── optimization/ # Content optimization
|
||||
│ ├── planning/ # Clustering, idea generation
|
||||
│ └── publishing/ # Publishing orchestration
|
||||
@@ -142,7 +144,8 @@ frontend/src/
|
||||
│ └── ...
|
||||
│
|
||||
├── services/
|
||||
│ └── api.ts # Main API service (2500+ lines)
|
||||
│ ├── api.ts # Main API service (2500+ lines)
|
||||
│ └── notifications.api.ts # Notification API (v1.2.0)
|
||||
│
|
||||
├── store/ # Zustand stores
|
||||
│ ├── authStore.ts # Authentication state
|
||||
@@ -150,6 +153,7 @@ frontend/src/
|
||||
│ ├── sectorStore.ts # Active sector
|
||||
│ ├── billingStore.ts # Billing state
|
||||
│ ├── moduleStore.ts # Module enable/disable
|
||||
│ ├── notificationStore.ts # Notifications (v1.2.0)
|
||||
│ └── ...
|
||||
│
|
||||
├── pages/ # Route pages
|
||||
@@ -164,12 +168,27 @@ frontend/src/
|
||||
│ └── Auth/
|
||||
│
|
||||
├── components/ # Reusable components
|
||||
│ ├── ProgressModal.tsx # AI progress display
|
||||
│ ├── ConfirmDialog.tsx
|
||||
│ └── ...
|
||||
│ ├── common/
|
||||
│ │ ├── ProgressModal.tsx # AI progress display
|
||||
│ │ ├── SearchModal.tsx # Global search (v1.1.9)
|
||||
│ │ └── ...
|
||||
│ ├── dashboard/ # Dashboard widgets (v1.2.0)
|
||||
│ │ ├── WorkflowPipelineWidget.tsx
|
||||
│ │ ├── AIOperationsWidget.tsx
|
||||
│ │ ├── RecentActivityWidget.tsx
|
||||
│ │ ├── ContentVelocityWidget.tsx
|
||||
│ │ ├── AutomationStatusWidget.tsx
|
||||
│ │ ├── ThreeWidgetFooter.tsx
|
||||
│ │ └── ...
|
||||
│ └── header/
|
||||
│ └── NotificationDropdown.tsx
|
||||
│
|
||||
├── context/ # React contexts (v1.1.9)
|
||||
│ └── PageContext.tsx # Page-level state
|
||||
│
|
||||
├── layout/ # Layout components
|
||||
│ ├── AppLayout.tsx
|
||||
│ ├── AppHeader.tsx
|
||||
│ └── AppSidebar.tsx
|
||||
│
|
||||
├── hooks/ # Custom hooks
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Writer Module
|
||||
|
||||
**Last Verified:** December 25, 2025
|
||||
**Last Verified:** December 27, 2025
|
||||
**Version:** 1.2.0
|
||||
**Status:** ✅ Active
|
||||
**Backend Path:** `backend/igny8_core/modules/writer/`
|
||||
**Frontend Path:** `frontend/src/pages/Writer/`
|
||||
@@ -240,10 +241,11 @@ ContentIdeas → Tasks → Content → Images → Review → Publish
|
||||
- Publish to WordPress
|
||||
- Status management
|
||||
|
||||
### Draft/Review/Published Tabs
|
||||
### Draft/Review/Approved Tabs
|
||||
|
||||
- Filtered views by status
|
||||
- Different actions per status
|
||||
- **v1.2.0**: "Published" tab renamed to "Approved"
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# API Endpoints Reference
|
||||
|
||||
**Last Verified:** December 25, 2025
|
||||
**Last Verified:** December 27, 2025
|
||||
**Version:** 1.2.0
|
||||
**Base URL:** `/api/v1/`
|
||||
**Documentation:** `/api/docs/` (Swagger) | `/api/redoc/` (ReDoc)
|
||||
|
||||
@@ -151,6 +152,54 @@ All endpoints require authentication unless noted.
|
||||
|
||||
---
|
||||
|
||||
## Notification Endpoints (`/api/v1/notifications/`) - v1.2.0
|
||||
|
||||
| Method | Path | Handler | Purpose |
|
||||
|--------|------|---------|---------|
|
||||
| GET | `/` | `NotificationViewSet.list` | List notifications (paginated) |
|
||||
| GET | `/{id}/` | `NotificationViewSet.retrieve` | Get notification detail |
|
||||
| DELETE | `/{id}/` | `NotificationViewSet.destroy` | Delete notification |
|
||||
| POST | `/{id}/read/` | `NotificationViewSet.read` | Mark single notification as read |
|
||||
| POST | `/read-all/` | `NotificationViewSet.read_all` | Mark all notifications as read |
|
||||
| GET | `/unread-count/` | `NotificationViewSet.unread_count` | Get unread notification count |
|
||||
|
||||
**Query Parameters:**
|
||||
- `?page=` - Page number for pagination
|
||||
- `?page_size=` - Results per page (default 20)
|
||||
- `?is_read=` - Filter by read status (true/false)
|
||||
- `?notification_type=` - Filter by type (ai_task, system, credit, billing, integration, content, info)
|
||||
|
||||
**Notification Types:**
|
||||
- `ai_cluster_complete`, `ai_cluster_failed` - Clustering operations
|
||||
- `ai_ideas_complete`, `ai_ideas_failed` - Idea generation
|
||||
- `ai_content_complete`, `ai_content_failed` - Content generation
|
||||
- `ai_images_complete`, `ai_images_failed` - Image generation
|
||||
- `ai_prompts_complete`, `ai_prompts_failed` - Image prompt generation
|
||||
- `content_ready_review`, `content_published`, `content_publish_failed` - Workflow
|
||||
- `wordpress_sync_success`, `wordpress_sync_failed` - WordPress sync
|
||||
- `credits_low`, `credits_depleted` - Billing alerts
|
||||
- `site_setup_complete`, `keywords_imported` - Setup
|
||||
- `system_info` - System notifications
|
||||
|
||||
**Response Format:**
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"notification_type": "ai_content_complete",
|
||||
"severity": "success",
|
||||
"title": "Content Generated",
|
||||
"message": "Generated 5 articles successfully",
|
||||
"is_read": false,
|
||||
"created_at": "2025-12-27T12:00:00Z",
|
||||
"read_at": null,
|
||||
"action_label": "View Content",
|
||||
"action_url": "/writer/content",
|
||||
"metadata": {"count": 5, "credits": 250}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Automation Endpoints (`/api/v1/automation/`)
|
||||
|
||||
| Method | Path | Handler | Purpose |
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# IGNY8 Technical Documentation
|
||||
|
||||
**Version:** 1.1.0
|
||||
**Last Updated:** December 25, 2025
|
||||
**Version:** 1.2.0
|
||||
**Last Updated:** December 27, 2025
|
||||
**Purpose:** Complete technical reference for the IGNY8 AI content platform
|
||||
|
||||
---
|
||||
@@ -60,14 +60,13 @@
|
||||
|
||||
| Document | Purpose |
|
||||
|----------|---------|
|
||||
| [PAGES.md](30-FRONTEND/PAGES.md) | All pages and routes |
|
||||
| [STORES.md](30-FRONTEND/STORES.md) | Zustand state management |
|
||||
| [PAGES.md](30-FRONTEND/PAGES.md) | All pages and routes || [PAGE-REQUIREMENTS.md](30-FRONTEND/PAGE-REQUIREMENTS.md) | Site/sector selector requirements || [STORES.md](30-FRONTEND/STORES.md) | Zustand state management |
|
||||
| [COMPONENTS.md](30-FRONTEND/COMPONENTS.md) | Key reusable components |
|
||||
|
||||
### Current Page Structure (v1.1.0)
|
||||
### Current Page Structure (v1.2.0)
|
||||
|
||||
```
|
||||
/ → Dashboard (Home.tsx)
|
||||
/ → Dashboard (Home.tsx) - with new widgets
|
||||
├── SETUP
|
||||
│ /setup/add-keywords → Add Keywords (AddKeywords.tsx)
|
||||
│ /account/content-settings → Content Settings (ContentSettingsPage.tsx)
|
||||
@@ -83,7 +82,7 @@
|
||||
│ /writer/drafts → Drafts (Drafts.tsx)
|
||||
│ /writer/images → Images (Images.tsx)
|
||||
│ /writer/review → Review (Review.tsx)
|
||||
│ /writer/published → Published (Published.tsx)
|
||||
│ /writer/approved → Approved (Approved.tsx)
|
||||
│ /automation → Automation Dashboard (Dashboard.tsx)
|
||||
│ /linker/content → Linker [if enabled]
|
||||
│ /optimizer/content → Optimizer [if enabled]
|
||||
|
||||
Reference in New Issue
Block a user