The Bike Maintenance Tracker is a command-line application designed to assist cycling enthusiasts in maintaining and managing their road bikes. This application allows users to add, view, and update maintenance records, track the weight of the bike, and monitor the wear levels of various components. By providing a structured and easy-to-use interface, it ensures that users can keep their bikes in optimal condition.
As an alternative to the console workflow, the project now also offers a modern graphical interface powered by ttkbootstrap that reads and writes the same data files (records.txt and components.txt).
-
Maintenance Records Management:
- Add new maintenance records with the date and a detailed description of the service performed.
- View a list of all maintenance records to keep track of past services.
- Use the quick-entry panel at the top of the GUI to capture new events without leaving the main dashboard.
-
Bike Weight Tracking:
- Update and store the weight of the bike.
- View the current weight of the bike.
-
Component Wear Level Monitoring:
- View the wear levels of key bike components, including tires, inner tubes, derailleur cables, brake cables, and handlebar tape.
- Update the wear levels of each component to ensure timely replacements and maintenance.
-
Futuristic Desktop Dashboard:
- Interfaccia grafica in stile "tech" con header animato, palette neon e card riepilogative aggiornate in tempo reale.
- Nuova scheda Diagnostics con grafico delle usure, elenco componenti critici e suggerimenti di manutenzione immediati.
- Python 3.9+
- Accesso a Internet per consentire a
pipdi installare il tema graficottkbootstrape le librerie aggiuntive (matplotlib)
All'interno della cartella del progetto eseguire i seguenti comandi:
python -m venv .venv-gui
source .venv-gui/bin/activate # Su Windows usare: .venv-gui\Scripts\activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python bike_maintenance_gui.pyPer automatizzare l'installazione delle dipendenze e l'avvio dell'applicazione grafica è disponibile lo script run_gui.bat. Eseguire:
run_gui.batLo script crea (se necessario) un ambiente virtuale locale, installa le dipendenze definite in requirements.txt e avvia l'interfaccia grafica.
- Python 3.9+
- Accesso a Internet per consentire a
pipdi installare il tema graficottkbootstrap
All'interno della cartella del progetto eseguire i seguenti comandi:
python -m venv .venv-gui
source .venv-gui/bin/activate # Su Windows usare: .venv-gui\Scripts\activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python bike_maintenance_gui.pyPer automatizzare l'installazione delle dipendenze e l'avvio dell'applicazione grafica è disponibile lo script run_gui.bat. Eseguire:
run_gui.batLo script crea (se necessario) un ambiente virtuale locale, installa le dipendenze definite in requirements.txt e avvia l'interfaccia grafica.
Per facilitare l'esecuzione dell'applicazione su Windows è stato aggiunto lo script run.ps1, pensato per l'uso in PowerShell.
-
Installare un compilatore C disponibile da PowerShell, come Mingw-w64 (gcc) oppure LLVM (clang), e assicurarsi che il comando scelto sia presente nella variabile d'ambiente
PATH. -
Se PowerShell blocca l'esecuzione degli script, aprire una finestra di PowerShell e abilitare temporaneamente l'esecuzione con:
Set-ExecutionPolicy -Scope Process RemoteSigned
All'interno della cartella del progetto eseguire:
./run.ps1Lo script individua automaticamente il compilatore disponibile (gcc o clang), compila bike_track.c generando bike_track.exe (ricompilando solo se necessario) e avvia l'applicazione. È possibile forzare una ricompilazione completa con il parametro -Clean:
./run.ps1 -CleanThe application is developed in C, leveraging standard input/output functions to interact with the user and file handling to persist data. The main components of the application include:
- Data Structures: Use of structured data types (
struct) to define maintenance records and bike components. - File Handling: Efficient reading and writing to text files (
records.txtandcomponents.txt) to ensure data persistence across sessions. - User Interface: A simple menu-driven interface that guides the user through various operations like adding records, updating weight, and viewing components.
-
Requirements Gathering:
- Identified the key features needed for effective bike maintenance management.
-
Design:
- Structured the application into modular functions for adding, viewing, and updating records.
- Defined data structures for maintenance records and bike components.
-
Implementation:
- Developed the core functionalities using C programming language.
- Implemented file operations to ensure data persistence, creating or updating files as necessary.
- Incorporated input validation and error handling to enhance user experience and application reliability.
-
Testing and Refinement:
- Conducted thorough testing to ensure all functionalities work as expected.
- Refined the code to handle edge cases and improve performance.
-
Documentation:
- Documented the code with comments for maintainability and provided user instructions for running the application.
This structured approach ensured that the application not only meets user needs but is also robust and reliable, providing a valuable tool for bike maintenance enthusiasts.