Inspiration
The inspiration came from the desire to democratize access to high-level sports science. Elite athletes have teams that analyze every data point, but this level of insight is often out of reach for most athletes, coaches, and smaller clinics. We saw an opportunity to use AI to bridge that gap, transforming standard, static PDF medical reports into a dynamic source of actionable insights that could help optimize performance and monitor an athlete's health effectively.
What it does
AI Sports Medicine
- Ingests Data: Users upload an athlete's medical exam in PDF format.
- Extracts & Analyzes: It uses the Gemini AI to automatically read the document, extract key health metrics (like hormone levels, blood counts, etc.), and analyze the results.
- Provides Context: The athlete's data is compared against benchmarks from professional athletes in various sports to provide valuable context on where they stand.
- Visualizes Trends: All data is saved to a centralized athlete profile, where it's displayed on an interactive dashboard with charts to easily track health trends over time.
How we built it
The platform was constructed using a modern, scalable tech stack designed for rapid development and a secure user experience.
- Frontend: We used React with TypeScript for a robust and type-safe user interface. The build tool Vite ensured a fast development environment.
- UI & Visualization: The interface was built with Tailwind CSS and pre-built components from shadcn/ui. For data visualization, we used Recharts to create the interactive historical trend charts.
- Backend & Database: The entire backend is powered by Supabase, which provided the PostgreSQL database for storing user data, file storage for the uploaded PDFs, and serverless Edge Functions to run the analysis logic.
- AI Integration: The core analytical power comes from the Google Gemini API. It's called from a Supabase Edge Function to process the documents, extract information, and perform the comparative analysis.
- State Management: We used @tanstack/react-query on the frontend to efficiently manage server state, handle data fetching, and keep the UI seamlessly in sync with the backend.
Challenges we ran into
- Handling Asynchronous AI Analysis: The AI analysis isn't instant. A key challenge was creating a smooth user experience while a file was being processed in the background. We implemented a 30-second timeout and robust error handling to manage cases where the analysis might fail or take too long, ensuring the user always gets clear feedback.
- Data Extraction from Variable PDFs: Medical reports don't have a single, standard format. We had to design our AI prompts and logic to be flexible enough to correctly identify and extract data from various PDF layouts and structures, which required significant iteration.
- Ensuring Data Integrity: With a multi-step process (upload, AI analysis, database save), we had to build safeguards to prevent incomplete or "orphaned" data. For example, if the AI analysis failed, we needed to make sure a blank record wasn't created, so we built rollback mechanisms into our serverless functions.
Accomplishments that we're proud of
We are incredibly proud of building a functional end-to-end platform that successfully translates a complex idea into a simple, user-friendly tool. A major accomplishment was creating the seamless workflow that takes an unstructured PDF, processes it with a powerful AI, and returns structured, visualized data without overwhelming the user. We are also proud of architecting a secure and scalable system using modern tools like Supabase and Gemini, proving that sophisticated AI-powered analysis can be made accessible to a wider audience.
What we learned
- The Power of Serverless: Using Supabase Edge Functions was a huge lesson in efficiency. It allowed us to run complex backend logic and integrate with the Gemini API without managing our own server infrastructure.
- AI Is an Assistant, Not a Replacement: We learned the importance of positioning the AI as a powerful assistant. The results are incredibly insightful, but they are meant to guide and accelerate human expertise, not replace it. This led us to build in reminders and tips about validating results with clinical professionals.
- The Importance of a Clean UI: For a data-heavy application, the user interface is critical. We learned that presenting complex data in a simple, visual way (like the trend charts) is just as important as the accuracy of the data itself. A clean UI makes the information approachable and ultimately more useful.
What's next for AI Sports Medicine
The future for this platform and for AI in sports medicine is incredibly exciting. Our next steps are focused on expanding its capabilities:
- Predictive Analytics: Move beyond historical tracking to predictive insights. We plan to use longitudinal data to forecast potential injury risks or identify early signs of overtraining.
- Broader Data Integration: Integrate with data from wearable devices (like Garmin, Whoop) to correlate clinical lab results with daily training loads, sleep, and recovery metrics for a truly holistic view of an athlete.
- Personalized Recommendations: Evolve from providing comparative analysis to offering actionable, AI-generated recommendations for nutrition, training adjustments, or recovery protocols based on the data.
- Team & Coach Portal: Develop a dedicated interface for coaches and organizations to manage and oversee the health and performance data of their entire roster of athletes securely.
Built With
- gemini
- pubmed
- react-18
- reacthook
- supabase
- tailwind
- typescript
- vite
Log in or sign up for Devpost to join the conversation.