HackHPI 2024 prototype for route planning that prioritizes safer driving experiences, not just the fastest ETA.
H417 is a multi-part prototype built during Hack HPI 2024 for the Starwit Technologies challenge. It combines:
- a Flutter mobile client for route selection and account flows,
- an ASP.NET Core backend for authentication and route retrieval,
- an experimental Python / ML workspace for accident-risk modeling and route safety research.
The original project vision was to estimate road risk from historical accident data, urban metadata, and traffic-camera-derived signals, then surface a "smooth" route to drivers, istead of just the fastest route. The current repository captures that vision as a working hackathon prototype plus a separate research workspace. During the hackathon we managed to train the Pytorch model to epoch 20 and to a loss of 0.2 and put it to use in a Flutter mobile app. Backend and frontend, written in C# and Dart respectively.
Most navigation products optimize for speed. This project explores a different question:
What if a routing system could trade a small amount of travel time for a meaningfully safer, smoother route?
That idea is especially relevant for:
- insurance risks estimation,
- logistic companies mass routing,
- driver-assistance experiences,
- fleet routing,
- smart-city mobility systems,
- future autonomous-vehicle safety layers.
The Flutter app lets a user:
- register and log in,
- choose a start and destination point on a map,
- request either a Fast or Smooth route,
- view the returned route on a map,
- see project context in an in-app “About us” page.
The ASP.NET Core backend currently provides:
- JWT-based authentication,
- registration and login endpoints,
- a
/api/pathendpoint that returns a route polyline, - EF Core migrations for the user store.
The ml/ directory contains exploratory code for:
- accident-risk modeling,
- graph-based road-network processing,
- route-risk prediction,
- visualization and prototype dashboards.
flowchart LR
A[Flutter mobile app] -->|auth/register, auth/login| B[ASP.NET Core API]
A -->|api/path| B
B --> C[(User database via EF Core)]
B --> D[OpenStreetMap routing service]
E[Python / ML workspace] --> F[Accident-risk research & route safety experiments]
F --> B
.
├── backend/
│ ├── AuthApp/ # ASP.NET Core 8 Web API + JWT auth + EF Core
│ └── count_cars.py # Camera/vision pipeline helper script
├── frontend/
│ └── H417-main/ # Flutter application
├── ml/ # Accident prediction and route-risk experimentation
└── README.md
- Flutter
- Dart
- Riverpod
- flutter_map
- latlong2
- geocoding
- shared_preferences
- JWT decoding in client
- ASP.NET Core 8
- C#
- JWT Bearer authentication
- Entity Framework Core
- SQL Server / LocalDB (depending on build mode)
- Python
- PyTorch
- PyTorch Geometric
- GeoPandas / OSMnx
- Plotly / Dash / Streamlit
Install the following before running the project:
- Flutter SDK for the mobile app
- .NET 8 SDK for the backend
- SQL Server LocalDB or another reachable SQL Server instance for auth storage
- Python 3.8+ if you want to explore the ML workspace
From the repository root:
cd backend/AuthApp
dotnet restore
dotnet ef database update
dotnet run- In DEBUG, the app uses:
Data Source=(localdb)\MSSQLLocalDB; Database=AuthDb
- In non-debug mode, it switches to a hardcoded SQL Server connection string in
Model/Auth/UserContext.cs
The included launch settings define local endpoints such as:
http://localhost:5012https://localhost:7174
cd frontend/H417-main
flutter pub get
flutter runBuilt by the H417 team:
- Eduard Sobol, sobol.edik@gmail.com, https://github.com/Edward1an
- Maksym Floria, floryan2206@gmail.com, https://github.com/TomatoTheVeg
- Mykhailo Kozyrev, smrtkozyrev@gmail.com, https://github.com/Smikalo
- Viktor Lynok, lynokviktor@gmail.com, https://github.com/Lyynnnx
- Yevhenii Karpushchenko, karpuskarp@gmail.com, https://github.com/SunJet72
For processing historical and metadata, we relied on the AccIndex project by Anand Deshpande, Dr. Onur Kerimoglu and Jan Meyer. To collect and process traffic camera data we used Starwit Awareness Engine. For navigation tiling features we used OpenStreetMap.