Commit graph

2 commits

Author SHA1 Message Date
Simeon.Schecter
00888168f0 Add Prompt Studio React frontend with image generation integration
- Add Prompt Studio React app with cinematic prompt optimization
- Integrate image generation via PHP backend API
- Support multi-reference image uploads (up to 14 images)
- Add resolution selector (1K/2K/4K)
- Make generated prompts editable before image generation
- Fix application lighting styles being passed to Gemini API
- Reorganize UI: inputs on left, outputs on right
- Update api.php to handle multiple reference images
- Add get_current_image.php endpoint for session image retrieval

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 16:25:20 -05:00
DJP
0621cf10ad Add webhook logging for all user actions
Implemented complete webhook integration following the pattern
from AI-ASSISTANT app. All user actions now logged to Make.com.

NEW FILE:
- webhook_logger.php - Central webhook utility

WEBHOOK FUNCTIONS:
- sendToWebhook($data) - Core webhook sender
- logImageGeneration() - Log image creation/edits
- logPromptEnhancement() - Log prompt enhancements
- logUserAction() - Log general actions

WEBHOOK URL:
https://hook.us1.make.celonis.com/sbhcpk0athbdbxxmgijxc5sbwtjsg33h

DATA SENT:

Image Generation:
- client: 'Internal'
- deliverableNumber: 'NANO-{timestamp}'
- userEmail: from auth or anonymous
- generationType: 'Nano Banana Pro - Imagen 3'
- actionType: 'generate' or 'edit'
- prompt: user's prompt
- settings: {aspectRatio, imageSize, model}
- imageFile: 'data:image/png;base64,{image}'

Prompt Enhancement:
- generationType: 'Nano Banana Pro - Prompt Enhancement'
- actionType: 'prompt_enhancement'
- originalPrompt: scene description
- enhancedPrompt: AI-enhanced result
- settings: {camera, lens, application, creativeFreedom}

INTEGRATION POINTS:
- api.php - Logs every image generation/edit
- enhance_prompt.php - Logs every prompt enhancement
- Auth status included (user email)

ERROR HANDLING:
- Webhook failures don't break the app
- Errors logged to error_log
- 10 second timeout on webhook calls
- Graceful degradation

All user actions now tracked in Make.com! 📊

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

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2025-12-16 11:55:23 -05:00