1.4 KiB
1.4 KiB
CANCOM Simple Signage — Agent Guide
Start
pip install -r requirements.txt
python app.py
docker compose up -d
python app.py serves on http://localhost:5005. app.py runs Flask with debug=True, host="0.0.0.0", and port=5005.
Source Of Truth
- Single Flask app in
app.py; there is no database. - Persistent state is
config.jsonplus files undermedia/<screen>/. README.mdis stale on the port number; trustapp.py.- Existing repo instructions in this file are the main local guidance; there is no
opencode.jsonor workflow config in this repo.
Behavior To Preserve
GET /player/<screen>renders the playlist and auto-reloads from/playlist/<screen>/hash.GET /adminrequires login;config.json.adminholds the credentials.- URL playlist items are stored as dicts like
{"url": "https://...", "zoom": 0.8}and the zoom value must survive save/reorder flows. .htmlitems inmedia/are rendered inline as content, not in an iframe.config.priority.enabledmakes the priority playlist show on every screen.POST /api/customergenerateswelcome.htmland inserts it at the front of the lobby playlist.
Repo Quirks
media/and media file extensions are gitignored.- The app has no configured tests, lint, typecheck, formatter, or CI.
- Hardcoded secrets exist in tracked files; do not commit new secrets or reshuffle them casually.