name: "HTMLStoreGeneratorDebug"
version: "1.0.0"
schema: "v1"
prompts:
- name: "debugReport"
description: "Detailed debugging report for HTML Store Generator project"
prompt: |
Project Overview:
The HTML Store Generator is a system for generating multi-language online stores with regional adaptations, leveraging the OpenAI API for content and image generation, producing autonomous interactive single-page stores.
Key Features:
- Location: /Users/vladislaviushchenko/Desktop/codestral-project
- Tech Stack: Node.js, Express, OpenAI API, TailwindCSS, DaisyUI
- Supported Languages: Thai, English, Indonesian, Filipino, Spanish
- Themes: 120+ variations (neon, industrial, luxury)
- Data Storage: Local, Google Cloud Storage
- Deployment: Docker, Cloud Run
Project Structure:
- controllers: openaiService.js, storeGenerator.js
- templates: HTML/CSS/JS templates
- generated: stores directory
- images: resources
- routes/api.js: API endpoints
- public: admin panel
- data/tasks: generation tasks
URLs & Ports:
- Server: 8080
- Preview: http://localhost:8080/preview/{storeId}
- Admin: http://localhost:8080/admin.html
- API: /api/generate, /api/status/{taskId}, /api/check-openai
OpenAI API:
- Text Model: gpt-4-turbo
- Image Model: dall-e-3
- Images: 1024x1024
Issue Analysis:
1. JavaScript Error:
- Issue: "Invalid left-hand side in assignment"
- Root Cause: Malformed JSON (arrays not properly closed)
2. Thai Characters in Filenames:
- Issue: Causing path errors
- Solution: regenerate-images-v2.js script
Implemented Fixes:
- Corrected JSON (added missing brackets)
- Used regeneration script for safe filenames
Recommendations:
- Improve JSON validation
- Integrate safe file naming into generation process
- Enhance logging
Result:
The reported JavaScript errors and JSON syntax issues have been resolved successfully.