ai_qc/backend/profiles/README.md
nickviljoen 3fec052c12 Create frontend and backend folder structure for deployment
Organized the application into separate frontend and backend directories for cleaner deployment and better separation of concerns.

Frontend Directory (frontend/):
- index.html: Single-page web interface (renamed from web_ui.html)
- README.md: Frontend deployment guide
- Total size: ~113 KB (self-contained)
- Smart base path detection (works at / or /ai_qc/)
- No configuration changes required

Backend Directory (backend/):
- All Python files (api_server.py, llm_config.py, etc.)
- visual_qc_apps/: 33 QC check modules
- profiles/: 6 QC profile configurations
- brand_guidelines/: Reference asset storage
- config/: Environment configurations
- scripts/: Deployment automation
- uploads/, output/: Data directories
- requirements.txt, ai_qc.service, apache_config.conf
- Complete documentation

New Documentation:
- FOLDER_STRUCTURE.md: Comprehensive guide to new structure
- frontend/README.md: Frontend deployment instructions
- backend/BACKEND_README.md: Backend deployment guide

Deployment Mapping:
- frontend/ → /var/www/html/ai_qc/ (web root)
- backend/ → /opt/ai_qc/ (application directory)

Benefits:
- Clear separation of concerns
- Backend code not in web-accessible directory
- Independent frontend/backend updates
- Matches server's existing patterns (/opt/veo3, /opt/voice2text)
- Industry-standard architecture
- Easy to deploy and maintain

Original files preserved in root directory for reference.
Ready for production deployment following MIGRATION_GUIDE.md.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 11:55:53 +02:00

4.6 KiB
Executable file

Visual AI QC Profiles

This directory contains JSON profile configurations for the Visual AI QC application. Profiles determine which QC checks are run, their weights, and which LLM (OpenAI or Gemini) is used for each check.

Profile Structure

Each profile is defined in its own JSON file with the following structure:

{
    "name": "Profile Name",
    "description": "Description of the profile and its purpose",
    "checks": {
        "check_name_1": {
            "weight": 0.10,
            "llm": "OpenAI",
            "enabled": true
        },
        "check_name_2": {
            "weight": 0.15,
            "llm": "Gemini",
            "enabled": true
        }
        // Add more checks as needed
    }
}

Fields Explanation

  • name: The display name of the profile (shown in the UI)
  • description: A short description explaining the profile's purpose
  • checks: A dictionary of QC checks to include in this profile
    • Each check entry contains:
      • weight: The weight of this check in the overall score (between 0 and 1, sum of all weights should equal 1)
      • llm: The LLM to use for this check ("OpenAI" or "Gemini")
      • enabled: Whether this check is enabled (true/false)

Adding New Profiles

To add a new profile:

  1. Create a new JSON file in this directory (e.g., my_brand.json)
  2. Define the profile structure following the format above
  3. Include only the checks relevant to your profile
  4. Ensure the sum of weights equals 1.0 (100%)
  5. Restart the application to load the new profile

The profile ID will be the filename without the .json extension. For example, my_brand.json will create a profile with ID my_brand.

Available QC Checks

Here are the available QC checks you can include in your profiles:

Visual Design Checks

  • logo_visibility: Checks if the logo is clearly visible
  • brand_assets_visibility: Checks if brand assets are prominent
  • visual_elements_count: Counts and evaluates visual elements
  • background_contrast: Evaluates contrast between foreground and background
  • face_visibility: Checks if faces are clearly visible
  • visual_hierarchy: Analyzes the visual hierarchy
  • supporting_images: Evaluates supporting imagery
  • curved_edges: Checks for curved edges in design
  • product_visibility: Checks if product is clearly visible

Text & Copy Checks

  • lowercase_text: Checks text casing
  • call_to_action: Evaluates call to action text
  • word_count: Checks word count
  • imperative_verb: Checks for imperative verbs
  • text_readability: Evaluates text readability

Layout & Composition Checks

  • new_visibility: Checks if "NEW" tag is prominently displayed
  • visuals_left_text_right: Checks layout for visuals on left, text on right
  • face_gaze_direction: Checks direction of faces gazing
  • element_alignment: Checks alignment of elements
  • aspect_ratio: Verifies correct aspect ratio
  • responsiveness: Tests responsiveness for different screens

Technical Checks

  • file_naming: Checks file naming conventions
  • layer_organization: Validates layer organization
  • color_format: Checks color format compliance
  • image_resolution: Verifies image resolution
  • safety_area: Checks safety areas/margins
  • print_bleed: Verifies print bleed areas
  • crop_marks: Checks crop marks
  • animation_transitions: Evaluates animation transitions
  • dark_mode_legibility: Tests legibility in dark mode

Example Profile

Here's an example profile for a brand that focuses on product visibility and call to action:

{
    "name": "Product Marketing",
    "description": "Profile optimized for product marketing materials",
    "checks": {
        "product_visibility": {
            "weight": 0.30,
            "llm": "OpenAI",
            "enabled": true
        },
        "call_to_action": {
            "weight": 0.20,
            "llm": "OpenAI",
            "enabled": true
        },
        "brand_assets_visibility": {
            "weight": 0.15,
            "llm": "OpenAI",
            "enabled": true
        },
        "background_contrast": {
            "weight": 0.10,
            "llm": "Gemini",
            "enabled": true
        },
        "visual_hierarchy": {
            "weight": 0.15,
            "llm": "OpenAI",
            "enabled": true
        },
        "image_resolution": {
            "weight": 0.10,
            "llm": "Gemini",
            "enabled": true
        }
    }
}

Default Profiles

The system includes these default profiles:

  1. default.json - All checks enabled with equal weighting
  2. diageo.json - Diageo brand guidelines
  3. unilever.json - Unilever brand guidelines
  4. general.json - General technical checks