A React app for tracking runs with route selection, calorie estimation, and Google Maps integration. Developed for runners around UW Madison.
Watch our app in action: MadDash Demo
Download from https://nodejs.org (LTS version recommended, v18+).
Verify installation: node -v and npm -v
Open a terminal in the project folder and run:
npm installTo enable the map, route drawing, and location autocomplete features:
- Create a
.env.localfile in the root directory. - Add your Google Maps API Key:
VITE_GOOGLE_MAPS_API_KEY=your_actual_key_hereNote: Ensure your API key has the Maps JavaScript API, Directions API, and Places API enabled in Google Cloud Console.
npm run devOpen http://localhost:5173 in your browser to see MadDash!
| Feature | Description | Status |
|---|---|---|
| Route Selection | Choose from preset scenic/fast routes around Madison | ✅ Active |
| Custom Routing | Input custom start/end points using Google Places autocomplete | ✅ Active |
| Personalized Loops | Generate out-and-back routes of a specific distance & direction | ✅ Active |
| Live Map Integration | View your route visually using Google Maps SDK | ✅ Active |
| Run Timer | Start, pause, resume, and end runs with a precision timer | ✅ Active |
| GPS Live Tracking | Real-time distance tracking via browser Geolocation API | ✅ Active |
| Calorie Estimator | Dynamic MET-based calorie calculation using your pace and weight | ✅ Active |
| Run History | Save and rename completed runs, track total mileage and calories | ✅ Active |
| Dark Mode | Seamless light/dark theme toggling saved to local storage | ✅ Active |
When a run is started, the app uses navigator.geolocation.watchPosition to track the user's movement. It calculates the distance between GPS coordinates using the Haversine formula and accumulates the total distance traveled.
MadDash uses MET values (Metabolic Equivalent of Task) based on the runner's pace:
Pace (min/km) = Duration(min) / Distance(km)
MET = 90 / Pace (Clamped between 6 and 14)
Calories = MET × weight_kg × duration_hours
- Framework: React + Vite
- Styling: Vanilla CSS-in-JS (Inline styles)
- Maps: Google Maps JavaScript API (Geocoding, Directions, Places)
npm run buildBuilds the app for production to the /dist folder. It correctly bundles React in production mode and optimizes the build for the best performance.




