Thanks for your interest in contributing. Vitals is a self-hosted health dashboard — contributions that make it easier to deploy on your own box are especially welcome.
git clone <your-fork>
cd vitals-app
python3 -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # fill in your own CLIENT_ID / CLIENT_SECRET / profile
uvicorn main:app --host 127.0.0.1 --port 8700 --reloadAll tests must pass before opening a PR:
source .venv/bin/activate
pip install -r requirements-dev.txt # pytest + httpx (test-only, not runtime deps)
pytest -qCI (.github/workflows/ci.yml) runs the same suite on Python 3.9 and 3.12 on
every push/PR — check that it's green before requesting review.
The regression tests use a synthetic fixture (tests/fixtures/golden_synthetic.json)
with fabricated health data — no real user data is shipped in the repo.
data/health_compact.json is your personal runtime file; it is gitignored.
Vitals ships with four locales (ES / EN / FR / PT). Any new UI string must be added to all locale files. Two audit scripts enforce this:
# 1. Checks app/i18n.py (Python locale dict)
python3 scripts/i18n_audit.py
# 2. Checks the server-side i18n helper (templates + main.py strings)
python3 scripts/i18n_audit_server.pyBoth must exit with 0 missing keys before a PR is merged. If you add a new translatable string, add its key (with a translation or at least a placeholder) to all four locales.
- Python 3.9+ compatible (the venv on Mac dev uses 3.9).
- No new dependencies without a strong reason — keep
requirements.txtminimal. - Do not modify scoring formulas (
app/scoring.py,app/bodyage.py) without updatingtests/test_regression.pyand regeneratinggolden_synthetic.json(runpython3 scripts/generate_golden_synthetic.py— see that file for instructions). - Keep secrets out of the repo:
.env,data/,*token*.json,vitals_config.jsonare all gitignored. Do not hardcode credentials or personal paths.
If you're forking this repo to make your own instance public (or open-sourcing your own deployment), double-check the following — none of it should be necessary if you never removed the defaults, but it's cheap insurance:
-
.envis not tracked:git ls-files | grep -E '\.env$'must be empty. -
data/is not tracked:git ls-files | grep -E '^data/'must be empty. This directory holds your real health history, tokens, and journal/labs — it is gitignored by default (see.gitignore) and should stay that way. - No
CLIENT_SECRET/ API key is hardcoded anywhere in tracked files —.env.exampleshould only ever contain placeholder values. - Run
bash scripts/preflight_publish.sh— it fails loudly if.envordata/are staged for commit, or if it detects a real-looking secret in a tracked file. - Rotate your Google/Oura/WHOOP OAuth credentials if you ever pasted a
real
CLIENT_SECRETinto a shell command, screenshot, or chat during development — treat any credential that left.envas burned. - Consider running
VITALS_DEMO=1(see README) for anything you plan to demo publicly (a livestream, a screen-share, a hosted preview) instead of pointing people at an instance with your real data.
See also SECURITY.md for how to report a vulnerability found
in this project.
-
pytest -qpasses (green) -
python3 scripts/i18n_audit.py→ 0 -
python3 scripts/i18n_audit_server.py→ 0 - No secrets or personal data in diff (
git ls-files | xargs grep -E "tailnet|token|CLIENT_SECRET"is clean) - PR description explains what and why