Keep your road bike in race‑day shape – from the terminal or a futuristic dashboard
Bike Maintenance Tracker is a dual‑interface tool for cyclists who demand precision.
It offers:
- a lightweight, blazing‑fast C command‑line interface for scripting and minimal environments,
- a modern Python desktop dashboard (powered by
ttkbootstrap+matplotlib) that reads the same data files, giving you instant visual feedback on component wear and service history.
Every record is stored in human‑readable text files (records.txt and components.txt), so you can sync, version, or even hand‑edit them without lock‑in.
.
├── .github/
│ └── workflows/
│ └── ci.yml # Continuous Integration & Delivery
├── src/
│ ├── bike_track.c # Core C application
│ └── bike_maintenance_gui.py # Python GUI (ttkbootstrap + matplotlib)
├── requirements.txt # Python dependencies
├── run.ps1 # PowerShell build & run helper
├── run_gui.bat # Windows GUI quick‑start script
├── components.txt # Persisted component wear data
├── records.txt # Persisted maintenance records
└── README.md
CI Philosophy
Each push triggers a matrix build onubuntu-latest,windows-latest, andmacos-latest:
- C binary is compiled with both
gccandclang, then smoke‑tested.- Python environment is created, dependencies installed, and GUI smoketest is executed (headless Xvfb on Linux).
- Code quality gates:
clang-formatcheck,pylint, andshellcheckon helper scripts.
The workflow file is thoroughly commented – you can use it as a reference for your own C+Python monorepos.
- Add, list, and search service records (date + description).
- Quick‑entry panel in the GUI for lightning‑fast logging.
- Store the current weight; view it at a glance in the dashboard.
- Track wear of tyres, inner tubes, derailleur cables, brake cables, bar tape.
- Colour‑coded wear bars and a diagnostic chart (matplotlib) highlight components that need immediate attention.
- Tech‑styled header with neon palette, animated status indicator.
- Summary cards (last service, total records, critical components) refreshed in real time.
- Diagnostics tab with live wear chart and automated maintenance suggestions.
- Ultra‑fast, dependency‑free (C standard library only).
- Ideal for CI pipelines, SSH sessions, or resource‑constrained devices.
# Create & activate virtual environment
python -m venv .venv-gui
source .venv-gui/bin/activate # Windows: .venv-gui\Scripts\activate
# Install dependencies
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
# Launch the dashboard
python src/bike_maintenance_gui.pyWindows one‑click: Double‑click run_gui.bat or run it from a terminal; it will bootstrap the venv automatically.
# Ensure gcc or clang is in PATH, then:
./run.ps1 # incremental build & run
./run.ps1 -Clean # force full rebuild# Compile with gcc (or clang)
gcc -std=c11 -Wall -Wextra -O2 -o bike_track src/bike_track.c
./bike_trackThe screenshot shows a sample Diagnostics tab: a radar/bar chart of component wear percentages, a critical‑parts list, and instant "replace now" or "monitor" suggestions.
- Fork the repository and create a feature branch.
- Ensure the CI passes on your branch (
gcc/clangcompilation, Python lint, etc.). - Write or update tests if applicable (we use C unit tests with
checkandpytestfor Python components). - Submit a pull request with a clear description.
See CONTRIBUTING.md for detailed guidelines. (File coming soon – PRs welcome!)
Distributed under the MIT License. See LICENSE for full text.
Built with ❤️ by cycling enthusiasts, for cycling enthusiasts.
