Skip to content

Commit 1130689

Browse files
itsDNNSclaude
andcommitted
Add LICENSE, production server, tests, and README screenshots
- MIT License file - Replace Flask dev server with Waitress (production WSGI) - Docker HEALTHCHECK via /health endpoint - 70 pytest tests for analyzer, config, storage, web routes - README screenshot gallery (images to be added) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c8c1cfa commit 1130689

File tree

12 files changed

+754
-2
lines changed

12 files changed

+754
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*.db
44
__pycache__/
55
*.pyc
6+
.pytest_cache/
67
.vscode/
78
.idea/
89
deploy.sh

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44

55
Versioning: `YYYY-MM-DD.N` (date + sequential build number per day)
66

7+
## [2026-02-09.12]
8+
9+
### Added
10+
- **MIT License**: Added LICENSE file
11+
- **Test suite**: 70 tests covering analyzer, config, storage, and web routes
12+
- **Production web server**: Replaced Flask dev server with Waitress
13+
- **Docker healthcheck**: Container reports health via `/health` endpoint
14+
- **Screenshot placeholders in README**: Gallery structure for dashboard, setup, trends, health banner
15+
716
## [2026-02-09.11]
817

918
### Changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ WORKDIR /app
33
COPY requirements.txt .
44
RUN pip install --no-cache-dir -r requirements.txt
55
COPY app/ ./app/
6+
HEALTHCHECK --interval=60s --timeout=5s --retries=3 \
7+
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8765/health')" || exit 1
68
CMD ["python", "-m", "app.main"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Dennis Braun
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Docker container that monitors DOCSIS channel health on cable modems and publishes per-channel sensor data to Home Assistant via MQTT Auto-Discovery. Currently supports AVM FRITZ!Box Cable routers.
44

5+
![Dashboard Dark Mode](docs/screenshots/dashboard-dark.png)
6+
57
## Features
68

79
- **Per-Channel Sensors**: Every downstream/upstream DOCSIS channel becomes its own Home Assistant sensor with full attributes (frequency, modulation, SNR, errors, DOCSIS version)
@@ -85,6 +87,16 @@ Copy `.env.example` to `.env` and edit:
8587
| US Power | 35..49 dBmV | 50..54 | > 54 dBmV |
8688
| SNR / MER | > 30 dB | 25..30 | < 25 dB |
8789

90+
## Screenshots
91+
92+
| Dashboard (Dark) | Dashboard (Light) | Setup Wizard |
93+
|---|---|---|
94+
| ![Dark](docs/screenshots/dashboard-dark.png) | ![Light](docs/screenshots/dashboard-light.png) | ![Setup](docs/screenshots/setup.png) |
95+
96+
| Trend Charts | Health Banner |
97+
|---|---|
98+
| ![Trends](docs/screenshots/trends.png) | ![Health](docs/screenshots/health-banner.png) |
99+
88100
## Web UI
89101

90102
Access at `http://<host>:8765`. Auto-refreshes every 60 seconds. Shows:

app/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818

1919

2020
def run_web(port):
21-
"""Run Flask in a separate thread."""
22-
web.app.run(host="0.0.0.0", port=port, use_reloader=False)
21+
"""Run production web server in a separate thread."""
22+
from waitress import serve
23+
serve(web.app, host="0.0.0.0", port=port, threads=4, _quiet=True)
2324

2425

2526
def polling_loop(config_mgr, storage, stop_event):

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
requests>=2.31
22
paho-mqtt>=2.0
33
flask>=3.0
4+
waitress>=3.0
45
cryptography>=42.0

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)