No description
## New Features ### L'Oréal Static General Profile - Created new profile with 3 checks optimized for digital marketing assets - Even weighting (33.3% each) for 100-point scoring scale - Removed print-specific requirements (3m viewing distance) - Focus on marketing text vs product packaging distinction ### Multi-File Queue System (web_ui.html) - Added file queue functionality for batch processing - Users can now upload and process multiple files simultaneously - Queue displays file status (pending, analyzing, complete, error) - Individual file removal and queue clearing options - Progress tracking for batch operations ### New General QC Checks 1. background_contrast_general - Optimized for digital assets (no distance requirements) - Checks logo, product, and marketing text contrast - Detects overlapping and blending issues - Provides element-by-element breakdown 2. text_readability_general - Focus on marketing text only (excludes product packaging) - Checks for overlapping elements - Digital readability optimization - Specific issue identification 3. language_consistency (enhanced) - Better distinction between marketing and packaging text - Detailed language detection and reporting - Lists specific text analyzed ### Usage Tracking System - Added usage_tracker.py for analysis logging - Tracks user activity, profile usage, and costs - Daily log files in JSONL format - Cost estimation per LLM provider ## Bug Fixes ### Authentication & User Management - Fixed Flask 'g' import missing issue - Fixed user info access in background threads - Pass user_info to threads instead of accessing g.user - Improved error handling for usage logging ### HTML Report Generation - Fixed missing analysis details in reports - Now extracts and displays all JSON fields properly - Shows comprehensive breakdowns: - Analysis details - Elements checked (logo, product, text) - Marketing text found - Issues identified - Specific recommendations - No more blank "Pass/Fail" results ### Scoring System - Fixed usage_tracker to handle dict of check results (not list) - Better handling of model_used field variations - Skip non-dict check results gracefully ## Configuration Changes ### Model Versions (llm_config.py) - Fixed invalid GPT-4.1 model ID to gpt-4o - Added Gemini 3 Pro beta model option - AVAILABLE_MODELS dict for UI selection - Model version override support ### Profile Updates - Static General: 3 checks, total weight 10.0 - Each check: text_readability_general (3.33), background_contrast_general (3.33), language_consistency (3.34) - Maximum score: 100 points ## Technical Improvements - Enhanced prompt engineering for consistent LLM outputs - Mandatory detailed explanations in all checks - Structured JSON responses with comprehensive fields - Better error messages and fallback handling - Client configuration support (client_config.py) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| __pycache__ | ||
| backend | ||
| config | ||
| frontend | ||
| output | ||
| uploads | ||
| .gitignore | ||
| ai_qc.service | ||
| apache_config.conf | ||
| AUTH_FIX_GUIDE.md | ||
| backend_backup_20251206_153116.tar.gz | ||
| CLAUDE.md | ||
| CLEANUP_SUMMARY.md | ||
| config.env | ||
| debug_mode.txt | ||
| DEPLOYMENT_RESTRUCTURE.md | ||
| DEPLOYMENT_STEPS.md | ||
| DEV_PROD_SETUP.md | ||
| FOLDER_STRUCTURE.md | ||
| headless_curl_examples.sh | ||
| MIGRATION_CHECKLIST.md | ||
| MIGRATION_GUIDE.md | ||
| MIGRATION_SUMMARY.md | ||
| msal_pkce_flow.md | ||
| README.md | ||
| REORGANIZATION_COMPLETE.md | ||
| requirements.txt | ||
| server.log | ||
| server_debug.log | ||
| web_ui.html | ||
Visual AI QC - Repository Structure
⚠️ Important: Work in backend/ Directory
All development and production code is now in the backend/ directory.
Directory Structure
ai_qc/
├── backend/ # 👈 MAIN APPLICATION - Work here!
│ ├── api_server.py # Flask application
│ ├── llm_config.py # LLM configuration (Gemini model settings)
│ ├── profile_config.py # Profile management
│ ├── visual_qc_apps/ # QC check modules (33 checks)
│ ├── profiles/ # QC profile configurations (6 profiles)
│ ├── brand_guidelines/ # Reference assets
│ ├── scripts/ # Deployment scripts
│ ├── config/ # Environment configs
│ ├── uploads/ # File uploads (production)
│ ├── output/ # Generated reports (production)
│ └── ... # All other application files
│
├── frontend/ # Frontend-only deployment (optional)
├── config/ # Legacy config (deprecated)
└── CLAUDE.md # Development guide
Quick Start
Local Development
cd backend/
./scripts/run-local.sh
# Access at http://localhost:7183
Production Deployment
# SSH to production server
ssh user@server
# Deploy backend to /opt/ai_qc
cd /opt/ai_qc
git pull origin main
cd backend
sudo systemctl restart ai_qc.service
Why This Structure?
Previously, we had duplicate files in both root and backend/ directories, causing sync issues. Now:
✅ Single source of truth: All code in backend/
✅ No sync issues: No duplicate files to keep in sync
✅ Clear structure: Production deploys from backend/
✅ Simpler workflow: One place to make changes
Documentation
- Full Documentation: See
backend/CLAUDE.md - Deployment Guide: See
backend/DEV_PROD_SETUP.md - API Endpoints: See
backend/README.md
Making Changes
- Navigate to
backend/ - Make your changes
- Test locally with
./scripts/run-local.sh - Commit and push
- Deploy to production:
git pullon server
🚀 Always work in the backend/ directory!