Personal project · progressive web app

VeloLog

An app for a whole family's bikes: maintenance and component wear, rides from bike computers, training analysis, training plans and route planning with weather – on phone and desktop, offline too.

Python 3.14FastHTMLHTMXSQLAlchemy 2SQLiteTailwind CSS 4DaisyUI 5LeafletDockerGitLab CI/CDPWAPL / EN
Open the app

The demo needs no sign-up: you get your own copy of sample data, deleted every night.

~20k
lines of Python
~4k
lines of JavaScript
1,200+
automated tests
43
database migrations
2
UI languages

About

VeloLog started from a need no single app covered: several bikes in a family, components wearing at different rates, service intervals “every X km or every Y days”, rides from several bike computers and an indoor trainer, plus route and training planning. Instead of several tools and a spreadsheet – one app.

I run the project single-handedly across the full scope: requirements, architecture, database, UI, testing, CI/CD, deployment, backups and error monitoring. The app is in production and used every day.

The project is developed with an AI assistant (Claude Code) that helps with implementation, tests and documentation, while decisions on features, architecture and quality, change review and testing on real devices remain mine.

Features

Bikes and maintenance

  • Components with a wear bar in kilometres, replacement history and average lifetime per component type.
  • Service rules “every X km or Y days” with OK / due soon / overdue status and a due-date forecast based on riding pace.
  • Push and e-mail reminders, .ics calendar feed, workshop visits, costs (including per 100 km).
  • Parts inventory, shopping list, receipt OCR on the server.
  • PDF bike report with a read-only link and QR code for buyers, theft reporting with a PDF flyer.

Rides and training

  • FIT, GPX and TCX import with duplicate detection; intervals.icu sync (rides and watch data).
  • Training analysis: power and heart-rate zones, NP / IF / TSS, HR drift, automatic interval detection – rule-based, no AI models.
  • Fitness, fatigue and form (CTL / ATL / TSB), VO2max estimate, recovery from HRV and sleep.
  • Interval workout library, weekly plan with fitness forecast, .zwo / .mrc / .erg / .fit export and plan sync to intervals.icu.
  • Statistics, records and streaks, year in review, ride heatmap.

Routes and weather

  • Road-aware route planner (BRouter) on OpenStreetMap: elevation profile coloured by gradient, surface types, POIs.
  • Ride-time estimate based on fitness, GPX and CNX (iGPSport) export.
  • Weather along the route at the time you ride it: wind relative to heading, best start time, 15-minute precipitation.
  • Rain radar (IMGW / RainViewer) and street view (Mapillary).
  • Completed rides are matched to planned routes automatically – plan vs. actual comparison.

Family and access

  • Each family is a separate, isolated data space; roles: family admin, member, viewer.
  • Child profiles without login; shared rides count for every participant without double counting.
  • Offline-first: changes wait in a queue and sync when the connection returns.
  • Polish and English UI – including PDFs, e-mails, notifications and calendar feeds.

Architecture

Browser / PWA ──HTTPS──▶ nginx ──▶ Docker (Uvicorn)
  Service Worker                   ├─ FastHTML + HTMX (server-rendered)
  offline queue (IndexedDB)        ├─ SQLAlchemy 2 ──▶ SQLite (Alembic)
  Leaflet maps                     ├─ APScheduler: reminders, sync, backups
                                   └─ intervals.icu · Open-Meteo · BRouter
                                      IMGW · Mapillary · OpenStreetMap
  • Server-rendered pages (FastHTML) with partial updates via HTMX – no SPA framework and no JavaScript build step.
  • Domain logic (service status, forecasts, wear, training metrics) separated from views.
  • A single access-control layer: every access to a bike, photo, entry or export blocks other families' data – covered by tests.
  • Offline-first: Service Worker page cache and an IndexedDB write queue.
  • One process with a job scheduler (APScheduler): reminders, intervals.icu sync, nightly backups with a restore test.

Technology and libraries

Backend Python 3.14, FastHTML 0.14 (Starlette, Uvicorn), HTMX
Database SQLite, SQLAlchemy 2.1, Alembic migrations
UI Tailwind CSS 4 + DaisyUI 5 (standalone CLI, no Node.js), light and dark theme, mobile-first
Maps Leaflet 1.9, OpenStreetMap, CyclOSM, Waymarked Trails, Nominatim
Routing and weather BRouter, Open-Meteo, IMGW and RainViewer radar, Mapillary
Bike computer files garmin-fit-sdk (FIT read and workout write), custom GPX / TCX parsers
Integrations intervals.icu REST API – rides, wellness data, training calendar
Background jobs APScheduler
Notifications Web Push (VAPID, pywebpush), SMTP e-mail
PDF and QR fpdf2, segno
Images and OCR Pillow (EXIF/GPS stripping), RapidOCR + ONNX Runtime, pypdfium2
Deployment Docker (multi-stage image), Docker Compose, GitLab CI/CD with container registry, nginx + Let's Encrypt
Backups nightly SQLite backup via backup API, automatic restore test, encrypted off-site copy (rclone crypt)
Testing application-wide integration tests in CI, browser E2E tests (Playwright) at 360 / 430 / 1280 px

Security

  • scrypt password hashing, signed sessions, HTTPS-only cookies, idle session timeout.
  • Login rate limiting, password reset with single-use tokens (only a SHA-256 hash stored).
  • Strict Content-Security-Policy (no inline or eval scripts), HSTS, frame blocking, nosniff, Referrer-Policy, Permissions-Policy.
  • Metadata (including GPS) stripped from photos, privacy zones on maps, CSV export protected against formula injection.
  • Non-root container; the app is reachable from the internet only through nginx.

Quality and workflow

  • 1,200+ automated tests (including family data isolation and translations) run in GitLab CI before every image build.
  • Every UI change is checked in a browser on phone widths (360 and 430 px) and desktop, in light and dark mode.
  • Every feature is documented (40+ documents).
  • Database migrations verified on a copy of the data before deployment (row counts of all tables before and after).
  • One-command deployment: CI builds the image, the server pulls the tagged version and restarts the container.
  • Developed with an AI assistant (Claude Code) as a tool – every change reviewed and accepted after testing on real devices.

Author

Dariusz Kowalec – idea, design, implementation, deployment and operations.

bike-service.corebox.pl