How nagy-dani/szakdolgozat works
1. This repository is a desktop application for bicycle fit analysis, likely built as a GUI app rather than a web service. The top-level structure is organized around a classic UI → controller → service → model flow.
2. main.py is the application entrypoint, with start.sh as the convenience launcher. The presence of assets/styles/app.qss and views/widgets suggests a Qt-style desktop UI with custom styling and reusable widgets.
3. The views/ package is the presentation layer. It contains the main window plus workflow screens for welcome, rider input, bike input, video capture, analysis, results, and help, which implies a multi-step user journey.
4. The controllers/ package is the orchestration layer. Controllers exist for the app shell, rider, bike, video, pose, and analysis, indicating that UI events are handled separately from business logic and data processing.
5. The models/ package holds the core domain objects: rider, bike, pose, analysis, and recommendation. These are the data structures passed between the UI, analysis logic, and persistence/export features.
6. The services/ package contains the main computation pipeline. video_service and pose_service handle media and pose extraction, angle_calculator and com_calculator derive biomechanics measures, and fit_rules_engine converts those measurements into fit judgments and recommendations.
7. Configuration is externalized in config/angle_ranges.json, which likely defines acceptable angle thresholds used by the fit rules engine. This is an important boundary because it separates adjustable domain rules from code.
8. Persistence and reporting are supported as separate services: persistence_service for saving/loading analysis-related state, and pdf_export_service for producing a shareable output. That means the app is not just interactive; it also produces durable artifacts.
9. The data flow is: user inputs rider and bike parameters, a video is selected or captured, pose data is analyzed, angles and center-of-mass metrics are computed, the fit rules engine evaluates them against configured ranges, and the results view presents recommendations.
10. views/widgets/ holds reusable UI building blocks such as an angle gauge, measurement input, and video player. These widgets likely encapsulate visualizations and input controls used across multiple screens.
11. The tests/ directory focuses on core non-UI logic: angle calculation, fit rules, persistence, rider model, and analysis model. That suggests the computational and data layers are the primary stability boundary, while the UI is thinner and more workflow-oriented.
12. The videos/ directory contains sample media inputs, which indicates the application can analyze prerecorded bike-riding footage as part of its workflow. That makes local file handling a first-class part of the architecture, not just an optional feature.
13. Overall, the architecture is a layered desktop analytics tool: GUI screens and widgets collect inputs, controllers coordinate workflow, services perform biomechanical analysis and export/persistence, and models carry the structured results. The main diagram should emphasize the separation between UI, analysis logic, and external artifacts like video files, config JSON, and exported PDFs.
Main entry points: analysis_controller.py Analysis controller · main_window.py Main window · widgets Widgets · rider_controller.py Input controllers
Components 28
Runtime
Application entrypoints and execution bootstrap.
Presentation
Qt views and reusable widgets.
- Main window · Primary application shell and navigation host.
myBikeFit/views/main_window.py - Welcome · Initial landing screen for the fit workflow.
myBikeFit/views/welcome_view.py - Rider input · Collects rider measurements and settings.
myBikeFit/views/rider_input_view.py - Bike input · Collects bicycle geometry and setup data.
myBikeFit/views/bike_input_view.py - Video capture · Handles selecting or recording riding video.
myBikeFit/views/video_capture_view.py - Analysis view · Shows pose and fit analysis progress.
myBikeFit/views/analysis_view.py - Results · Presents fit findings and recommendations.
myBikeFit/views/results_view.py - Help · Supplementary user guidance.
myBikeFit/views/help_dialog.py - Widgets · Reusable visual controls used across views.
myBikeFit/views/widgets
Controllers
Workflow coordination between UI and services.
- App controller · Coordinates app shell navigation and state.
myBikeFit/controllers/app_controller.py - Input controllers · Handles rider, bike, video, and pose user actions.
myBikeFit/controllers/rider_controller.py - Analysis controller · Coordinates pose analysis and result generation.
myBikeFit/controllers/analysis_controller.py
Domain
Core data models and analysis computation.
- Rider · Rider measurements and attributes.
myBikeFit/models/rider_model.py - Bike · Bicycle geometry and setup data.
myBikeFit/models/bike_model.py - Pose · Captured body pose representation.
myBikeFit/models/pose_model.py - Analysis · Aggregated fit analysis state and outputs.
myBikeFit/models/analysis_model.py - Recommendation · Fit adjustment suggestion and rationale.
myBikeFit/models/recommendation_model.py - Video service · Loads and manages riding footage.
myBikeFit/services/video_service.py - Pose service · Extracts pose data from video frames.
myBikeFit/services/pose_service.py - Metrics · Computes angles and center-of-mass measures.
myBikeFit/services/angle_calculator.py - Rules engine · Evaluates measurements against fit thresholds.
myBikeFit/services/fit_rules_engine.py - Persistence · Saves and loads analysis-related state.
myBikeFit/services/persistence_service.py - PDF export · Generates shareable analysis reports.
myBikeFit/services/pdf_export_service.py
Artifacts
External inputs, configuration, and outputs.
- Angle ranges · Thresholds used by the fit rules engine.
myBikeFit/config/angle_ranges.json - App style · Desktop UI styling for the application.
myBikeFit/assets/styles/app.qss - Sample videos · Local video inputs used by the app workflow.
videos
Connections 35
- Launcher → App entry: launches · Convenience script starts the application entrypoint.
- App entry → Main window: creates · Entrypoint initializes the main UI shell.
- App entry → App controller: wires · Bootstraps the top-level controller.
- Main window → Welcome: hosts · Main shell contains the workflow screens.
- Main window → Rider input: hosts · Main shell contains the workflow screens.
- Main window → Bike input: hosts · Main shell contains the workflow screens.
- Main window → Video capture: hosts · Main shell contains the workflow screens.
- Main window → Analysis view: hosts · Main shell contains the workflow screens.
- Main window → Results: hosts · Main shell contains the workflow screens.
- Main window → Help: opens · Auxiliary help is presented from the main window.
- Welcome → Widgets: uses · Views share reusable input and display widgets.
- Rider input → Widgets: uses · Views share reusable input and display widgets.
- Bike input → Widgets: uses · Views share reusable input and display widgets.
- Video capture → Widgets: uses · Views share reusable input and display widgets.
- Analysis view → Widgets: uses · Views share reusable input and display widgets.
- Results → Widgets: uses · Views share reusable input and display widgets.
- App controller → Input controllers: coordinates · Top-level workflow delegates user input handling.
- App controller → Analysis controller: coordinates · Top-level workflow delegates analysis orchestration.
- Input controllers → Rider: updates · Controllers populate domain objects from the UI.
- Input controllers → Bike: updates · Controllers populate domain objects from the UI.
- Input controllers → Video service: requests · Controllers hand off media handling to services.
- Input controllers → Pose service: requests · Controllers hand off pose extraction to services.
- Analysis controller → Pose: builds · Analysis flow produces pose data structures.
- Analysis controller → Analysis: builds · Analysis flow assembles the final analysis object.
- Analysis controller → Recommendation: builds · Analysis flow creates recommendation outputs.
- Analysis controller → Video service: uses · Analysis consumes selected footage.
- Analysis controller → Pose service: uses · Analysis derives pose information from video.
- Analysis controller → Metrics: uses · Analysis computes biomechanical metrics.
- Analysis controller → Rules engine: uses · Analysis turns measurements into fit judgments.
- Rules engine → Angle ranges: reads · Decision thresholds are externalized in config.
- Metrics → Angle ranges: references · Calculation and evaluation share configured ranges.
- Analysis controller → Persistence: persists · Analysis state can be saved and restored.
- Analysis controller → PDF export: exports · Results can be turned into a shareable report.
- Main window → App style: styles · Application shell is themed by the stylesheet.
- Video service → Sample videos: loads · Service works with local video inputs.