StoryCore-Engine Improvement Plan - API Plugin Enhancement
Module
Status
Coverage
Python Backend
✅ Stable
95%+
TypeScript Frontend
✅ Stable
90%+
API Plugin (Addon Routes)
🚧 Beta
85%+
WebSocket API
🚧 Beta
80%+
src/api/addon_routes.py - Complete FastAPI addon management with 15+ endpoints
creative-studio-ui/src/services/AddonManager.ts - Full-featured TypeScript addon system
src/api_server.py - Simple HTTP demo server (legacy)
src/api_server_fastapi.py - Main FastAPI v2.0 server (active)
src/api_server_simple.py - Simplified standalone server
3 API server files in src/
3 error handler files in src/
Phase 1: Code Consolidation (High Priority) ✅ COMPLETED
1.1 Error Handlers - NO ACTION NEEDED ❌
After detailed analysis, these files are NOT duplicates - they serve different purposes:
File
Purpose
Keep
src/error_handler.py
ComfyUI-specific error handling
✅ KEEP
src/advanced_error_handling.py
General resilience patterns (circuit breakers, chaos testing)
✅ KEEP
src/ai_error_handler.py
AI-specific error handling
✅ KEEP
Reason: Each handles errors at a different layer and is complementary.
1.2 API Server Files - DEPRECATE LEGACY ✅ COMPLETED
Action
File
Description
KEEP
src/api_server_fastapi.py
Main FastAPI server (most complete)
DEPRECATE
src/api_server.py
✅ Added deprecation notice
DEPRECATE
src/api_server_simple.py
✅ Added deprecation notice
Phase 2: API Plugin Enhancements (High Priority) ✅ COMPLETED
2.1 Addon API Improvements ✅ DONE
2.2 New API Endpoints ✅ DONE
Phase 3: Frontend UI Improvements (Medium Priority) ✅ COMPLETED
3.1 AddonManager.ts Enhancements ✅ DONE
3.2 Dashboard Enhancements ✅ DONE
Phase 4: Performance Optimizations (Medium Priority)
4.1 Backend Optimizations
4.2 Frontend Optimizations
Phase 5: Testing & Documentation (High Priority)
📦 Dependent Files to Edit
File
Changes
src/api_server.py
Add deprecation notice, redirect to FastAPI
src/api_server_simple.py
Add deprecation notice
src/error_handler.py
Merge into ai_error_handler
src/advanced_error_handling.py
Merge into ai_error_handler
src/api/addon_routes.py
Add new endpoints, pagination
creative-studio-ui/src/services/AddonManager.ts
Add new features
Execute Phase 1 : Run consolidation commands
Test API : Verify all endpoints work after merge
Update Dependencies : Ensure no breaking changes
Run Tests : Execute full test suite
Update Documentation : Reflect changes in docs
Metric
Current
Target
API Plugin Coverage
85%
95%
TypeScript Errors
0
0
Test Coverage
90%
95%
API Response Time
<200ms
<100ms