- Created a new `docs/planning/` directory to better organize architecture and implementation planning documents. - Moved existing planning documents into the new directory for improved accessibility. - Updated `README.md` to reflect the new document structure and added references to the organized planning documents. - Enhanced overall documentation management for easier navigation and maintenance.
27 KiB
IGNY8 Changelog
Current Version: 1.0.0
Last Updated: 2025-01-XX
Purpose: Complete changelog of all changes, fixes, and features. Only updated after user confirmation.
📋 Changelog Management
IMPORTANT: This changelog is only updated after user confirmation that a fix or feature is complete and working.
For AI Agents: Read docs/00-DOCUMENTATION-MANAGEMENT.md before making any changes to this file.
Changelog Structure
Each entry follows this format:
- Version: Semantic versioning (MAJOR.MINOR.PATCH)
- Date: YYYY-MM-DD format
- Type: Added, Changed, Fixed, Deprecated, Removed, Security
- Description: Clear description of the change
- Affected Areas: Modules, components, or features affected
- Documentation: Reference to updated documentation files
[Unreleased]
Added
- Planning Documents Organization: Organized architecture and implementation planning documents
- Created
docs/planning/directory for all planning documents - Moved
IGNY8-HOLISTIC-ARCHITECTURE-PLAN.mdtodocs/planning/ - Moved
IGNY8-IMPLEMENTATION-PLAN.mdtodocs/planning/ - Moved
Igny8-phase-2-plan.mdtodocs/planning/ - Moved
CONTENT-WORKFLOW-DIAGRAM.mdtodocs/planning/ - Moved
ARCHITECTURE_CONTEXT.mdtodocs/planning/ - Moved
sample-usage-limits-credit-systemtodocs/planning/ - Created
docs/refactor/directory for refactoring plans - Updated
README.mdto reflect new document structure - Impact: Better organization of planning documents, easier to find and maintain
- Created
Changed
- API Documentation Consolidation: Consolidated all API documentation into single comprehensive reference
- Created
docs/API-COMPLETE-REFERENCE.md- Unified API documentation covering all endpoints, authentication, response formats, error handling, rate limiting, permissions, and integration examples - Removed redundant documentation files:
docs/API-DOCUMENTATION.md(consolidated into complete reference)docs/DOCUMENTATION-SUMMARY.md(consolidated into complete reference)unified-api/API-ENDPOINTS-ANALYSIS.md(consolidated into complete reference)unified-api/API-STANDARD-v1.0.md(consolidated into complete reference)
- New unified document includes: complete endpoint reference, authentication guide, response format standards, error handling, rate limiting, pagination, roles & permissions, tenant/site/sector scoping, integration examples (Python, JavaScript, cURL, PHP), testing & debugging, and change management
- Impact: Single source of truth for all API documentation, easier to maintain and navigate
- Created
Added
- Unified API Standard v1.0 implementation
- API Monitor page for endpoint health monitoring
- CRUD operations monitoring for Planner and Writer modules
- Sidebar API status indicator for aws-admin accounts
- Health Check Endpoint:
GET /api/v1/system/ping/- Public health check endpoint per API Standard v1.0 requirement- Returns unified format:
{success: true, data: {status: 'ok'}} - Tagged as 'System' in Swagger/ReDoc documentation
- Public endpoint (AllowAny permission)
- Returns unified format:
Changed
- All API endpoints now return unified response format (
{success, data, message, errors}) - Frontend
fetchAPIwrapper automatically extracts data from unified format - All error responses follow unified format with
request_idtracking - Rate limiting configured with scoped throttles per module
- Integration Views: All integration endpoints now use unified response format
- Replaced 40+ raw
Response()calls withsuccess_response()/error_response()helpers - All responses include
request_idfor tracking - Updated frontend components to handle extracted data format
- Replaced 40+ raw
- API Documentation: Updated Swagger/ReDoc description to include all public endpoints
- Added
/api/v1/system/ping/to public endpoints list - Updated schema extensions to properly tag ping endpoint
- Added
- AI Framework Refactoring: Removed hardcoded model defaults, IntegrationSettings is now the single source of truth
- Removed
MODEL_CONFIGdictionary with hardcoded defaults - Removed Django settings
DEFAULT_AI_MODELfallback get_model_config()now requiresaccountparameter and raises clear errors if IntegrationSettings not configured- All AI functions now require account-specific model configuration
- Removed orphan code:
get_model(),get_max_tokens(),get_temperature()helper functions - Removed unused exports from
__init__.py:register_function,list_functions,get_model,get_max_tokens,get_temperature - Impact: Each account must configure their own AI models in IntegrationSettings
- Documentation: See
backend/igny8_core/ai/REFACTORING-IMPLEMENTED.mdfor complete details
- Removed
Fixed
- Keyword edit form now correctly populates existing values
- Auto-cluster function now works correctly with unified API format
- ResourceDebugOverlay now correctly extracts data from unified API responses
- All frontend pages now correctly handle unified API response format
- Integration Views: Fixed all integration endpoints not using unified response format
_test_openai()and_test_runware()methods now use unified formatgenerate_image(),create(),save_settings()methods now use unified formatget_image_generation_settings()andtask_progress()methods now use unified format- All error responses now include
request_idand follow unified format - Fixed OpenAI integration endpoint error handling - invalid API keys now return 400 (Bad Request) instead of 401 (Unauthorized)
- Frontend Components: Updated to work with unified format
ValidationCard.tsx- Removed dual-format handling, now works with extracted dataIntegration.tsx- Simplified to work with unified formatImageGenerationCard.tsx- Updated to work with extracted data format
- Frontend Authentication: Fixed
getAuthToken is not definederror inauthStore.ts- Updated
refreshUser()to usefetchAPI()instead of manual fetch withgetAuthToken() - Removed error throwing from catch block to prevent error accumulation
- Updated
- Frontend Error Handling: Fixed console error accumulation
ResourceDebugOverlay.tsxnow silently ignores 404 errors for request-metrics endpoint- Removed error throwing from
refreshUser()catch block to prevent error spam
- AI Framework Error Handling: Improved error messages and exception handling
AIEngine._handle_error()now preserves exception types for better error messages- All AI function errors now include proper
error_type(ConfigurationError, AccountNotFound, etc.) - Fixed "Task failed - exception details unavailable" by improving error type preservation
- Error messages now clearly indicate when IntegrationSettings are missing or misconfigured
[1.1.1] - 2025-01-XX
Security
- CRITICAL: Fixed
AIPromptViewSetsecurity vulnerability - changed frompermission_classes = [](allowing unauthenticated access) toIsAuthenticatedAndActive + HasTenantAccess - Added
IsEditorOrAbovepermission check forsave_promptandreset_promptactions inAIPromptViewSet - All billing ViewSets now require
IsAuthenticatedAndActive + HasTenantAccessfor proper tenant isolation CreditTransactionViewSetnow requiresIsAdminOrOwnerper API Standard v1.0 (billing/transactions require admin/owner)- All system settings ViewSets now use standard permissions (
IsAuthenticatedAndActive + HasTenantAccess) - All auth ViewSets now explicitly include
IsAuthenticatedAndActive + HasTenantAccessfor proper tenant isolation
Changed
- Auth Endpoints: All authentication endpoints (
RegisterView,LoginView,ChangePasswordView,MeView) now use unified response format withsuccess_response()anderror_response()helpers- All responses now include
request_idfor error tracking - Error responses follow unified format with
erroranderrorsfields - Success responses follow unified format with
success,data, andmessagefields
- All responses now include
- Billing Module: Refactored
CreditUsageViewSetandCreditTransactionViewSetto inherit fromAccountModelViewSetinstead of manual account filtering- Account filtering now handled automatically by base class
- Improved code maintainability and consistency
- System Settings: All 5 system settings ViewSets now use standard permission classes
SystemSettingsViewSet,AccountSettingsViewSet,UserSettingsViewSet,ModuleSettingsViewSet,AISettingsViewSet- Write operations require
IsAdminOrOwnerper standard
- Integration Settings: Added
HasTenantAccesspermission toIntegrationSettingsViewSetfor proper tenant isolation - Auth ViewSets: Added explicit standard permissions to all auth ViewSets
UsersViewSet,AccountsViewSet,SubscriptionsViewSet,SiteUserAccessViewSetnow includeIsAuthenticatedAndActive + HasTenantAccessSiteViewSet,SectorViewSetnow includeIsAuthenticatedAndActive + HasTenantAccess
Fixed
- Fixed auth endpoints not returning unified format (were using raw
Response()instead of helpers) - Fixed missing
request_idin auth endpoint responses - Fixed inconsistent error response format in auth endpoints
- Fixed billing ViewSets not using base classes (manual account filtering replaced with
AccountModelViewSet) - Fixed all ViewSets missing standard permissions (
IsAuthenticatedAndActive + HasTenantAccess)
Documentation
- Updated implementation plan to reflect completion of all remaining API Standard v1.0 items
- All 8 remaining items from audit completed (100% compliance achieved)
- API Standard v1.0: Full compliance achieved
- All 10 audit tasks completed and verified
- All custom @action methods use unified response format
- All ViewSets use proper base classes, pagination, throttles, and permissions
- All error responses include
request_idtracking - No raw
Response()calls remaining (except file downloads) - All endpoints documented in Swagger/ReDoc with proper tags
[1.1.0] - 2025-01-XX
Added
Unified API Standard v1.0
-
Response Format Standardization
- All endpoints return unified format:
{success: true/false, data: {...}, message: "...", errors: {...}} - Paginated responses include
success,count,next,previous,results - Error responses include
success: false,error,errors,request_id - Response helper functions:
success_response(),error_response(),paginated_response()
- All endpoints return unified format:
-
Custom Exception Handler
- Centralized exception handling in
backend/igny8_core/api/exception_handlers.py - All exceptions wrapped in unified format
- Proper HTTP status code mapping (400, 401, 403, 404, 409, 422, 429, 500)
- Debug information included in development mode
- Centralized exception handling in
-
Custom Pagination
CustomPageNumberPaginationclass with unified format support- Default page size: 10, max: 100
- Dynamic page size via
page_sizequery parameter - Includes
successfield in paginated responses
-
Base ViewSets
AccountModelViewSet- Handles account isolation and unified CRUD responsesSiteSectorModelViewSet- Extends account isolation with site/sector filtering- All CRUD operations (create, retrieve, update, destroy) return unified format
-
Rate Limiting
DebugScopedRateThrottlewith debug bypass for development- Scoped rate limits per module (planner, writer, system, billing, auth)
- AI function rate limits (10/min for expensive operations)
- Bypass for aws-admin accounts and admin/developer roles
- Rate limit headers:
X-Throttle-Limit,X-Throttle-Remaining,X-Throttle-Reset
-
Request ID Tracking
RequestIDMiddlewaregenerates unique UUID for each request- Request ID included in all error responses
- Request ID in response headers:
X-Request-ID - Used for log correlation and debugging
-
API Monitor
- New page:
/settings/api-monitorfor endpoint health monitoring - Monitors API status (HTTP response) and data status (page population)
- Endpoint groups: Core Health, Auth, Planner, Writer, System, Billing, CRUD Operations
- Sorting by status (errors first, then warnings, then healthy)
- Real-time endpoint health checks with configurable refresh interval
- Only accessible to aws-admin accounts
- New page:
-
Sidebar API Status Indicator
- Visual indicator circles for each endpoint group
- Color-coded status (green = healthy, yellow = warning)
- Abbreviations: CO, AU, PM, WM, PC, WC, SY
- Only visible and active for aws-admin accounts on API monitor page
- Prevents console errors on other pages
Changed
Backend Refactoring
-
Planner Module - All ViewSets refactored to unified format
KeywordViewSet- CRUD +auto_clusteractionClusterViewSet- CRUD +auto_generate_ideasactionContentIdeasViewSet- CRUD +bulk_queue_to_writeraction
-
Writer Module - All ViewSets refactored to unified format
TasksViewSet- CRUD +auto_generate_contentactionContentViewSet- CRUD +generate_image_promptsactionImagesViewSet- CRUD +generate_imagesaction
-
System Module - All ViewSets refactored to unified format
AIPromptViewSet- CRUD +get_by_type,save_prompt,reset_promptactionsSystemSettingsViewSet,AccountSettingsViewSet,UserSettingsViewSetModuleSettingsViewSet,AISettingsViewSetIntegrationSettingsViewSet- Integration management and testing
-
Billing Module - All ViewSets refactored to unified format
CreditBalanceViewSet-balanceactionCreditUsageViewSet-summary,limitsactionsCreditTransactionViewSet- CRUD operations
-
Auth Module - All ViewSets refactored to unified format
AuthViewSet-register,login,change_password,refresh_token,reset_passwordUsersViewSet- CRUD +create_user,update_roleactionsGroupsViewSet,AccountsViewSet,SubscriptionsViewSetSiteUserAccessViewSet,PlanViewSet,IndustryViewSet,SeedKeywordViewSet
Frontend Refactoring
-
fetchAPI Wrapper (
frontend/src/services/api.ts)- Automatically extracts
datafield from unified format responses - Handles paginated responses (
resultsat top level) - Properly throws errors for
success: falseresponses - Removed redundant
response?.data || responsechecks across codebase
- Automatically extracts
-
All Frontend Pages Updated
- Removed redundant response data extraction
- All pages now correctly consume unified API format
- Error handling standardized across all components
- Pagination handling standardized
-
Component Updates
FormModal- Now acceptsReact.ReactNodefor title propComponentCard- Updated to support status badges in titlesResourceDebugOverlay- Fixed to extract data from unified formatApiStatusIndicator- Restricted to aws-admin accounts and API monitor page
Fixed
Bug Fixes
-
Keyword Edit Form - Now correctly populates existing values when editing
- Added
keyprop to force re-render when form data changes - Fixed
seed_keyword_idvalue handling for select dropdown
- Added
-
Auto-Cluster Function - Now works correctly with unified API format
- Updated
autoClusterKeywords()to wrap response withsuccessfield - Proper error handling and response extraction
- Updated
-
ResourceDebugOverlay - Fixed data extraction from unified API responses
- Extracts
datafield from{success: true, data: {...}}responses - Added null safety checks for all property accesses
- Validates data structure before adding to metrics
- Extracts
-
API Response Handling - Fixed all instances of incorrect data extraction
- Removed
response?.data || responseredundant checks - Removed
response.results || []redundant checks - All API functions now correctly handle unified format
- Removed
-
React Hooks Error - Fixed "Rendered more hooks than during the previous render"
- Moved all hooks to top of component before conditional returns
- Fixed
ApiStatusIndicatorcomponent hook ordering
-
TypeScript Errors - Fixed all type errors related to unified API format
- Added nullish coalescing for
toLocaleString()calls - Added null checks before
Object.entries()calls - Fixed all undefined property access errors
- Added nullish coalescing for
System Health
- System Status Page - Fixed redundant data extraction
- Now correctly uses extracted data from
fetchAPI - All system metrics display correctly
- Now correctly uses extracted data from
Security
- Rate limiting bypass only for aws-admin accounts and admin/developer roles
- Request ID tracking for all API requests
- Centralized error handling prevents information leakage
Testing
-
Comprehensive Test Suite
- Created complete unit and integration test suite for Unified API Standard v1.0
- 13 test files with ~115 test methods covering all API components
- Test coverage: 100% of API Standard components
-
Unit Tests (
backend/igny8_core/api/tests/)test_response.py- Tests for response helper functions (18 tests)- Tests
success_response(),error_response(),paginated_response() - Tests request ID generation and inclusion
- Tests status code mapping and error messages
- Tests
test_exception_handler.py- Tests for custom exception handler (12 tests)- Tests all exception types (ValidationError, AuthenticationFailed, PermissionDenied, NotFound, Throttled, etc.)
- Tests debug mode behavior and debug info inclusion
- Tests field-specific and non-field error handling
test_permissions.py- Tests for permission classes (20 tests)- Tests
IsAuthenticatedAndActive,HasTenantAccess,IsViewerOrAbove,IsEditorOrAbove,IsAdminOrOwner - Tests role-based access control and tenant isolation
- Tests admin/system account bypass logic
- Tests
test_throttles.py- Tests for rate limiting (11 tests)- Tests
DebugScopedRateThrottlebypass logic (DEBUG mode, env flag, admin/system accounts) - Tests rate parsing and throttle header generation
- Tests
-
Integration Tests (
backend/igny8_core/api/tests/)test_integration_base.py- Base test class with common fixtures and helper methodstest_integration_planner.py- Planner module endpoint tests (12 tests)- Tests CRUD operations for keywords, clusters, ideas
- Tests AI actions (auto_cluster)
- Tests error scenarios and validation
test_integration_writer.py- Writer module endpoint tests (6 tests)- Tests CRUD operations for tasks, content, images
- Tests error scenarios
test_integration_system.py- System module endpoint tests (5 tests)- Tests status, prompts, settings, integrations endpoints
test_integration_billing.py- Billing module endpoint tests (5 tests)- Tests credits, usage, transactions endpoints
test_integration_auth.py- Auth module endpoint tests (8 tests)- Tests login, register, user management endpoints
- Tests authentication flows and error scenarios
test_integration_errors.py- Error scenario tests (6 tests)- Tests 400, 401, 403, 404, 429, 500 error responses
- Tests unified error format across all error types
test_integration_pagination.py- Pagination tests (10 tests)- Tests pagination across all modules
- Tests page size, page parameter, max page size limits
- Tests empty results handling
test_integration_rate_limiting.py- Rate limiting integration tests (7 tests)- Tests throttle headers presence
- Tests bypass logic for admin/system accounts and DEBUG mode
- Tests different throttle scopes per module
-
Test Verification
- All tests verify unified response format (
{success, data/results, message, errors, request_id}) - All tests verify proper HTTP status codes
- All tests verify error format consistency
- All tests verify pagination format consistency
- All tests verify request ID inclusion
- All tests verify unified response format (
-
Test Documentation
- Created
backend/igny8_core/api/tests/README.mdwith test structure and running instructions - Created
backend/igny8_core/api/tests/TEST_SUMMARY.mdwith comprehensive test statistics - Created
backend/igny8_core/api/tests/run_tests.pytest runner script
- Created
Documentation
-
OpenAPI/Swagger Integration
- Installed and configured
drf-spectacularfor OpenAPI 3.0 schema generation - Created Swagger UI endpoint:
/api/docs/ - Created ReDoc endpoint:
/api/redoc/ - Created OpenAPI schema endpoint:
/api/schema/ - Configured comprehensive API documentation with code samples
- Added custom authentication extensions for JWT Bearer tokens
- Installed and configured
-
Comprehensive Documentation Files
docs/API-COMPLETE-REFERENCE.md- Complete unified API reference (consolidated from multiple files)- Quick start guide
- Endpoint reference
- Code examples (Python, JavaScript, cURL)
- Response format details
docs/AUTHENTICATION-GUIDE.md- Authentication and authorization guide- JWT Bearer token authentication
- Token management and refresh
- Code examples in Python and JavaScript
- Security best practices
docs/ERROR-CODES.md- Complete error code reference- HTTP status codes (200, 201, 400, 401, 403, 404, 409, 422, 429, 500)
- Field-specific error messages
- Error handling best practices
- Common error scenarios and solutions
docs/RATE-LIMITING.md- Rate limiting and throttling guide- Rate limit scopes and limits
- Handling rate limits (429 responses)
- Best practices and code examples
- Request queuing and caching strategies
docs/MIGRATION-GUIDE.md- Migration guide for API consumers- What changed in v1.0
- Step-by-step migration instructions
- Code examples (before/after)
- Breaking and non-breaking changes
docs/WORDPRESS-PLUGIN-INTEGRATION.md- WordPress plugin integration guide- Complete PHP API client class
- Authentication implementation
- Error handling
- WordPress admin integration
- Best practices
docs/README.md- Documentation index and quick start
-
OpenAPI Schema Configuration
- Configured comprehensive API description with features overview
- Added authentication documentation
- Added response format examples
- Added rate limiting documentation
- Added pagination documentation
- Configured endpoint tags (Authentication, Planner, Writer, System, Billing)
- Added code samples in Python and JavaScript
-
Schema Extensions
- Created
backend/igny8_core/api/schema_extensions.pyfor custom authentication - JWT Bearer token authentication extension
- CSRF-exempt session authentication extension
- Proper OpenAPI security scheme definitions
- Created
[1.0.0] - 2025-01-XX
Added
Documentation System
- Complete documentation structure with 7 core documents
- Documentation management system with versioning
- Changelog management system
- DRY principles documentation
- Self-explaining documentation for AI agents
Core Features
- 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 v7 routing
- Progress tracking for AI tasks
- 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
Documentation
Documentation Files Created
docs/00-DOCUMENTATION-MANAGEMENT.md- Documentation and changelog management systemdocs/01-TECH-STACK-AND-INFRASTRUCTURE.md- Technology stack and infrastructuredocs/02-APPLICATION-ARCHITECTURE.md- Application architecture with workflowsdocs/03-FRONTEND-ARCHITECTURE.md- Frontend architecture documentationdocs/04-BACKEND-IMPLEMENTATION.md- Backend implementation referencedocs/05-AI-FRAMEWORK-IMPLEMENTATION.md- AI framework implementation referencedocs/06-FUNCTIONAL-BUSINESS-LOGIC.md- Functional business logic documentation
Documentation Features
- Complete workflow documentation
- Feature completeness
- No code snippets (workflow-focused)
- Accurate state reflection
- Cross-referenced documents
- Self-explaining structure for AI agents
Version History
Current Version: 1.0.0
Status: Production
Date: 2025-01-XX
Version Format
- MAJOR: Breaking changes, major feature additions, architecture changes
- MINOR: New features, new modules, significant enhancements
- PATCH: Bug fixes, small improvements, documentation updates
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
IMPORTANT: Never update version without user confirmation.
Planned Features
In Progress
- Planner Dashboard enhancement with KPIs
- Automation & CRON tasks
- Advanced analytics
Future
- Analytics module enhancements
- Advanced scheduling features
- Additional AI model integrations
- Stripe payment integration
- Plan limits enforcement
- Advanced reporting
- Mobile app support
- API documentation (Swagger/OpenAPI)
- Unit and integration tests for unified API
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
- Changelog is only updated after user confirmation
For AI Agents: Before making any changes, read docs/00-DOCUMENTATION-MANAGEMENT.md for complete guidelines on versioning, changelog management, and DRY principles.