Streamlit dashboard for weekly manufacturing issue metrics with:
- production week and line filters
- issue summary reporting
- affected lots reporting
- CSV exports
- unit, integration, and Playwright end-to-end tests
- Python 3.13
- Poetry
- Docker Desktop (running)
.env(production DB URL from Render):DATABASE_URL=postgresql+pg8000://...
.env.test(test DB URL):TEST_DATABASE_URL=postgresql+pg8000://devuser:devpass@127.0.0.1:5433/testdbDATABASE_URL_TEST=...is also accepted for slide compatibility.
poetry install
poetry run playwright installpoetry run streamlit run streamlit_app.pyRun everything (unit + integration + e2e):
poetry run pytest -qIntegration/e2e tests:
- use
TEST_DATABASE_URLfrom.env.test - automatically start local Docker Postgres (
postgres:18) if URL is127.0.0.1:5433/testdb - reset schema + seed data before tests
python -m pip install -r requirements-dev.txt
pre-commit run --all-files- Push your latest code to GitHub.
- In Render, click
New->Web Service. - Connect this repository and choose branch
main. - Set
LanguagetoDocker. - Under
Environment Variables, add:DATABASE_URLSENTRY_DSN
- Click
Deploy Web Service. - After deploy completes, open your Render URL:
https://<your-service>.onrender.com/
Notes:
- This project Docker image listens on Render's
PORTenvironment variable. - Keep
SENTRY_DSNunquoted when entering it in Render.
Use Streamlit's built-in health endpoint for checks:
https://<your-service>.onrender.com/_stcore/health
Setup steps:
- Go to UptimeRobot and click
Start monitoring in 30 seconds. - Sign in with GitHub.
- Choose
HTTP/website monitoring. - Paste your health endpoint URL.
- Click
Create Monitor. - Send a test email notification.
- Click
Finish Setup.