91 lines
2.0 KiB
Markdown
91 lines
2.0 KiB
Markdown
# Flask Digital Signage (simple)
|
||
|
||
Lightweight digital signage platform using **Flask + SQLite**.
|
||
|
||
## Features
|
||
|
||
- Central **admin** can manage companies, users, displays.
|
||
- Admin can **impersonate** any company user (no password).
|
||
- Company users can:
|
||
- Create playlists
|
||
- Add slides (image/video/webpage)
|
||
- Assign playlists to displays
|
||
- Displays are public **16:9 player webpages** suitable for kiosk browsers.
|
||
|
||
## Quickstart (Windows)
|
||
|
||
```bat
|
||
python -m venv .venv
|
||
.venv\Scripts\activate
|
||
pip install -r requirements.txt
|
||
|
||
set FLASK_APP=app
|
||
flask init-db --admin-email beheer@alphen.cloud --admin-pass admin
|
||
flask run --debug
|
||
```
|
||
|
||
If Flask can't discover the app automatically, use:
|
||
|
||
```bat
|
||
set FLASK_APP=app:create_app
|
||
flask run --debug
|
||
```
|
||
|
||
Open http://127.0.0.1:5000
|
||
|
||
## Notes
|
||
|
||
- SQLite DB is stored at `instance/signage.sqlite`.
|
||
- Uploaded files go to `app/static/uploads/`.
|
||
|
||
## SMTP / Forgot password
|
||
|
||
This project includes a simple **forgot password** flow. SMTP configuration is read from environment variables.
|
||
|
||
Recommended: put these in a local `.env` file in the repo root. Flask (via `python-dotenv`) will auto-load it on startup. `.env` is already gitignored.
|
||
|
||
You can start from `.env.example`:
|
||
|
||
```bat
|
||
copy .env.example .env
|
||
```
|
||
|
||
### Example
|
||
|
||
```bat
|
||
REM Option A: set env vars in the same terminal where you run `flask run`
|
||
set SMTP_HOST=smtp.strato.de
|
||
set SMTP_PORT=587
|
||
set SMTP_USERNAME=beheer@alphen.cloud
|
||
set SMTP_PASSWORD=***
|
||
set SMTP_FROM=beheer@alphen.cloud
|
||
set SMTP_STARTTLS=1
|
||
set SMTP_DEBUG=1
|
||
|
||
REM Option B: put the same keys/values in a .env file instead
|
||
```
|
||
|
||
Security note: do **not** commit SMTP passwords to the repo. Prefer secrets management and rotate leaked credentials.
|
||
|
||
### Troubleshooting mail delivery
|
||
|
||
If the reset email is not received:
|
||
|
||
1. Set `SMTP_DEBUG=1` and request a reset again.
|
||
2. Watch the Flask console output for SMTP responses / errors.
|
||
3. Verify:
|
||
- `SMTP_USERNAME` and `SMTP_FROM` are allowed by your provider.
|
||
- You are using STARTTLS (port 587).
|
||
- The recipient mailbox isn’t filtering it (spam/quarantine).
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|