Consolidate documentation into a single structure, updating README and removing individual documentation files. Enhance README with architecture, tech stack, and project structure details. Update features and capabilities sections for clarity and completeness.
This commit is contained in:
397
docs/00-DOCUMENTATION-MANAGEMENT.md
Normal file
397
docs/00-DOCUMENTATION-MANAGEMENT.md
Normal file
@@ -0,0 +1,397 @@
|
||||
# IGNY8 Documentation & Changelog Management System
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Purpose:** Complete guide for managing documentation versioning, changelog updates, and DRY principles. This document must be read by all AI agents at the start of any session.
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Versioning System](#versioning-system)
|
||||
2. [Changelog Management](#changelog-management)
|
||||
3. [Documentation Update Process](#documentation-update-process)
|
||||
4. [DRY Principles & Standards](#dry-principles--standards)
|
||||
5. [AI Agent Instructions](#ai-agent-instructions)
|
||||
|
||||
---
|
||||
|
||||
## Versioning System
|
||||
|
||||
### Version Format
|
||||
|
||||
**Format:** `MAJOR.MINOR.PATCH` (Semantic Versioning)
|
||||
|
||||
- **MAJOR**: Breaking changes, major feature additions, architecture changes
|
||||
- **MINOR**: New features, new modules, significant enhancements
|
||||
- **PATCH**: Bug fixes, small improvements, documentation updates
|
||||
|
||||
**Current Version:** `1.0.0`
|
||||
|
||||
### Version Tracking
|
||||
|
||||
**Location:**
|
||||
- Root `CHANGELOG.md` - Main version history
|
||||
- Each documentation file header - Last updated date
|
||||
|
||||
**Version Update Rules:**
|
||||
- **MAJOR**: Only updated when user confirms major release
|
||||
- **MINOR**: Updated when user confirms new feature is complete
|
||||
- **PATCH**: Updated when user confirms bug fix is complete
|
||||
|
||||
### Version Update Process
|
||||
|
||||
1. **Code Change Made**: Developer/AI makes code changes
|
||||
2. **User Confirmation**: User confirms fix/feature is complete
|
||||
3. **Version Update**: Update version in CHANGELOG.md
|
||||
4. **Changelog Entry**: Add entry to CHANGELOG.md
|
||||
5. **Documentation Update**: Update relevant documentation files if needed
|
||||
|
||||
**IMPORTANT**: Never update version or changelog without user confirmation that the change is complete and working.
|
||||
|
||||
---
|
||||
|
||||
## Changelog Management
|
||||
|
||||
### Changelog Location
|
||||
|
||||
**File:** `/CHANGELOG.md` (root directory)
|
||||
|
||||
### Changelog Structure
|
||||
|
||||
```markdown
|
||||
## [Version] - YYYY-MM-DD
|
||||
|
||||
### Added
|
||||
- New features, modules, or capabilities
|
||||
|
||||
### Changed
|
||||
- Changes to existing features or behavior
|
||||
|
||||
### Fixed
|
||||
- Bug fixes and corrections
|
||||
|
||||
### Deprecated
|
||||
- Features that will be removed in future versions
|
||||
|
||||
### Removed
|
||||
- Features that have been removed
|
||||
|
||||
### Security
|
||||
- Security fixes and improvements
|
||||
```
|
||||
|
||||
### Changelog Entry Format
|
||||
|
||||
Each entry must include:
|
||||
- **Date**: YYYY-MM-DD format
|
||||
- **Type**: Added, Changed, Fixed, Deprecated, Removed, Security
|
||||
- **Description**: Clear, concise description of the change
|
||||
- **Affected Areas**: Modules, components, or features affected
|
||||
- **Documentation**: Reference to updated documentation files (if any)
|
||||
|
||||
### Example Changelog Entry
|
||||
|
||||
```markdown
|
||||
## [1.0.1] - 2025-01-15
|
||||
|
||||
### Fixed
|
||||
- Fixed keyword clustering issue where keywords were not properly linked to clusters
|
||||
- **Affected**: Planner Module, Keyword Clustering
|
||||
- **Documentation**: Updated 06-FUNCTIONAL-BUSINESS-LOGIC.md (Keyword Clustering section)
|
||||
|
||||
### Added
|
||||
- Added bulk delete functionality for content ideas
|
||||
- **Affected**: Planner Module, Content Ideas
|
||||
- **Documentation**: Updated 06-FUNCTIONAL-BUSINESS-LOGIC.md (Content Ideas Management section)
|
||||
```
|
||||
|
||||
### Changelog Update Rules
|
||||
|
||||
1. **Only Update After User Confirmation**: Never add changelog entries until user confirms the change is complete
|
||||
2. **One Entry Per Change**: Each fix or feature gets its own entry
|
||||
3. **Chronological Order**: Newest entries at the top
|
||||
4. **Be Specific**: Include what was changed, why, and where
|
||||
5. **Link Documentation**: Reference updated documentation files
|
||||
6. **Version Bump**: Update version number when adding entries
|
||||
|
||||
### Changelog Categories
|
||||
|
||||
**Added**: New features, new modules, new endpoints, new functions
|
||||
**Changed**: Modified existing features, updated workflows, refactored code
|
||||
**Fixed**: Bug fixes, error corrections, issue resolutions
|
||||
**Deprecated**: Features marked for removal (include migration path)
|
||||
**Removed**: Features that have been completely removed
|
||||
**Security**: Security patches, vulnerability fixes, access control updates
|
||||
|
||||
---
|
||||
|
||||
## Documentation Update Process
|
||||
|
||||
### When to Update Documentation
|
||||
|
||||
1. **New Feature Added**: Update relevant documentation files
|
||||
2. **Feature Changed**: Update affected sections in documentation
|
||||
3. **Bug Fixed**: Update documentation if behavior changed
|
||||
4. **Workflow Modified**: Update workflow documentation
|
||||
5. **API Changed**: Update API documentation
|
||||
6. **Architecture Changed**: Update architecture documentation
|
||||
|
||||
### Documentation Files Structure
|
||||
|
||||
```
|
||||
docs/
|
||||
├── 00-DOCUMENTATION-MANAGEMENT.md # This file (management guide)
|
||||
├── 01-TECH-STACK-AND-INFRASTRUCTURE.md
|
||||
├── 02-APPLICATION-ARCHITECTURE.md
|
||||
├── 03-FRONTEND-ARCHITECTURE.md
|
||||
├── 04-BACKEND-IMPLEMENTATION.md
|
||||
├── 05-AI-FRAMEWORK-IMPLEMENTATION.md
|
||||
└── 06-FUNCTIONAL-BUSINESS-LOGIC.md
|
||||
```
|
||||
|
||||
### Documentation Update Checklist
|
||||
|
||||
- [ ] Identify which documentation file(s) need updating
|
||||
- [ ] Update the relevant section(s)
|
||||
- [ ] Update "Last Updated" date in file header
|
||||
- [ ] Add changelog entry (after user confirmation)
|
||||
- [ ] Verify all links still work
|
||||
- [ ] Ensure consistency across all documentation
|
||||
|
||||
### Documentation Standards
|
||||
|
||||
1. **No Code Snippets**: Documentation focuses on workflows, features, and architecture
|
||||
2. **Complete Coverage**: All features and workflows must be documented
|
||||
3. **Accurate State**: Documentation must reflect current system state
|
||||
4. **Clear Structure**: Use consistent headings and formatting
|
||||
5. **Cross-References**: Link related sections and documents
|
||||
|
||||
---
|
||||
|
||||
## DRY Principles & Standards
|
||||
|
||||
### DRY (Don't Repeat Yourself) Philosophy
|
||||
|
||||
**Core Principle**: Use existing, predefined, standardized components, utilities, functions, and configurations instead of creating parallel systems or duplicating code.
|
||||
|
||||
### Frontend DRY Standards
|
||||
|
||||
#### Components
|
||||
|
||||
**MUST USE Existing Components:**
|
||||
- **Templates**: Use 4 universal templates (DashboardTemplate, TablePageTemplate, FormPageTemplate, SystemPageTemplate)
|
||||
- **UI Components**: Use components from `/frontend/src/components/`
|
||||
- **Common Components**: Use ScrollToTop, GlobalErrorDisplay, LoadingStateMonitor
|
||||
- **Form Components**: Use existing form components with props and configs
|
||||
|
||||
**DO NOT:**
|
||||
- Create new templates when existing ones can be used
|
||||
- Duplicate component logic
|
||||
- Create parallel component systems
|
||||
- Hardcode UI elements that can use config-driven approach
|
||||
|
||||
#### Configuration-Driven Development
|
||||
|
||||
**MUST USE Configuration Files:**
|
||||
- **Page Configs**: `/frontend/src/config/pages/` - Define page structure
|
||||
- **Snippet Configs**: `/frontend/src/config/snippets/` - Define reusable snippets
|
||||
- **Route Configs**: `/frontend/src/config/routes.config.ts` - Define routes
|
||||
- **API Configs**: Use existing API client patterns
|
||||
|
||||
**DO NOT:**
|
||||
- Hardcode page structures
|
||||
- Create pages without config files
|
||||
- Duplicate configuration patterns
|
||||
|
||||
#### State Management
|
||||
|
||||
**MUST USE Existing Stores:**
|
||||
- **Zustand Stores**: Use stores from `/frontend/src/stores/`
|
||||
- Auth Store, Site Store, Sector Store
|
||||
- Planner Store, Writer Store, Billing Store
|
||||
- Settings Store, Page Size Store, Column Visibility Store
|
||||
- **React Contexts**: Use contexts from `/frontend/src/contexts/`
|
||||
- Theme Context, Sidebar Context, Header Metrics Context, Toast Context
|
||||
|
||||
**DO NOT:**
|
||||
- Create new stores for existing functionality
|
||||
- Duplicate state management logic
|
||||
- Create parallel state systems
|
||||
|
||||
#### Utilities & Helpers
|
||||
|
||||
**MUST USE Existing Utilities:**
|
||||
- **API Client**: Use `/frontend/src/services/api.ts` patterns
|
||||
- **Hooks**: Use custom hooks from `/frontend/src/hooks/`
|
||||
- **Utils**: Use utility functions from `/frontend/src/utils/`
|
||||
- **Constants**: Use constants from `/frontend/src/constants/`
|
||||
|
||||
**DO NOT:**
|
||||
- Create duplicate utility functions
|
||||
- Implement API calls without using existing patterns
|
||||
- Create new helper functions when existing ones work
|
||||
|
||||
#### CSS & Styling
|
||||
|
||||
**MUST USE:**
|
||||
- **Tailwind CSS**: Use Tailwind utility classes
|
||||
- **Existing Styles**: Use predefined styles and classes
|
||||
- **Component Styles**: Use component-level styles from existing components
|
||||
- **Theme System**: Use theme context for dark/light mode
|
||||
|
||||
**DO NOT:**
|
||||
- Create custom CSS when Tailwind classes exist
|
||||
- Duplicate styling patterns
|
||||
- Create parallel style systems
|
||||
- Hardcode colors or spacing values
|
||||
|
||||
### Backend DRY Standards
|
||||
|
||||
#### Base Classes
|
||||
|
||||
**MUST USE Existing Base Classes:**
|
||||
- **AccountModelViewSet**: For account-isolated models
|
||||
- **SiteSectorModelViewSet**: For site/sector-scoped models
|
||||
- **AccountBaseModel**: For account-isolated models
|
||||
- **SiteSectorBaseModel**: For site/sector-scoped models
|
||||
|
||||
**DO NOT:**
|
||||
- Create new base classes when existing ones work
|
||||
- Duplicate filtering logic
|
||||
- Create parallel isolation systems
|
||||
|
||||
#### AI Framework
|
||||
|
||||
**MUST USE AI Framework:**
|
||||
- **BaseAIFunction**: Inherit from this for all AI functions
|
||||
- **AIEngine**: Use for executing AI functions
|
||||
- **AICore**: Use for AI API calls
|
||||
- **PromptRegistry**: Use for prompt management
|
||||
- **run_ai_task**: Use this Celery task entry point
|
||||
|
||||
**DO NOT:**
|
||||
- Create new AI function patterns
|
||||
- Duplicate AI execution logic
|
||||
- Create parallel AI systems
|
||||
|
||||
#### Utilities & Services
|
||||
|
||||
**MUST USE Existing Services:**
|
||||
- **CreditService**: For credit management
|
||||
- **Content Normalizer**: For content processing
|
||||
- **AI Functions**: Use existing 5 AI functions
|
||||
- **Middleware**: Use AccountContextMiddleware, ResourceTrackerMiddleware
|
||||
|
||||
**DO NOT:**
|
||||
- Create duplicate service logic
|
||||
- Implement credit management without CreditService
|
||||
- Create parallel utility systems
|
||||
|
||||
### DRY Violation Detection
|
||||
|
||||
**Red Flags:**
|
||||
- Creating new components when similar ones exist
|
||||
- Duplicating API call patterns
|
||||
- Creating new state management when stores exist
|
||||
- Hardcoding values that should be config-driven
|
||||
- Creating parallel systems for existing functionality
|
||||
|
||||
**Action Required:**
|
||||
- Check existing components, utilities, and patterns first
|
||||
- Refactor to use existing systems
|
||||
- Update documentation if new patterns are truly needed
|
||||
|
||||
---
|
||||
|
||||
## AI Agent Instructions
|
||||
|
||||
### Mandatory Reading
|
||||
|
||||
**At the start of EVERY session, AI agents MUST:**
|
||||
1. Read this file (`00-DOCUMENTATION-MANAGEMENT.md`)
|
||||
2. Read root `README.md`
|
||||
3. Read `CHANGELOG.md`
|
||||
4. Understand versioning system
|
||||
5. Understand changelog management
|
||||
6. Understand DRY principles
|
||||
|
||||
### Versioning & Changelog Rules for AI Agents
|
||||
|
||||
1. **NEVER update version or changelog without user confirmation**
|
||||
2. **ALWAYS ask user before adding changelog entries**
|
||||
3. **ONLY update changelog after user confirms change is complete**
|
||||
4. **ALWAYS follow changelog structure and format**
|
||||
5. **ALWAYS reference updated documentation files in changelog**
|
||||
|
||||
### DRY Principles for AI Agents
|
||||
|
||||
1. **ALWAYS check for existing components/utilities before creating new ones**
|
||||
2. **ALWAYS use configuration-driven approach when possible**
|
||||
3. **ALWAYS use existing templates and base classes**
|
||||
4. **NEVER create parallel systems**
|
||||
5. **NEVER duplicate code that can be reused**
|
||||
|
||||
### Documentation Update Rules for AI Agents
|
||||
|
||||
1. **ALWAYS update documentation when making changes**
|
||||
2. **ALWAYS update "Last Updated" date in file header**
|
||||
3. **ALWAYS maintain consistency across documentation**
|
||||
4. **ALWAYS verify links after updates**
|
||||
5. **ALWAYS follow documentation standards**
|
||||
|
||||
### Workflow for AI Agents
|
||||
|
||||
**When Making Code Changes:**
|
||||
1. Check existing components/utilities first (DRY)
|
||||
2. Make code changes
|
||||
3. Update relevant documentation
|
||||
4. Wait for user confirmation
|
||||
5. Add changelog entry (after confirmation)
|
||||
6. Update version (if needed, after confirmation)
|
||||
|
||||
**When User Confirms Fix/Feature:**
|
||||
1. Add changelog entry following structure
|
||||
2. Update version if needed
|
||||
3. Update documentation "Last Updated" dates
|
||||
4. Verify all changes are documented
|
||||
|
||||
### Self-Explaining System
|
||||
|
||||
This documentation management system is designed to be self-explaining:
|
||||
- **Clear Rules**: All rules are explicitly stated
|
||||
- **Examples**: Examples provided for clarity
|
||||
- **Structure**: Consistent structure across all documents
|
||||
- **Cross-References**: Links between related documents
|
||||
- **Standards**: Clear standards for all operations
|
||||
|
||||
**Any AI agent reading this file should understand:**
|
||||
- How to manage versions
|
||||
- How to update changelog
|
||||
- How to follow DRY principles
|
||||
- How to update documentation
|
||||
- When to ask for user confirmation
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
### Key Principles
|
||||
|
||||
1. **Versioning**: Semantic versioning, only update after user confirmation
|
||||
2. **Changelog**: Structured entries, only after user confirmation
|
||||
3. **Documentation**: Always update when making changes
|
||||
4. **DRY**: Always use existing components, utilities, and patterns
|
||||
5. **Confirmation**: Never update version/changelog without user confirmation
|
||||
|
||||
### Lock Status
|
||||
|
||||
**Documentation Management System**: ✅ **LOCKED**
|
||||
|
||||
This system is finalized and should not be changed without explicit user approval. All AI agents must follow these rules.
|
||||
|
||||
---
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Version:** 1.0.0
|
||||
**Status:** Locked
|
||||
|
||||
@@ -1,476 +0,0 @@
|
||||
# IGNY8 Architecture & Technology Stack
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Purpose:** Complete technology stack and architecture overview for the IGNY8 platform.
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Executive Summary](#executive-summary)
|
||||
2. [Technology Stack](#technology-stack)
|
||||
3. [System Architecture](#system-architecture)
|
||||
4. [Core Architecture Principles](#core-architecture-principles)
|
||||
5. [Infrastructure Components](#infrastructure-components)
|
||||
6. [External Service Integrations](#external-service-integrations)
|
||||
7. [Deployment Architecture](#deployment-architecture)
|
||||
|
||||
---
|
||||
|
||||
## Executive Summary
|
||||
|
||||
**IGNY8** is a full-stack SaaS platform for SEO keyword management and AI-driven content generation. The system is built with modern technologies and follows a multi-tenant architecture with complete account isolation.
|
||||
|
||||
### Key Metrics
|
||||
|
||||
- **Architecture**: Multi-tenant SaaS with account isolation
|
||||
- **Backend**: Django 5.2+ with Django REST Framework
|
||||
- **Frontend**: React 19 with TypeScript
|
||||
- **Database**: PostgreSQL 15
|
||||
- **Task Queue**: Celery with Redis
|
||||
- **Deployment**: Docker-based containerization
|
||||
- **Reverse Proxy**: Caddy (HTTPS termination)
|
||||
- **AI Functions**: 5 primary AI operations
|
||||
- **Modules**: 4 core modules (Planner, Writer, System, Billing)
|
||||
|
||||
---
|
||||
|
||||
## Technology Stack
|
||||
|
||||
### Backend Stack
|
||||
|
||||
| Component | Technology | Version | Purpose |
|
||||
|-----------|------------|---------|---------|
|
||||
| **Framework** | Django | 5.2+ | Web framework |
|
||||
| **API Framework** | Django REST Framework | Latest | RESTful API |
|
||||
| **Database** | PostgreSQL | 15 | Primary database |
|
||||
| **Task Queue** | Celery | Latest | Asynchronous tasks |
|
||||
| **Cache/Broker** | Redis | 7 | Celery broker & caching |
|
||||
| **Authentication** | JWT | SimpleJWT | Token-based auth |
|
||||
| **HTTP Client** | Requests | Latest | External API calls |
|
||||
| **WSGI Server** | Gunicorn | Latest | Production server |
|
||||
|
||||
### Frontend Stack
|
||||
|
||||
| Component | Technology | Version | Purpose |
|
||||
|-----------|------------|---------|---------|
|
||||
| **Framework** | React | 19 | UI library |
|
||||
| **Language** | TypeScript | Latest | Type safety |
|
||||
| **Build Tool** | Vite | Latest | Build tool & dev server |
|
||||
| **Styling** | Tailwind CSS | Latest | Utility-first CSS |
|
||||
| **State Management** | Zustand | Latest | Lightweight state |
|
||||
| **Routing** | React Router | v6 | Client-side routing |
|
||||
| **HTTP Client** | Fetch API | Native | API communication |
|
||||
|
||||
### Infrastructure Stack
|
||||
|
||||
| Component | Technology | Purpose |
|
||||
|-----------|------------|---------|
|
||||
| **Containerization** | Docker | Application containers |
|
||||
| **Orchestration** | Docker Compose | Multi-container orchestration |
|
||||
| **Reverse Proxy** | Caddy | HTTPS termination & routing |
|
||||
| **Database Admin** | pgAdmin | PostgreSQL administration |
|
||||
| **File Management** | FileBrowser | Web-based file management |
|
||||
| **Container Management** | Portainer | Docker container management |
|
||||
|
||||
### External Services
|
||||
|
||||
| Service | Purpose | Integration |
|
||||
|---------|---------|-------------|
|
||||
| **OpenAI API** | Text generation (GPT models) | API integration |
|
||||
| **OpenAI DALL-E** | Image generation | API integration |
|
||||
| **Runware API** | Alternative image generation | API integration |
|
||||
| **WordPress** | Content publishing | REST API integration |
|
||||
| **Stripe** | Payment processing | Webhook integration (planned) |
|
||||
|
||||
---
|
||||
|
||||
## System Architecture
|
||||
|
||||
### High-Level Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Client Layer │
|
||||
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
||||
│ │ Browser │ │ Mobile │ │ Admin │ │
|
||||
│ │ (React) │ │ (Future) │ │ Panel │ │
|
||||
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ │
|
||||
└─────────┼──────────────────┼──────────────────┼─────────────┘
|
||||
│ │ │
|
||||
└──────────────────┼──────────────────┘
|
||||
│
|
||||
┌────────────────────────────┼──────────────────────────────┐
|
||||
│ Reverse Proxy Layer │
|
||||
│ ┌───────────────┐ │
|
||||
│ │ Caddy │ │
|
||||
│ │ (HTTPS/443) │ │
|
||||
│ └───────┬───────┘ │
|
||||
└────────────────────────────┼──────────────────────────────┘
|
||||
│
|
||||
┌────────────────────────────┼──────────────────────────────┐
|
||||
│ Application Layer │
|
||||
│ ┌──────────────┐ ┌──────────────┐ │
|
||||
│ │ Frontend │ │ Backend │ │
|
||||
│ │ (React) │◄─────────────┤ (Django) │ │
|
||||
│ │ Port 8021 │ REST API │ Port 8011 │ │
|
||||
│ └──────────────┘ └──────┬───────┘ │
|
||||
│ │ │
|
||||
│ ┌────────┴────────┐ │
|
||||
│ │ Celery Worker │ │
|
||||
│ │ (Async Tasks) │ │
|
||||
│ └────────┬────────┘ │
|
||||
└───────────────────────────────────────┼──────────────────┘
|
||||
│
|
||||
┌───────────────────────────────────────┼──────────────────┐
|
||||
│ Data Layer │
|
||||
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
||||
│ │ PostgreSQL │ │ Redis │ │ Storage │ │
|
||||
│ │ (Database) │ │ (Cache/Broker)│ │ (Files) │ │
|
||||
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
||||
└──────────────────────────────────────────────────────────┘
|
||||
│
|
||||
┌───────────────────────────────────────┼──────────────────┐
|
||||
│ External Services │
|
||||
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
||||
│ │ OpenAI │ │ Runware │ │ WordPress │ │
|
||||
│ │ (GPT/DALL-E)│ │ (Images) │ │ (Publish) │ │
|
||||
│ └──────────────┘ └──────────────┘ └──────────────┘ │
|
||||
└──────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### Request Flow
|
||||
|
||||
```
|
||||
1. User Request
|
||||
↓
|
||||
2. Browser (React Frontend)
|
||||
↓
|
||||
3. Caddy Reverse Proxy (HTTPS Termination)
|
||||
↓
|
||||
4. Django Backend (API Endpoint)
|
||||
↓
|
||||
5. AccountContextMiddleware (Account Isolation)
|
||||
↓
|
||||
6. ViewSet (Business Logic)
|
||||
↓
|
||||
7. Serializer (Validation)
|
||||
↓
|
||||
8. Model (Database)
|
||||
↓
|
||||
9. Response (JSON)
|
||||
↓
|
||||
10. Frontend (UI Update)
|
||||
```
|
||||
|
||||
### AI Task Flow
|
||||
|
||||
```
|
||||
1. User Action (e.g., "Auto Cluster Keywords")
|
||||
↓
|
||||
2. Frontend API Call
|
||||
↓
|
||||
3. Backend Endpoint (ViewSet Action)
|
||||
↓
|
||||
4. Celery Task Queued
|
||||
↓
|
||||
5. Task ID Returned to Frontend
|
||||
↓
|
||||
6. Frontend Polls Progress Endpoint
|
||||
↓
|
||||
7. Celery Worker Processes Task
|
||||
↓
|
||||
8. AIProcessor Makes API Calls
|
||||
↓
|
||||
9. Results Saved to Database
|
||||
↓
|
||||
10. Progress Updates Sent
|
||||
↓
|
||||
11. Frontend Displays Results
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Core Architecture Principles
|
||||
|
||||
### 1. Configuration-Driven Everything
|
||||
|
||||
**Principle**: Zero HTML/JSX duplication - All UI rendered from configuration.
|
||||
|
||||
**Implementation**:
|
||||
- **Frontend**: Config files in `/config/pages/` and `/config/snippets/`
|
||||
- **Backend**: DRF serializers and ViewSet actions
|
||||
- **Templates**: 4 universal templates (Dashboard, Table, Form, System)
|
||||
|
||||
**Benefits**:
|
||||
- Single source of truth
|
||||
- Easy maintenance
|
||||
- Consistent UI/UX
|
||||
- Rapid feature development
|
||||
|
||||
### 2. Multi-Tenancy Foundation
|
||||
|
||||
**Principle**: Complete account isolation with automatic filtering.
|
||||
|
||||
**Implementation**:
|
||||
- All models inherit `AccountBaseModel`
|
||||
- All ViewSets inherit `AccountModelViewSet`
|
||||
- Middleware injects account context from JWT
|
||||
- Site > Sector hierarchy for content organization
|
||||
|
||||
**Benefits**:
|
||||
- Data security
|
||||
- Scalability
|
||||
- Resource isolation
|
||||
- Simplified access control
|
||||
|
||||
### 3. Template System (4 Universal Templates)
|
||||
|
||||
**Principle**: Reusable templates for all page types.
|
||||
|
||||
| Template | Purpose | Usage |
|
||||
|----------|---------|-------|
|
||||
| **DashboardTemplate** | Module home pages | KPIs, workflow steps, charts |
|
||||
| **TablePageTemplate** | CRUD table pages | Keywords, Clusters, Tasks, etc. |
|
||||
| **FormPageTemplate** | Settings/form pages | Settings, Integration, etc. |
|
||||
| **SystemPageTemplate** | System/admin pages | Logs, Status, Monitoring |
|
||||
|
||||
### 4. Unified AI Processor
|
||||
|
||||
**Principle**: Single interface for all AI operations.
|
||||
|
||||
**Implementation**:
|
||||
- Single `AIEngine` class orchestrates all AI operations
|
||||
- All AI functions inherit from `BaseAIFunction`
|
||||
- Manual and automated workflows use same functions
|
||||
- Account-specific API keys and model configuration
|
||||
|
||||
**Benefits**:
|
||||
- Code reusability
|
||||
- Consistent error handling
|
||||
- Unified logging
|
||||
- Easy to extend
|
||||
|
||||
### 5. Module-Based Organization
|
||||
|
||||
**Principle**: Clear module boundaries with shared utilities.
|
||||
|
||||
**Modules**:
|
||||
- **Planner**: Keywords, Clusters, Ideas
|
||||
- **Writer**: Tasks, Content, Images
|
||||
- **System**: Settings, Prompts, Integration
|
||||
- **Billing**: Credits, Transactions, Usage
|
||||
- **Auth**: Accounts, Users, Sites, Sectors
|
||||
|
||||
---
|
||||
|
||||
## Infrastructure Components
|
||||
|
||||
### Docker Architecture
|
||||
|
||||
The system uses a two-stack Docker architecture:
|
||||
|
||||
1. **Infrastructure Stack (`igny8-infra`)**: Shared services
|
||||
2. **Application Stack (`igny8-app`)**: Application-specific services
|
||||
|
||||
### Infrastructure Stack Services
|
||||
|
||||
| Service | Container Name | Port | Purpose |
|
||||
|---------|----------------|------|---------|
|
||||
| **PostgreSQL** | `igny8_postgres` | 5432 (internal) | Database |
|
||||
| **Redis** | `igny8_redis` | 6379 (internal) | Cache & Celery broker |
|
||||
| **pgAdmin** | `igny8_pgadmin` | 5050:80 | Database administration |
|
||||
| **FileBrowser** | `igny8_filebrowser` | 8080:80 | File management |
|
||||
| **Caddy** | `igny8_caddy` | 80:80, 443:443 | Reverse proxy & HTTPS |
|
||||
| **Setup Helper** | `setup-helper` | - | Utility container |
|
||||
|
||||
### Application Stack Services
|
||||
|
||||
| Service | Container Name | Port | Purpose |
|
||||
|---------|----------------|------|---------|
|
||||
| **Backend** | `igny8_backend` | 8011:8010 | Django REST API |
|
||||
| **Frontend** | `igny8_frontend` | 8021:5173 | React application |
|
||||
| **Celery Worker** | `igny8_celery_worker` | - | Async task processing |
|
||||
| **Celery Beat** | `igny8_celery_beat` | - | Scheduled tasks |
|
||||
|
||||
### Network Configuration
|
||||
|
||||
- **Network Name**: `igny8_net`
|
||||
- **Type**: External bridge network
|
||||
- **Purpose**: Inter-container communication
|
||||
- **Creation**: Must be created manually before starting stacks
|
||||
|
||||
### Volume Management
|
||||
|
||||
**Infrastructure Volumes**:
|
||||
- `pgdata`: PostgreSQL database data
|
||||
- `redisdata`: Redis data
|
||||
- `pgadmin_data`: pgAdmin configuration
|
||||
- `filebrowser_db`: FileBrowser database
|
||||
- `caddy_data`: Caddy SSL certificates
|
||||
- `caddy_config`: Caddy configuration
|
||||
|
||||
**Application Volumes**:
|
||||
- Host mounts for application code
|
||||
- Host mounts for logs
|
||||
- Docker socket for container management
|
||||
|
||||
### Port Allocation
|
||||
|
||||
| Service | External Port | Internal Port | Access |
|
||||
|---------|---------------|---------------|--------|
|
||||
| **pgAdmin** | 5050 | 80 | http://localhost:5050 |
|
||||
| **FileBrowser** | 8080 | 80 | http://localhost:8080 |
|
||||
| **Caddy** | 80, 443 | 80, 443 | https://domain.com |
|
||||
| **Backend** | 8011 | 8010 | http://localhost:8011 |
|
||||
| **Frontend** | 8021 | 5173 | http://localhost:8021 |
|
||||
|
||||
---
|
||||
|
||||
## External Service Integrations
|
||||
|
||||
### OpenAI Integration
|
||||
|
||||
**Purpose**: Text generation and image generation
|
||||
|
||||
**Services Used**:
|
||||
- GPT models for text generation
|
||||
- DALL-E for image generation
|
||||
|
||||
**Configuration**:
|
||||
- API key stored per account in `IntegrationSettings`
|
||||
- Model selection per account
|
||||
- Cost tracking per request
|
||||
|
||||
### Runware Integration
|
||||
|
||||
**Purpose**: Alternative image generation service
|
||||
|
||||
**Configuration**:
|
||||
- API key stored per account
|
||||
- Model selection (e.g., `runware:97@1`)
|
||||
- Image type selection (realistic, artistic, cartoon)
|
||||
|
||||
### WordPress Integration
|
||||
|
||||
**Purpose**: Content publishing
|
||||
|
||||
**Configuration**:
|
||||
- WordPress URL per site
|
||||
- Username and password stored per site
|
||||
- REST API integration for publishing
|
||||
|
||||
**Workflow**:
|
||||
1. Content generated in IGNY8
|
||||
2. Images attached
|
||||
3. Content published to WordPress via REST API
|
||||
4. Status updated in IGNY8
|
||||
|
||||
### Stripe Integration (Planned)
|
||||
|
||||
**Purpose**: Payment processing
|
||||
|
||||
**Status**: Planned for future implementation
|
||||
|
||||
**Features**:
|
||||
- Subscription management
|
||||
- Payment processing
|
||||
- Webhook integration
|
||||
|
||||
---
|
||||
|
||||
## Deployment Architecture
|
||||
|
||||
### Deployment Model
|
||||
|
||||
**Container-Based**: All services run in Docker containers
|
||||
|
||||
**Stack Separation**:
|
||||
- Infrastructure stack runs independently
|
||||
- Application stack depends on infrastructure stack
|
||||
- Both stacks share the same Docker network
|
||||
|
||||
### Environment Configuration
|
||||
|
||||
**Backend Environment Variables**:
|
||||
- Database connection (PostgreSQL)
|
||||
- Redis connection
|
||||
- Django settings (DEBUG, SECRET_KEY, etc.)
|
||||
- JWT settings
|
||||
- Celery configuration
|
||||
|
||||
**Frontend Environment Variables**:
|
||||
- Backend API URL
|
||||
- Environment (development/production)
|
||||
|
||||
**Infrastructure Environment Variables**:
|
||||
- PostgreSQL credentials
|
||||
- pgAdmin credentials
|
||||
- FileBrowser configuration
|
||||
|
||||
### Health Checks
|
||||
|
||||
**Backend Health Check**:
|
||||
- Endpoint: `/api/v1/system/status/`
|
||||
- Interval: 30 seconds
|
||||
- Timeout: 10 seconds
|
||||
- Retries: 3
|
||||
|
||||
**PostgreSQL Health Check**:
|
||||
- Command: `pg_isready`
|
||||
- Interval: 20 seconds
|
||||
- Timeout: 3 seconds
|
||||
- Retries: 5
|
||||
|
||||
**Redis Health Check**:
|
||||
- Command: `redis-cli ping`
|
||||
- Interval: 20 seconds
|
||||
- Timeout: 3 seconds
|
||||
- Retries: 5
|
||||
|
||||
### Scaling Considerations
|
||||
|
||||
**Horizontal Scaling**:
|
||||
- Multiple Celery workers can be added
|
||||
- Multiple backend instances can be added (with load balancer)
|
||||
- Frontend can be scaled independently
|
||||
|
||||
**Vertical Scaling**:
|
||||
- Database can be scaled with more resources
|
||||
- Redis can be scaled with more memory
|
||||
- Containers can be allocated more CPU/memory
|
||||
|
||||
### Backup & Recovery
|
||||
|
||||
**Database Backups**:
|
||||
- PostgreSQL dumps stored in `/data/backups`
|
||||
- Automated backup scripts
|
||||
- Point-in-time recovery support
|
||||
|
||||
**Volume Backups**:
|
||||
- Docker volume backups
|
||||
- Application code backups
|
||||
- Configuration backups
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
The IGNY8 platform is built on a modern, scalable architecture using:
|
||||
|
||||
- **Django 5.2+** for the backend API
|
||||
- **React 19** for the frontend
|
||||
- **PostgreSQL 15** for data storage
|
||||
- **Celery & Redis** for async processing
|
||||
- **Docker** for containerization
|
||||
- **Caddy** for reverse proxy and HTTPS
|
||||
|
||||
The architecture follows principles of:
|
||||
- Configuration-driven development
|
||||
- Multi-tenancy with account isolation
|
||||
- Module-based organization
|
||||
- Unified AI processing
|
||||
- Template-based UI rendering
|
||||
|
||||
This architecture supports scalability, maintainability, and rapid feature development while ensuring data security and isolation.
|
||||
|
||||
1153
docs/01-TECH-STACK-AND-INFRASTRUCTURE.md
Normal file
1153
docs/01-TECH-STACK-AND-INFRASTRUCTURE.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
# IGNY8 Application Architecture
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Purpose:** Complete application architecture documentation covering system hierarchy, modules, workflows, features, and data flow.
|
||||
**Purpose:** Complete application architecture documentation covering system hierarchy, user roles, access control, modules, workflows, data models, multi-tenancy, API architecture, and security.
|
||||
|
||||
---
|
||||
|
||||
1492
docs/03-FRONTEND-ARCHITECTURE.md
Normal file
1492
docs/03-FRONTEND-ARCHITECTURE.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,720 +0,0 @@
|
||||
# IGNY8 Frontend Documentation
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Purpose:** Complete frontend documentation covering architecture, pages, components, routing, state management, and configuration system.
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Frontend Overview](#frontend-overview)
|
||||
2. [Tech Stack](#tech-stack)
|
||||
3. [Project Structure](#project-structure)
|
||||
4. [Routing System](#routing-system)
|
||||
5. [Template System](#template-system)
|
||||
6. [Component Library](#component-library)
|
||||
7. [State Management](#state-management)
|
||||
8. [API Integration](#api-integration)
|
||||
9. [Configuration System](#configuration-system)
|
||||
10. [Pages & Features](#pages--features)
|
||||
11. [Hooks & Utilities](#hooks--utilities)
|
||||
|
||||
---
|
||||
|
||||
## Frontend Overview
|
||||
|
||||
The IGNY8 frontend is a React 19 application built with TypeScript, using Vite as the build tool and Tailwind CSS for styling. The frontend follows a configuration-driven architecture where UI components are rendered from configuration objects, eliminating code duplication and ensuring consistency.
|
||||
|
||||
### Key Features
|
||||
|
||||
- **Configuration-Driven UI**: All tables, filters, and forms driven by config files
|
||||
- **4 Universal Templates**: DashboardTemplate, TablePageTemplate, FormPageTemplate, SystemPageTemplate
|
||||
- **TypeScript**: Full type safety across the application
|
||||
- **Zustand State Management**: Lightweight, performant state management
|
||||
- **React Router v6**: Modern routing with nested routes
|
||||
- **Responsive Design**: Mobile-first approach with Tailwind CSS
|
||||
|
||||
---
|
||||
|
||||
## Tech Stack
|
||||
|
||||
### Core Technologies
|
||||
|
||||
- **React 19**: UI library
|
||||
- **TypeScript**: Type safety
|
||||
- **Vite**: Build tool and dev server
|
||||
- **Tailwind CSS**: Utility-first CSS framework
|
||||
- **React Router v6**: Client-side routing
|
||||
|
||||
### State Management
|
||||
|
||||
- **Zustand**: Lightweight state management library
|
||||
- **localStorage**: Persistence for Zustand stores
|
||||
|
||||
### HTTP Client
|
||||
|
||||
- **Fetch API**: Native browser API with custom wrapper
|
||||
- **Auto-retry**: Automatic retry on network failures
|
||||
- **Token refresh**: Automatic JWT token refresh
|
||||
|
||||
### UI Components
|
||||
|
||||
- **Custom Component Library**: Built-in components (Button, Card, Modal, etc.)
|
||||
- **Icons**: Custom icon library
|
||||
- **Toast Notifications**: Toast notification system
|
||||
|
||||
---
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
frontend/src/
|
||||
├── pages/ # Page components
|
||||
│ ├── Planner/ # Planner module pages
|
||||
│ │ ├── Dashboard.tsx
|
||||
│ │ ├── Keywords.tsx
|
||||
│ │ ├── Clusters.tsx
|
||||
│ │ ├── Ideas.tsx
|
||||
│ │ ├── KeywordOpportunities.tsx
|
||||
│ │ └── Mapping.tsx
|
||||
│ ├── Writer/ # Writer module pages
|
||||
│ │ ├── Dashboard.tsx
|
||||
│ │ ├── Tasks.tsx
|
||||
│ │ ├── Content.tsx
|
||||
│ │ ├── ContentView.tsx
|
||||
│ │ ├── Drafts.tsx
|
||||
│ │ ├── Images.tsx
|
||||
│ │ └── Published.tsx
|
||||
│ ├── Thinker/ # Thinker module pages
|
||||
│ │ ├── Dashboard.tsx
|
||||
│ │ ├── Prompts.tsx
|
||||
│ │ ├── AuthorProfiles.tsx
|
||||
│ │ ├── Strategies.tsx
|
||||
│ │ ├── Profile.tsx
|
||||
│ │ └── ImageTesting.tsx
|
||||
│ ├── Billing/ # Billing module pages
|
||||
│ │ ├── Credits.tsx
|
||||
│ │ ├── Transactions.tsx
|
||||
│ │ └── Usage.tsx
|
||||
│ ├── Settings/ # Settings pages
|
||||
│ │ ├── General.tsx
|
||||
│ │ ├── Users.tsx
|
||||
│ │ ├── Sites.tsx
|
||||
│ │ ├── Integration.tsx
|
||||
│ │ ├── AI.tsx
|
||||
│ │ ├── Plans.tsx
|
||||
│ │ ├── Industries.tsx
|
||||
│ │ ├── Status.tsx
|
||||
│ │ ├── Subscriptions.tsx
|
||||
│ │ ├── Account.tsx
|
||||
│ │ ├── Modules.tsx
|
||||
│ │ ├── System.tsx
|
||||
│ │ ├── ImportExport.tsx
|
||||
│ │ └── UiElements/ # UI element examples
|
||||
│ ├── Help/ # Help pages
|
||||
│ │ ├── Help.tsx
|
||||
│ │ ├── Docs.tsx
|
||||
│ │ ├── SystemTesting.tsx
|
||||
│ │ └── FunctionTesting.tsx
|
||||
│ ├── Reference/ # Reference data pages
|
||||
│ │ ├── Industries.tsx
|
||||
│ │ └── SeedKeywords.tsx
|
||||
│ ├── AuthPages/ # Authentication pages
|
||||
│ │ ├── SignIn.tsx
|
||||
│ │ └── SignUp.tsx
|
||||
│ ├── Dashboard/ # Main dashboard
|
||||
│ │ └── Home.tsx
|
||||
│ └── OtherPage/ # Other pages
|
||||
│ └── NotFound.tsx
|
||||
├── templates/ # 4 universal templates
|
||||
│ ├── DashboardTemplate.tsx
|
||||
│ ├── TablePageTemplate.tsx
|
||||
│ ├── FormPageTemplate.tsx
|
||||
│ └── SystemPageTemplate.tsx
|
||||
├── components/ # UI components
|
||||
│ ├── layout/ # Layout components
|
||||
│ │ ├── AppLayout.tsx
|
||||
│ │ ├── Sidebar.tsx
|
||||
│ │ └── Header.tsx
|
||||
│ ├── table/ # Table components
|
||||
│ │ ├── DataTable.tsx
|
||||
│ │ ├── Filters.tsx
|
||||
│ │ └── Pagination.tsx
|
||||
│ ├── ui/ # UI primitives
|
||||
│ │ ├── button/
|
||||
│ │ ├── card/
|
||||
│ │ ├── modal/
|
||||
│ │ └── ...
|
||||
│ └── auth/ # Auth components
|
||||
│ └── ProtectedRoute.tsx
|
||||
├── config/ # Configuration files
|
||||
│ ├── pages/ # Page-specific configs
|
||||
│ │ └── keywords.config.tsx
|
||||
│ ├── snippets/ # Shared snippets
|
||||
│ │ ├── columns.snippets.ts
|
||||
│ │ ├── filters.snippets.ts
|
||||
│ │ └── actions.snippets.ts
|
||||
│ └── routes.config.ts # Route configuration
|
||||
├── store/ # Zustand stores
|
||||
│ ├── authStore.ts # Authentication state
|
||||
│ ├── plannerStore.ts # Planner module state
|
||||
│ ├── siteStore.ts # Site selection state
|
||||
│ ├── sectorStore.ts # Sector selection state
|
||||
│ ├── aiRequestLogsStore.ts # AI request/response logs
|
||||
│ └── pageSizeStore.ts # Table page size preference
|
||||
├── services/ # API clients
|
||||
│ └── api.ts # fetchAPI, API functions
|
||||
├── hooks/ # Custom React hooks
|
||||
│ ├── useProgressModal.ts # Progress modal for long-running tasks
|
||||
│ └── useAuth.ts # Authentication hook
|
||||
├── utils/ # Utility functions
|
||||
│ └── difficulty.ts # Difficulty utilities
|
||||
├── App.tsx # Root component with routing
|
||||
└── main.tsx # Entry point
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Routing System
|
||||
|
||||
### Route Structure
|
||||
|
||||
**Public Routes**:
|
||||
- `/signin` - Sign in page
|
||||
- `/signup` - Sign up page
|
||||
|
||||
**Protected Routes** (require authentication):
|
||||
- `/` - Home dashboard
|
||||
- `/planner/*` - Planner module routes
|
||||
- `/writer/*` - Writer module routes
|
||||
- `/thinker/*` - Thinker module routes
|
||||
- `/billing/*` - Billing module routes
|
||||
- `/settings/*` - Settings routes
|
||||
- `/help/*` - Help routes
|
||||
- `/reference/*` - Reference data routes
|
||||
- `/ui-elements/*` - UI element examples
|
||||
|
||||
### ProtectedRoute Component
|
||||
|
||||
**Purpose**: Wraps protected routes and checks authentication
|
||||
|
||||
**Functionality**:
|
||||
- Checks if user is authenticated
|
||||
- Redirects to `/signin` if not authenticated
|
||||
- Wraps children with `AppLayout` if authenticated
|
||||
|
||||
### Route Configuration
|
||||
|
||||
**File**: `config/routes.config.ts`
|
||||
|
||||
**Structure**: Defines route hierarchy, labels, and icons for navigation
|
||||
|
||||
**Functions**:
|
||||
- `getBreadcrumbs(pathname)`: Generates breadcrumbs for current route
|
||||
|
||||
---
|
||||
|
||||
## Template System
|
||||
|
||||
### 1. DashboardTemplate
|
||||
|
||||
**Purpose**: Module home pages with KPIs, workflow steps, and charts
|
||||
|
||||
**Features**:
|
||||
- Header metrics (KPIs)
|
||||
- Workflow steps
|
||||
- Charts and visualizations
|
||||
- Quick actions
|
||||
|
||||
**Usage**: Planner Dashboard, Writer Dashboard, Thinker Dashboard
|
||||
|
||||
### 2. TablePageTemplate
|
||||
|
||||
**Purpose**: CRUD table pages (Keywords, Clusters, Tasks, etc.)
|
||||
|
||||
**Features**:
|
||||
- Data table with sorting
|
||||
- Filters (text, select, date range, custom)
|
||||
- Pagination
|
||||
- Bulk actions
|
||||
- Row actions (edit, delete)
|
||||
- AI Request/Response Logs section
|
||||
- Import/Export functionality
|
||||
|
||||
**Configuration**:
|
||||
- `columns`: Column definitions (key, label, sortable, render, etc.)
|
||||
- `filters`: Filter definitions (type, options, custom render)
|
||||
- `bulkActions`: Bulk action definitions
|
||||
- `actions`: Row action definitions
|
||||
|
||||
**Usage**: Keywords, Clusters, Ideas, Tasks, Content, Images, Prompts, etc.
|
||||
|
||||
### 3. FormPageTemplate
|
||||
|
||||
**Purpose**: Settings/form pages (Settings, Integration, etc.)
|
||||
|
||||
**Features**:
|
||||
- Form sections
|
||||
- Form validation
|
||||
- Save/Cancel buttons
|
||||
- Success/Error notifications
|
||||
|
||||
**Usage**: Settings, Integration, AI Settings, Plans, etc.
|
||||
|
||||
### 4. SystemPageTemplate
|
||||
|
||||
**Purpose**: System/admin pages (Logs, Status, Monitoring)
|
||||
|
||||
**Features**:
|
||||
- System information display
|
||||
- Logs viewer
|
||||
- Status indicators
|
||||
- Performance metrics
|
||||
|
||||
**Usage**: System Status, System Testing, etc.
|
||||
|
||||
---
|
||||
|
||||
## Component Library
|
||||
|
||||
### Layout Components
|
||||
|
||||
#### AppLayout
|
||||
**Purpose**: Main app layout wrapper
|
||||
|
||||
**Features**:
|
||||
- Sidebar navigation
|
||||
- Header with user menu
|
||||
- Main content area
|
||||
- Breadcrumbs
|
||||
|
||||
#### Sidebar
|
||||
**Purpose**: Navigation sidebar
|
||||
|
||||
**Features**:
|
||||
- Module navigation
|
||||
- Active route highlighting
|
||||
- Collapsible sections
|
||||
|
||||
#### Header
|
||||
**Purpose**: Top header bar
|
||||
|
||||
**Features**:
|
||||
- User menu
|
||||
- Notifications
|
||||
- Site/Sector selector
|
||||
|
||||
### Table Components
|
||||
|
||||
#### DataTable
|
||||
**Purpose**: Data table component
|
||||
|
||||
**Features**:
|
||||
- Sortable columns
|
||||
- Selectable rows
|
||||
- Row actions
|
||||
- Responsive design
|
||||
|
||||
#### Filters
|
||||
**Purpose**: Filter component
|
||||
|
||||
**Features**:
|
||||
- Text filters
|
||||
- Select filters
|
||||
- Date range filters
|
||||
- Custom filters
|
||||
|
||||
#### Pagination
|
||||
**Purpose**: Pagination component
|
||||
|
||||
**Features**:
|
||||
- Page navigation
|
||||
- Page size selector
|
||||
- Total count display
|
||||
|
||||
### UI Components
|
||||
|
||||
#### Button
|
||||
**Variants**: primary, secondary, danger, ghost, link
|
||||
**Sizes**: sm, md, lg
|
||||
|
||||
#### Card
|
||||
**Purpose**: Card container component
|
||||
|
||||
#### Modal
|
||||
**Purpose**: Modal dialog component
|
||||
**Variants**: FormModal, ProgressModal, AlertModal
|
||||
|
||||
#### Toast
|
||||
**Purpose**: Toast notification system
|
||||
**Types**: success, error, warning, info
|
||||
|
||||
#### Input
|
||||
**Purpose**: Text input component
|
||||
|
||||
#### Select
|
||||
**Purpose**: Select dropdown component
|
||||
|
||||
#### Checkbox
|
||||
**Purpose**: Checkbox component
|
||||
|
||||
### Auth Components
|
||||
|
||||
#### ProtectedRoute
|
||||
**Purpose**: Route protection component
|
||||
|
||||
**Functionality**:
|
||||
- Checks authentication
|
||||
- Redirects to signin if not authenticated
|
||||
- Wraps children with AppLayout
|
||||
|
||||
---
|
||||
|
||||
## State Management
|
||||
|
||||
### Zustand Stores
|
||||
|
||||
#### authStore
|
||||
**State**:
|
||||
- `user`: Current user object
|
||||
- `token`: JWT access token
|
||||
- `refreshToken`: JWT refresh token
|
||||
- `isAuthenticated`: Authentication status
|
||||
- `loading`: Loading state
|
||||
|
||||
**Actions**:
|
||||
- `login(email, password)`: Sign in user
|
||||
- `logout()`: Sign out user
|
||||
- `register(data)`: Register new user
|
||||
- `setUser(user)`: Set user object
|
||||
- `setToken(token)`: Set access token
|
||||
- `refreshToken()`: Refresh access token
|
||||
|
||||
**Persistence**: localStorage (persisted)
|
||||
|
||||
#### siteStore
|
||||
**State**:
|
||||
- `activeSite`: Currently selected site
|
||||
- `sites`: List of accessible sites
|
||||
|
||||
**Actions**:
|
||||
- `setActiveSite(site)`: Set active site
|
||||
- `loadSites()`: Load accessible sites
|
||||
|
||||
**Persistence**: localStorage (persisted)
|
||||
|
||||
#### sectorStore
|
||||
**State**:
|
||||
- `activeSector`: Currently selected sector
|
||||
- `sectors`: List of sectors for active site
|
||||
|
||||
**Actions**:
|
||||
- `setActiveSector(sector)`: Set active sector
|
||||
- `loadSectorsForSite(siteId)`: Load sectors for site
|
||||
|
||||
**Persistence**: localStorage (persisted)
|
||||
|
||||
#### plannerStore
|
||||
**State**: Planner module-specific state
|
||||
|
||||
**Actions**: Planner module actions
|
||||
|
||||
#### aiRequestLogsStore
|
||||
**State**:
|
||||
- `logs`: Array of AI request/response logs
|
||||
|
||||
**Actions**:
|
||||
- `addLog(log)`: Add new log entry
|
||||
- `addRequestStep(logId, step)`: Add request step to log
|
||||
- `addResponseStep(logId, step)`: Add response step to log
|
||||
- `updateLog(logId, data)`: Update log entry
|
||||
- `clearLogs()`: Clear all logs
|
||||
|
||||
**Purpose**: Tracks AI function execution with step-by-step logs
|
||||
|
||||
#### pageSizeStore
|
||||
**State**:
|
||||
- `pageSize`: Table page size preference
|
||||
|
||||
**Actions**:
|
||||
- `setPageSize(size)`: Set page size
|
||||
|
||||
**Persistence**: localStorage (persisted)
|
||||
|
||||
---
|
||||
|
||||
## API Integration
|
||||
|
||||
### API Service
|
||||
|
||||
**File**: `services/api.ts`
|
||||
|
||||
**Functions**:
|
||||
- `fetchAPI(url, options)`: Generic API fetch wrapper
|
||||
- `fetchKeywords(filters)`: Fetch keywords
|
||||
- `createKeyword(data)`: Create keyword
|
||||
- `updateKeyword(id, data)`: Update keyword
|
||||
- `deleteKeyword(id)`: Delete keyword
|
||||
- `bulkDeleteKeywords(ids)`: Bulk delete keywords
|
||||
- `autoClusterKeywords(ids)`: Auto-cluster keywords
|
||||
- `fetchClusters(filters)`: Fetch clusters
|
||||
- `autoGenerateIdeas(clusterIds)`: Auto-generate ideas
|
||||
- `fetchTasks(filters)`: Fetch tasks
|
||||
- `autoGenerateContent(taskIds)`: Auto-generate content
|
||||
- `autoGenerateImages(taskIds)`: Auto-generate images
|
||||
- And more...
|
||||
|
||||
**Features**:
|
||||
- Automatic JWT token inclusion
|
||||
- Automatic token refresh on 401
|
||||
- Auto-retry on network failures
|
||||
- Error handling
|
||||
- Request/response logging
|
||||
|
||||
### API Base URL
|
||||
|
||||
**Auto-detection**:
|
||||
- Checks environment variables (`VITE_BACKEND_URL`, `VITE_API_URL`)
|
||||
- Falls back to auto-detection based on current origin
|
||||
- Supports localhost, IP addresses, and production subdomain
|
||||
|
||||
**Default**: `https://api.igny8.com/api`
|
||||
|
||||
---
|
||||
|
||||
## Configuration System
|
||||
|
||||
### Page-Local Config
|
||||
|
||||
**Location**: `config/pages/`
|
||||
|
||||
**Example**: `keywords.config.tsx`
|
||||
|
||||
**Structure**: Defines columns, filters, bulkActions, actions for a page
|
||||
|
||||
**Usage**: Imported in page components to configure TablePageTemplate
|
||||
|
||||
### Shared Snippets
|
||||
|
||||
**Location**: `config/snippets/`
|
||||
|
||||
#### columns.snippets.ts
|
||||
**Purpose**: Reusable column definitions
|
||||
|
||||
**Examples**:
|
||||
- `statusColumn`: Status column with badge
|
||||
- `titleColumn`: Title column with link
|
||||
- `dateColumn`: Date column with formatting
|
||||
|
||||
#### filters.snippets.ts
|
||||
**Purpose**: Reusable filter definitions
|
||||
|
||||
**Examples**:
|
||||
- `statusFilter`: Status dropdown filter
|
||||
- `dateRangeFilter`: Date range filter
|
||||
- `searchFilter`: Text search filter
|
||||
|
||||
#### actions.snippets.ts
|
||||
**Purpose**: Reusable action definitions
|
||||
|
||||
**Examples**:
|
||||
- `commonActions`: Edit, Delete actions
|
||||
- `bulkActions`: Bulk delete, bulk update actions
|
||||
|
||||
### Route Configuration
|
||||
|
||||
**File**: `config/routes.config.ts`
|
||||
|
||||
**Structure**: Defines route hierarchy, labels, and icons for navigation
|
||||
|
||||
**Functions**:
|
||||
- `getBreadcrumbs(pathname)`: Generates breadcrumbs for current route
|
||||
|
||||
---
|
||||
|
||||
## Pages & Features
|
||||
|
||||
### Planner Module
|
||||
|
||||
#### Keywords Page (`/planner/keywords`)
|
||||
**Features**:
|
||||
- Keyword CRUD operations
|
||||
- Auto-cluster functionality
|
||||
- Import/Export (CSV)
|
||||
- Filters (status, cluster, intent, difficulty, volume)
|
||||
- Bulk actions (delete, status update)
|
||||
- AI Request/Response Logs
|
||||
|
||||
**Configuration**: Uses `keywords.config.tsx`
|
||||
|
||||
#### Clusters Page (`/planner/clusters`)
|
||||
**Features**:
|
||||
- Cluster CRUD operations
|
||||
- Auto-generate ideas functionality
|
||||
- Filters (status, sector)
|
||||
- Bulk actions
|
||||
|
||||
#### Ideas Page (`/planner/ideas`)
|
||||
**Features**:
|
||||
- Content ideas CRUD operations
|
||||
- Filters (status, cluster, content type)
|
||||
- Bulk actions
|
||||
|
||||
#### Planner Dashboard (`/planner`)
|
||||
**Features**:
|
||||
- KPIs (total keywords, clusters, ideas)
|
||||
- Workflow steps
|
||||
- Charts and visualizations
|
||||
|
||||
### Writer Module
|
||||
|
||||
#### Tasks Page (`/writer/tasks`)
|
||||
**Features**:
|
||||
- Task CRUD operations
|
||||
- Auto-generate content functionality
|
||||
- Auto-generate images functionality
|
||||
- Filters (status, cluster, content type)
|
||||
- Bulk actions
|
||||
|
||||
#### Content Page (`/writer/content`)
|
||||
**Features**:
|
||||
- Content list view
|
||||
- Content detail view (`/writer/content/:id`)
|
||||
- Content editing
|
||||
- Generate image prompts
|
||||
- Generate images
|
||||
- WordPress publishing
|
||||
|
||||
#### Images Page (`/writer/images`)
|
||||
**Features**:
|
||||
- Image list view
|
||||
- Image generation
|
||||
- Image management
|
||||
|
||||
#### Writer Dashboard (`/writer`)
|
||||
**Features**:
|
||||
- KPIs (total tasks, content, images)
|
||||
- Workflow steps
|
||||
- Charts and visualizations
|
||||
|
||||
### Thinker Module
|
||||
|
||||
#### Prompts Page (`/thinker/prompts`)
|
||||
**Features**:
|
||||
- AI prompt CRUD operations
|
||||
- Prompt type management
|
||||
- Default prompt reset
|
||||
|
||||
#### Author Profiles Page (`/thinker/author-profiles`)
|
||||
**Features**:
|
||||
- Author profile CRUD operations
|
||||
- Writing style configuration
|
||||
|
||||
#### Strategies Page (`/thinker/strategies`)
|
||||
**Features**:
|
||||
- Content strategy CRUD operations
|
||||
- Strategy configuration
|
||||
|
||||
#### Image Testing Page (`/thinker/image-testing`)
|
||||
**Features**:
|
||||
- Image generation testing
|
||||
- Prompt testing
|
||||
- Model testing
|
||||
|
||||
### Billing Module
|
||||
|
||||
#### Credits Page (`/billing/credits`)
|
||||
**Features**:
|
||||
- Credit balance display
|
||||
- Credit purchase
|
||||
- Credit history
|
||||
|
||||
#### Transactions Page (`/billing/transactions`)
|
||||
**Features**:
|
||||
- Transaction history
|
||||
- Transaction filtering
|
||||
|
||||
#### Usage Page (`/billing/usage`)
|
||||
**Features**:
|
||||
- Usage logs
|
||||
- Cost tracking
|
||||
- Usage analytics
|
||||
|
||||
### Settings Pages
|
||||
|
||||
#### Sites Page (`/settings/sites`)
|
||||
**Features**:
|
||||
- Site CRUD operations
|
||||
- Site activation/deactivation
|
||||
- Multiple sites can be active simultaneously
|
||||
|
||||
#### Integration Page (`/settings/integration`)
|
||||
**Features**:
|
||||
- Integration settings (OpenAI, Runware)
|
||||
- API key configuration
|
||||
- Test connections
|
||||
- Image generation testing
|
||||
|
||||
#### Users Page (`/settings/users`)
|
||||
**Features**:
|
||||
- User CRUD operations
|
||||
- Role management
|
||||
- Site access management
|
||||
|
||||
#### AI Settings Page (`/settings/ai`)
|
||||
**Features**:
|
||||
- AI prompt management
|
||||
- Model configuration
|
||||
|
||||
---
|
||||
|
||||
## Hooks & Utilities
|
||||
|
||||
### useProgressModal
|
||||
|
||||
**Purpose**: Progress modal for long-running AI tasks
|
||||
|
||||
**Features**:
|
||||
- Displays progress percentage
|
||||
- Shows phase messages
|
||||
- Displays request/response steps
|
||||
- Shows cost and token information
|
||||
- Auto-closes on completion
|
||||
|
||||
### useAuth
|
||||
|
||||
**Purpose**: Authentication hook
|
||||
|
||||
**Features**:
|
||||
- Checks authentication status
|
||||
- Provides user information
|
||||
- Handles token refresh
|
||||
|
||||
### Utilities
|
||||
|
||||
#### difficulty.ts
|
||||
**Purpose**: Difficulty calculation utilities
|
||||
|
||||
**Functions**:
|
||||
- Difficulty level calculation
|
||||
- Difficulty formatting
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
The IGNY8 frontend provides:
|
||||
|
||||
1. **Configuration-Driven UI**: All pages rendered from configuration
|
||||
2. **4 Universal Templates**: Reusable templates for all page types
|
||||
3. **TypeScript**: Full type safety
|
||||
4. **Zustand State Management**: Lightweight, performant state
|
||||
5. **React Router v6**: Modern routing
|
||||
6. **Component Library**: Comprehensive UI components
|
||||
7. **API Integration**: Automatic token handling and retry
|
||||
8. **Progress Tracking**: Real-time progress for AI tasks
|
||||
9. **Responsive Design**: Mobile-first approach
|
||||
10. **Complete Feature Set**: All modules and pages implemented
|
||||
|
||||
This architecture ensures consistency, maintainability, and rapid feature development while providing a great user experience.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# IGNY8 Backend Documentation
|
||||
# IGNY8 Backend Implementation Reference
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Purpose:** Complete backend documentation covering models, views, APIs, modules, serializers, tasks, and structure.
|
||||
**Purpose:** Complete backend implementation reference covering project structure, models, ViewSets, serializers, Celery tasks, API endpoints, base classes, middleware, and utilities.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# IGNY8 AI Functions Documentation
|
||||
# IGNY8 AI Framework Implementation Reference
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Purpose:** Complete AI functions documentation covering architecture, all 5 AI functions, execution flow, and configuration.
|
||||
**Purpose:** Complete AI framework implementation reference covering architecture, code structure, all 5 AI functions, execution flow, progress tracking, cost tracking, prompt management, and model configuration.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
# IGNY8 Changelog
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Purpose:** System changelog documenting features, updates, and improvements.
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [2025-01-XX - Documentation Consolidation](#2025-01-xx---documentation-consolidation)
|
||||
2. [System Features](#system-features)
|
||||
3. [Planned Features](#planned-features)
|
||||
|
||||
---
|
||||
|
||||
## 2025-01-XX - Documentation Consolidation
|
||||
|
||||
### Documentation Updates
|
||||
|
||||
- **Consolidated Documentation**: All documentation consolidated into single structure
|
||||
- `docs/README.md` - Documentation index
|
||||
- `docs/01-ARCHITECTURE-TECH-STACK.md` - Architecture and tech stack
|
||||
- `docs/02-APP-ARCHITECTURE.md` - Application architecture with workflows
|
||||
- `docs/03-FRONTEND.md` - Frontend documentation
|
||||
- `docs/04-BACKEND.md` - Backend documentation
|
||||
- `docs/05-AI-FUNCTIONS.md` - AI functions documentation
|
||||
- `docs/06-CHANGELOG.md` - System changelog
|
||||
|
||||
### Improvements
|
||||
|
||||
- **Complete Workflow Documentation**: All workflows documented from start to finish
|
||||
- **Feature Completeness**: All features documented without missing any flows
|
||||
- **No Code Snippets**: Documentation focuses on workflows and features (no code)
|
||||
- **Accurate State**: Documentation reflects current system state
|
||||
|
||||
---
|
||||
|
||||
## System Features
|
||||
|
||||
### Implemented Features
|
||||
|
||||
#### Foundation
|
||||
- ✅ Multi-tenancy system with account isolation
|
||||
- ✅ Authentication (login/register) with JWT
|
||||
- ✅ RBAC permissions (Developer, Owner, Admin, Editor, Viewer, System Bot)
|
||||
- ✅ Account > Site > Sector hierarchy
|
||||
- ✅ Multiple sites can be active simultaneously
|
||||
- ✅ Maximum 5 active sectors per site
|
||||
|
||||
#### Planner Module
|
||||
- ✅ Keywords CRUD operations
|
||||
- ✅ Keyword import/export (CSV)
|
||||
- ✅ Keyword filtering and organization
|
||||
- ✅ AI-powered keyword clustering
|
||||
- ✅ Clusters CRUD operations
|
||||
- ✅ Content ideas generation from clusters
|
||||
- ✅ Content ideas CRUD operations
|
||||
- ✅ Keyword-to-cluster mapping
|
||||
- ✅ Cluster metrics and analytics
|
||||
|
||||
#### Writer Module
|
||||
- ✅ Tasks CRUD operations
|
||||
- ✅ AI-powered content generation
|
||||
- ✅ Content editing and review
|
||||
- ✅ Image prompt extraction
|
||||
- ✅ AI-powered image generation (OpenAI DALL-E, Runware)
|
||||
- ✅ Image management
|
||||
- ✅ WordPress integration (publishing)
|
||||
|
||||
#### Thinker Module
|
||||
- ✅ AI prompt management
|
||||
- ✅ Author profile management
|
||||
- ✅ Content strategy management
|
||||
- ✅ Image generation testing
|
||||
|
||||
#### System Module
|
||||
- ✅ Integration settings (OpenAI, Runware)
|
||||
- ✅ API key configuration
|
||||
- ✅ Connection testing
|
||||
- ✅ System status and monitoring
|
||||
|
||||
#### Billing Module
|
||||
- ✅ Credit balance tracking
|
||||
- ✅ Credit transactions
|
||||
- ✅ Usage logging
|
||||
- ✅ Cost tracking
|
||||
|
||||
#### Frontend
|
||||
- ✅ Configuration-driven UI system
|
||||
- ✅ 4 universal templates (Dashboard, Table, Form, System)
|
||||
- ✅ Complete component library
|
||||
- ✅ Zustand state management
|
||||
- ✅ React Router v6 routing
|
||||
- ✅ Progress tracking for AI tasks
|
||||
- ✅ AI Request/Response Logs
|
||||
- ✅ Responsive design
|
||||
|
||||
#### Backend
|
||||
- ✅ RESTful API with DRF
|
||||
- ✅ Automatic account isolation
|
||||
- ✅ Site access control
|
||||
- ✅ Celery async task processing
|
||||
- ✅ Progress tracking for Celery tasks
|
||||
- ✅ Unified AI framework
|
||||
- ✅ Database logging
|
||||
|
||||
#### AI Functions
|
||||
- ✅ Auto Cluster Keywords
|
||||
- ✅ Generate Ideas
|
||||
- ✅ Generate Content
|
||||
- ✅ Generate Image Prompts
|
||||
- ✅ Generate Images
|
||||
- ✅ Test OpenAI connection
|
||||
- ✅ Test Runware connection
|
||||
- ✅ Test image generation
|
||||
|
||||
#### Infrastructure
|
||||
- ✅ Docker-based containerization
|
||||
- ✅ Two-stack architecture (infra, app)
|
||||
- ✅ Caddy reverse proxy
|
||||
- ✅ PostgreSQL database
|
||||
- ✅ Redis cache and Celery broker
|
||||
- ✅ pgAdmin database administration
|
||||
- ✅ FileBrowser file management
|
||||
|
||||
---
|
||||
|
||||
## Planned Features
|
||||
|
||||
### In Progress
|
||||
|
||||
- 🔄 Planner Dashboard enhancement with KPIs
|
||||
- 🔄 WordPress integration (publishing) - partial implementation
|
||||
- 🔄 Automation & CRON tasks
|
||||
|
||||
### Future
|
||||
|
||||
- 📋 Analytics module enhancements
|
||||
- 📋 Advanced scheduling features
|
||||
- 📋 Additional AI model integrations
|
||||
- 📋 Stripe payment integration
|
||||
- 📋 Plan limits enforcement
|
||||
- 📋 Rate limiting
|
||||
- 📋 Advanced reporting
|
||||
- 📋 Mobile app support
|
||||
|
||||
---
|
||||
|
||||
## Version History
|
||||
|
||||
### Current Version
|
||||
|
||||
**Version**: 1.0
|
||||
**Date**: 2025-01-XX
|
||||
**Status**: Production
|
||||
|
||||
### Key Milestones
|
||||
|
||||
- **2025-01-XX**: Documentation consolidation
|
||||
- **2025-01-XX**: AI framework implementation
|
||||
- **2025-01-XX**: Multi-tenancy system
|
||||
- **2025-01-XX**: Frontend configuration system
|
||||
- **2025-01-XX**: Docker deployment setup
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- All features are documented in detail in the respective documentation files
|
||||
- Workflows are complete and accurate
|
||||
- System is production-ready
|
||||
- Documentation is maintained and updated regularly
|
||||
|
||||
1244
docs/06-FUNCTIONAL-BUSINESS-LOGIC.md
Normal file
1244
docs/06-FUNCTIONAL-BUSINESS-LOGIC.md
Normal file
File diff suppressed because it is too large
Load Diff
146
docs/README.md
146
docs/README.md
@@ -1,146 +0,0 @@
|
||||
# IGNY8 Documentation
|
||||
|
||||
**Last Updated:** 2025-01-XX
|
||||
**Purpose:** Complete documentation index for the IGNY8 platform.
|
||||
|
||||
---
|
||||
|
||||
## 📚 Documentation Structure
|
||||
|
||||
All documentation is organized in this single folder with the following structure:
|
||||
|
||||
### Core Documentation
|
||||
|
||||
1. **[01-ARCHITECTURE-TECH-STACK.md](./01-ARCHITECTURE-TECH-STACK.md)**
|
||||
- Technology stack overview
|
||||
- System architecture principles
|
||||
- Infrastructure components
|
||||
- External service integrations
|
||||
|
||||
2. **[02-APP-ARCHITECTURE.md](./02-APP-ARCHITECTURE.md)**
|
||||
- IGNY8 application architecture
|
||||
- System hierarchy and relationships
|
||||
- Module organization
|
||||
- Complete workflows
|
||||
- Data flow and processing
|
||||
- Multi-tenancy architecture
|
||||
- Security architecture
|
||||
|
||||
3. **[03-FRONTEND.md](./03-FRONTEND.md)**
|
||||
- Frontend architecture
|
||||
- Project structure
|
||||
- Routing system
|
||||
- Template system
|
||||
- Component library
|
||||
- State management
|
||||
- API integration
|
||||
- Configuration system
|
||||
- All pages and features
|
||||
|
||||
4. **[04-BACKEND.md](./04-BACKEND.md)**
|
||||
- Backend architecture
|
||||
- Project structure
|
||||
- Models and relationships
|
||||
- ViewSets and API endpoints
|
||||
- Serializers
|
||||
- Celery tasks
|
||||
- Middleware
|
||||
- All modules (Planner, Writer, System, Billing, Auth)
|
||||
|
||||
5. **[05-AI-FUNCTIONS.md](./05-AI-FUNCTIONS.md)**
|
||||
- AI framework architecture
|
||||
- All 5 AI functions (complete details)
|
||||
- AI function execution flow
|
||||
- Prompt management
|
||||
- Model configuration
|
||||
- Progress tracking
|
||||
- Cost tracking
|
||||
|
||||
6. **[06-CHANGELOG.md](./06-CHANGELOG.md)**
|
||||
- System changelog
|
||||
- Feature additions
|
||||
- Updates and improvements
|
||||
- Version history
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
1. **New to IGNY8?** Start with [01-ARCHITECTURE-TECH-STACK.md](./01-ARCHITECTURE-TECH-STACK.md) for technology overview
|
||||
2. **Understanding the System?** Read [02-APP-ARCHITECTURE.md](./02-APP-ARCHITECTURE.md) for complete architecture
|
||||
3. **Frontend Development?** See [03-FRONTEND.md](./03-FRONTEND.md) for all frontend details
|
||||
4. **Backend Development?** See [04-BACKEND.md](./04-BACKEND.md) for all backend details
|
||||
5. **Working with AI?** See [05-AI-FUNCTIONS.md](./05-AI-FUNCTIONS.md) for AI functions
|
||||
6. **What's New?** Check [06-CHANGELOG.md](./06-CHANGELOG.md) for recent changes
|
||||
|
||||
---
|
||||
|
||||
## 📋 Documentation Overview
|
||||
|
||||
### System Capabilities
|
||||
|
||||
- **Multi-Tenancy**: Complete account isolation with automatic filtering
|
||||
- **Planner Module**: Keywords, Clusters, Content Ideas management
|
||||
- **Writer Module**: Tasks, Content, Images generation and management
|
||||
- **Thinker Module**: Prompts, Author Profiles, Strategies, Image Testing
|
||||
- **System Module**: Settings, Integrations, AI Prompts
|
||||
- **Billing Module**: Credits, Transactions, Usage Logs
|
||||
- **AI Functions**: 5 AI operations (Auto Cluster, Generate Ideas, Generate Content, Generate Image Prompts, Generate Images)
|
||||
|
||||
### Technology Stack
|
||||
|
||||
- **Backend**: Django 5.2+ with Django REST Framework
|
||||
- **Frontend**: React 19 with TypeScript and Vite
|
||||
- **Database**: PostgreSQL 15
|
||||
- **Task Queue**: Celery with Redis
|
||||
- **Deployment**: Docker-based containerization
|
||||
- **Reverse Proxy**: Caddy (HTTPS)
|
||||
|
||||
---
|
||||
|
||||
## 🔍 Finding Information
|
||||
|
||||
### By Topic
|
||||
|
||||
- **Architecture & Design**: [01-ARCHITECTURE-TECH-STACK.md](./01-ARCHITECTURE-TECH-STACK.md), [02-APP-ARCHITECTURE.md](./02-APP-ARCHITECTURE.md)
|
||||
- **Frontend Development**: [03-FRONTEND.md](./03-FRONTEND.md)
|
||||
- **Backend Development**: [04-BACKEND.md](./04-BACKEND.md)
|
||||
- **AI Functions**: [05-AI-FUNCTIONS.md](./05-AI-FUNCTIONS.md)
|
||||
- **Changes & Updates**: [06-CHANGELOG.md](./06-CHANGELOG.md)
|
||||
|
||||
### By Module
|
||||
|
||||
- **Planner**: See [02-APP-ARCHITECTURE.md](./02-APP-ARCHITECTURE.md) (Module Organization) and [04-BACKEND.md](./04-BACKEND.md) (Planner Module)
|
||||
- **Writer**: See [02-APP-ARCHITECTURE.md](./02-APP-ARCHITECTURE.md) (Module Organization) and [04-BACKEND.md](./04-BACKEND.md) (Writer Module)
|
||||
- **Thinker**: See [03-FRONTEND.md](./03-FRONTEND.md) (Thinker Pages) and [04-BACKEND.md](./04-BACKEND.md) (System Module)
|
||||
- **System**: See [04-BACKEND.md](./04-BACKEND.md) (System Module)
|
||||
- **Billing**: See [04-BACKEND.md](./04-BACKEND.md) (Billing Module)
|
||||
|
||||
---
|
||||
|
||||
## 📝 Documentation Standards
|
||||
|
||||
- **No Code**: Documentation focuses on workflows, features, and architecture (no code snippets)
|
||||
- **Complete**: All workflows and features are documented
|
||||
- **Accurate**: Documentation reflects current system state
|
||||
- **Detailed**: Comprehensive coverage of all aspects
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Keeping Documentation Updated
|
||||
|
||||
Documentation is updated when:
|
||||
- New features are added
|
||||
- Workflows change
|
||||
- Architecture evolves
|
||||
- Modules are modified
|
||||
|
||||
**Last Review**: 2025-01-XX
|
||||
**Next Review**: As system evolves
|
||||
|
||||
---
|
||||
|
||||
## 📞 Support
|
||||
|
||||
For questions or clarifications about the documentation, refer to the specific document or contact the development team.
|
||||
|
||||
Reference in New Issue
Block a user