Cycling.ai was created for the BuildClub Hackathon 2024 by Chris Pagolu and Xianyu Cai.
Cycling.ai is a dynamic multi-platform application designed to provide cyclists with detailed route planning and health analysis. Leveraging the power of AI technologies including Google’s Gemini Flash, OpenAI, Supabase, and Sahha AI for health insights, the application offers a feature-rich experience for users who are deeply invested in their cycling activities.
-
Authentication
- Users can log in and log out using Auth0, ensuring secure access to personalized features.
-
Route Calculation
- Calculate cycling routes, along with real-time data on distance, average elevation, estimated calories burned, and traffic and roadwork information using various API integrations like Google Maps, OpenWeatherMap, and Bing Maps.
-
AI-Generated Insights
- Using Google Gemini Flash, generate AI-driven insights about cycling routes focusing on health benefits (with data fed using Sahha API), elevation considerations, weather, traffic conditions, and fun facts.
-
Popular Spots
- Display popular cycling spots around the user's location with short summaries generated using Google Gemini Flash and images generated using OpenAI's DALL-E 2.
-
QR Code Integration
- Generate a QR code for user data, which can be scanned and linked with an iPhone app for additional health data integration.
-
Trip History
- View past trips, with historical data stored and retrieved from Supabase.
-
AI-Generated Images
- Utilize OpenAI to generate images of the planned routes for better visualization.
-
QR Code Scanner
- Scan QR codes generated by the web app to link the user’s iPhone to their Cycling.ai account, enabling the integration of Sahha AI for further health insights.
-
Demographics
- Users can input and update their demographic information.
-
Sensor Management
- Enable or disable sensors for health monitoring and link health data with Supabase.
-
Health Analysis
- Obtain daily and weekly health analysis using Sahha AI and store this data in Supabase.
-
WebView Integration
- View additional insights through web views embedded within the app.
The iPhone app is also open source and available here. It is not available on the App Store or on TestFlight currently.
- Backend: Built using Flask, handling routes and API calls.
- Frontend: Uses HTML, CSS, and React.js for dynamic user interaction.
- AI Integration:
- Google Gemini Flash: Configured for natural language responses and summaries.
- OpenAI (DALL-E 2): For generating visual content based on route names.
- Data Management: Supabase for real-time data storage and retrieval.
- Maps & Geolocation: Google Maps API for route calculation and displaying directions.
- Weather & Traffic:
- OpenWeatherMap API for weather data.
- Bing Maps API for real-time traffic updates.
- Sydney Roadwork API for up-to-date roadworks.
- Language: SwiftUI for building an intuitive user interface.
- Health Data: Sahha AI for collecting and analyzing health data from sensors.
- QR Code Linking: Integrated QR code scanner for linking the user's device with their Cycling.ai account for more personalised recommendations.
The inspiration for Cycling.ai came from the necessity of having a comprehensive and intelligent tool for cyclists who want to plan routes efficiently while keeping their health and wellness in check. By integrating advanced AI capabilities and real-time data, the goal is to enhance the cycling experience holistically.
-
Enhanced AI Insights
- Extend the AI functionalities to provide even more personalized and insightful health recommendations based on historical data trends.
-
Social Features
- Introduce social sharing options where users can share their routes and achievements on social media platforms.
-
Fitness Challenges
- Create community-driven fitness challenges and leaderboards.
-
Expanded Coverage
- Incorporate additional APIs to extend coverage and data accuracy for more regions worldwide.
-
Mobile App Enhancements
- Develop richer functionalities within the iOS app, including push notifications for route updates and health insights.
-
Cross-Platform Support
- Launch an Android version of the mobile app to reach a wider audience.
- Python 3.x
- Flask and other Python dependencies (listed in
requirements.txt
) - .env file with necessary API keys and configurations
-
Clone the repository:
git clone https://github.com/AllStars101-sudo/cycling.ai.git cd cycling.ai
-
Set up the environment:
pip install -r requirements.txt
-
Configure environment variables in a
.env
file:APP_SECRET_KEY=your_app_secret_key AUTH0_DOMAIN=your_auth0_domain AUTH0_CLIENT_ID=your_auth0_client_id AUTH0_CLIENT_SECRET=your_auth0_client_secret SUPABASE_PROJECT_URL=your_supabase_project_url SUPABASE_PUBLIC_API_KEY=your_supabase_public_api_key GOOGLE_API_KEY=your_google_api_key OPENWEATHERMAP_API_KEY=your_openweathermap_api_key BING_MAPS_API_KEY=your_bing_maps_api_key SYDNEY_API_KEY=your_transportfornsw_api_key GEMINI_API_KEY=your_google_gemini_api_key
-
Run the application:
python app.py
Feel free to fork the repository, make improvements and submit pull requests. Ensure code quality by following the project's coding standards and guidelines.
Cycling.ai combines health, technology, and interactive design to create an unparalleled experience for cyclists worldwide. Enjoy your ride! 🚴♂️✨