Trollgorithm Theme Song Booth - customer-facing request form, admin dashboard, kiosk queue, and delivery pipeline for AI-generated theme songs.
This repository has been archived on 2026-09-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
2026-07-31 21:38:38 +00:00
templates Single-paste Hermes response with title extraction and copy buttons 2026-07-31 21:38:38 +00:00
.env.example Make internal and host ports configurable via env vars 2026-07-31 20:43:36 +00:00
.gitignore Initial prototype for theme song booth 2026-07-31 19:47:52 +00:00
app.py Single-paste Hermes response with title extraction and copy buttons 2026-07-31 21:38:38 +00:00
config.py Make internal and host ports configurable via env vars 2026-07-31 20:43:36 +00:00
docker-compose.yml Remove env_file from docker-compose; use Portainer environment variables directly 2026-07-31 20:50:14 +00:00
Dockerfile Make internal and host ports configurable via env vars 2026-07-31 20:43:36 +00:00
init_db.py Initial prototype for theme song booth 2026-07-31 19:47:52 +00:00
models.py Single-paste Hermes response with title extraction and copy buttons 2026-07-31 21:38:38 +00:00
README.md Remove env_file from docker-compose; use Portainer environment variables directly 2026-07-31 20:50:14 +00:00
requirements.txt Initial prototype for theme song booth 2026-07-31 19:47:52 +00:00

Theme Song Booth

Prototype web app for a convention booth where attendees request custom AI-generated theme songs.

Flow

  1. Customer fills out the public request form at /request.
  2. Operator generates a Suno Custom Mode prompt via Hermes and saves it in the admin detail page.
  3. Operator generates two song versions in Suno and uploads the MP3s in admin.
  4. Operator clicks Send Preview Link. Customer receives an email with a private player page.
  5. Customer listens to Version A and Version B, then approves one/both or requests changes.
  6. Operator sees the approval alert, collects payment via Square reader, then clicks Mark Paid & Deliver.
  7. Customer receives the approved MP3(s) as email attachments.

Local Development

cd /home/jess/workspace/theme-song-booth
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
cp .env.example .env
# Edit .env and set APP_SECRET_KEY, ADMIN_PASSWORD, SMTP_PASS, PUBLIC_BASE_URL
.venv/bin/python init_db.py
.venv/bin/python -m flask --app app run --host=0.0.0.0

Deployment with Portainer

The repo includes a docker-compose.yml that builds directly from GitLab, so Portainer can pull and deploy it as a stack.

  1. Log in to your Portainer instance.
  2. Go to StacksAdd stack.
  3. Choose Repository and paste:
    • URL: https://gitlab.hallsworth.ca/yrtria/theme-song-booth.git
    • Branch: main
    • Compose path: docker-compose.yml
  4. Add environment variables directly in Portainer under Environment variables:
    • APP_SECRET_KEY — long random string
    • ADMIN_PASSWORD — password for /admin
    • SMTP_PASSb3ZzD@eM!MkqVS8P
    • PUBLIC_BASE_URL — your HTTPS domain
    • HOST_PORT — default 127.0.0.1:8000
    • BOOTH_NAME — optional
  5. Deploy the stack.
  6. Open a console into the booth container and run once:
    python init_db.py
    
  7. Point your reverse proxy at the HOST_PORT you chose (e.g. http://host-ip:8000).
  8. Print the booth QR code pointing to https://your-domain/request.

Portainer Notes

  • The docker-compose.yml uses named volumes (booth-data, booth-uploads) so Portainer handles persistence automatically.
  • For a pre-built image instead of repo build, replace the build: block with an image: line pointing to your registry.
  • Update the stack after each push to redeploy the latest code.

Files

  • app.py — Flask application with public/admin routes and email logic.
  • models.py — SQLite schema and helper functions.
  • config.py — Configuration loaded from environment.
  • templates/ — Jinja2 HTML templates.
  • init_db.py — Standalone script to create the SQLite database.
  • Dockerfile / docker-compose.yml — Container packaging for Portainer.