Skip to content

Gomader/Store-Display-Analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Store Display Analyzer

中文说明

Store Display Analyzer is a Django service for image-based visual review, prompt evolution, and model-assisted audit workflows. It is designed to support multiple image types within one unified workflow, so prompts, outputs, and corrections can evolve longitudinally across the same review system.

Preview

Dashboard preview

Integration workflow

Local development

Run the Django project locally from Store_Display_Analyzer/.

cd Store_Display_Analyzer
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver

By default the project uses SQLite for local development. To use MySQL instead, set DB_ENGINE=mysql and provide the matching connection variables.

If you use the codex backend, the project expects the codex CLI to be installed locally.

The AI integration layer supports two primary backends:

  • AI_BACKEND=codex: use the local codex CLI
  • AI_BACKEND=openai: call the ChatGPT/OpenAI Responses API with an API token

A third backend is also available:

  • AI_BACKEND=zai: call ZAI/GLM models through an API token

Recommended environment variables:

  • SECRET_KEY or DJANGO_SECRET_KEY
  • DJANGO_DEBUG
  • DJANGO_ALLOWED_HOSTS
  • AI_API_TOKEN
  • AI_BACKEND
  • DB_ENGINE (sqlite or mysql)
  • SQLITE_PATH
  • MYSQL_HOST
  • MYSQL_PORT
  • MYSQL_DATABASE
  • MYSQL_USER
  • MYSQL_PASSWORD
  • CODEX_BIN
  • CODEX_CLI_MODEL
  • CODEX_CLI_TIMEOUT
  • CODEX_CLI_SANDBOX
  • OPENAI_API_KEY
  • OPENAI_BASE_URL
  • OPENAI_TEXT_MODEL
  • OPENAI_VISION_MODEL
  • OPENAI_TIMEOUT
  • OPENAI_IMAGE_DETAIL
  • ZAI_API_KEY
  • ZAI_TEXT_MODEL
  • ZAI_VISION_MODEL

Highlights

  • Configurable AI backends: Codex CLI, ChatGPT via token, and optional ZAI support
  • Visual review history page with prompt-version browsing and correction tracking
  • Unified handling for multiple image categories within the same longitudinal review and prompt-evolution workflow
  • YAML-based area labels so domain language can be adjusted without editing Python code
  • Browser-side Tampermonkey integration support
  • Review routes available at /api/review/ and /view/review/

The repository includes .env.example as a reference for the variables you can export in your shell or inject from your process manager.

If you expose the API, set a non-empty AI_API_TOKEN and send it in the X-AI-TOKEN header.

Examples:

# Use Codex CLI locally
export AI_BACKEND=codex

# Use ChatGPT via token
export AI_BACKEND=openai
export OPENAI_API_KEY=your_openai_api_key
export OPENAI_TEXT_MODEL=gpt-4.1
export OPENAI_VISION_MODEL=gpt-4.1

# Use ZAI via token
export AI_BACKEND=zai
export ZAI_API_KEY=your_zai_api_key

Deployment scripts

Use the helper scripts from the repository root:

chmod +x scripts/start_pi.sh scripts/stop_pi.sh
./scripts/start_pi.sh
./scripts/stop_pi.sh

Defaults:

  • service port: 8000
  • python interpreter: python3
  • database engine: sqlite

You can override them when needed:

DB_ENGINE=mysql MYSQL_HOST=127.0.0.1 MYSQL_DATABASE=visual_review MYSQL_USER=myuser MYSQL_PASSWORD=changeme ./scripts/start_pi.sh
PORT=8000 ./scripts/stop_pi.sh

Tampermonkey integration

The repository includes script.js for browser-side integration.

  • Configure the CONFIG block with your own hostnames, selectors, request keyword, backend origin, and field mappings.
  • The script is designed to bridge page data, image URLs, and backend review actions in a configurable way.

Review routes

Recommended routes for integrations:

  • /api/review/
  • /view/review/

License

This repository is released under the Apache License 2.0. See LICENSE.

Additional project materials:

About

Configurable image audit service for multi-category visual review and prompt evolution.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors