Track children's vaccination schedules (IAP 2024 – India) with a Flask backend, server‑side persistence, auth, schedule computation, and calendar export.
- Parent registration / login (session auth)
- Multiple children per parent
- Automatic schedule generation from DOB
- Status tracking: Upcoming / Due (incl. due today) / Completed
- Group completion per age milestone
- Dashboard stats: overdue, due soon (≤30 days), upcoming
- ICS calendar export (aggregate events)
- Responsive UI (Tailwind CDN + semantic
vt-classes) - PWA basics:
manifest.json,sw.js(offline shell) - Consistent date formatting via Jinja filters
| Layer | Tech |
|---|---|
| Framework | Flask 3 |
| ORM | Flask-SQLAlchemy (SQLite default) |
| Templates | Jinja2 |
| Styling | Tailwind CDN + custom CSS |
| Env Config | python-dotenv |
| Tests | pytest + coverage |
| Lint / Sec | flake8, bandit, safety |
git clone https://github.com/AbhishekSiloiya/KidsVaccineTracker.git
cd KidsVaccineTracker
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
# Optional: create .env
"SECRET_KEY=dev-secret" | Out-File -Append .env
python main.pyDefault DB: instance/children.db (auto-created). Override with DATABASE_URL (or SQLALCHEMY_DATABASE_URI).
| Key | Purpose | Default |
|---|---|---|
| SECRET_KEY | Session signing | dev-insecure-change-me |
| DATABASE_URL | SQLAlchemy connection | SQLite file |
Example:
SECRET_KEY=change-me
DATABASE_URL=sqlite:///instance/children.db
Tools: pytest, coverage, flake8, bandit, safety.
pytest
flake8 app testsTests included:
tests/
conftest.py # fixtures (app, in-memory DB)
test_schedule.py # schedule & status logic
test_models.py # relationships & cascade delete
test_auth.py # register/login
Planned: dashboard stats, completion endpoint, negative auth cases.
GitHub Actions (.github/workflows/ci.yml):
- Matrix (3.10–3.12) run tests + coverage
- Lint (flake8)
- Security (bandit + safety)
- Build artifact (main)
- Release publish (main)
- Auto
db.create_all()for development. - Consider Alembic for production migrations.
- Cascade delete: Parent → Children → Vaccinations.
- Unique per child per vaccine name.
- Session-based with password hashing (Werkzeug).
- Add rate limiting & stronger policies for production.
ICS file groups events by age band (one event containing multiple vaccines) for cleaner calendar views.
app/ # Flask app package (models, views, schedule_data)
templates/ # Jinja2 templates
static/css/ # style.css, responsive.css
manifest.json # PWA manifest
sw.js # service worker
tests/ # pytest suite
requirements.txt # pinned dependencies
main.py # entry point (create_app wrapper)
# Reset dev DB
Remove-Item instance\children.db -ErrorAction Ignore
python main.py
# Production example (Linux deploy)
pip install gunicorn
gunicorn -w 2 -b 0.0.0.0:8000 main:app- CSRF tokens (Flask-WTF)
- HTTPS / proxy headers
- CSP headers
- Rate limiting (Flask-Limiter)
- Alembic migrations
- Coverage threshold gate in CI
- Branch from
main - Add tests for new logic
- Run quality checks (tests, lint, security)
cd tests pytest test_auth.py pytest test_models.py pytest test_schedule.py - Open PR with description & rationale
MIT.