34 lines
1.4 KiB
Markdown
34 lines
1.4 KiB
Markdown
# CANCOM Simple Signage — Agent Guide
|
|
|
|
## Start
|
|
|
|
```bash
|
|
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.json` plus files under `media/<screen>/`.
|
|
- `README.md` is stale on the port number; trust `app.py`.
|
|
- Existing repo instructions in this file are the main local guidance; there is no `opencode.json` or workflow config in this repo.
|
|
|
|
## Behavior To Preserve
|
|
|
|
- `GET /player/<screen>` renders the playlist and auto-reloads from `/playlist/<screen>/hash`.
|
|
- `GET /admin` requires login; `config.json.admin` holds the credentials.
|
|
- URL playlist items are stored as dicts like `{"url": "https://...", "zoom": 0.8}` and the zoom value must survive save/reorder flows.
|
|
- `.html` items in `media/` are rendered inline as content, not in an iframe.
|
|
- `config.priority.enabled` makes the priority playlist show on every screen.
|
|
- `POST /api/customer` generates `welcome.html` and 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.
|