Inspiration

It has been over five years since my daughter was diagnosed with Type 1 Diabetes, and maintaining stable blood glucose levels remains a daily challenge. Diabetes management extends far beyond insulin dosing; it requires constant navigation of a complex and ever-changing set of variables. Food choices, carbohydrate counts, glycemic index, insulin timing, insulin pump, CGM, infusion set issues all interact in ways that can significantly impact blood glucose levels.

Despite advances in continuous glucose monitors (CGMs) and insulin pumps, much of the burden still falls on the patient and caregivers to interpret data, estimate carbs, and recognize patterns, often after things have already gone wrong. I wanted to build something that could reduce that cognitive load: a system that helps make sense of the data, improves carb accuracy, and proactively identifies patterns that could help anticipate highs and lows before they happen.

BGenius was born from that need.


What it does

BGenius is an AI-powered Co-Pilot designed to help people with Type 1 Diabetes make better, more informed decisions around their diabetes management.

At its core, BGenius:

  • Extracts and Aggregates blood glucose (BG), insulin, and carb data from Medtronic Insulin pump and CGM every 5 mins
  • Helps estimate carbohydrate content more accurately for meals using AI image recognition
  • Uses AI to identify patterns and trends that are hard to see manually
  • Generates concise, human-readable insights to explain why blood glucose behaved the way it did
  • Lays the foundation for proactive guidance—flagging situations that may lead to highs or lows

Instead of raw charts and numbers, BGenius focuses on turning data into understanding.


How we built it

BGenius is built as a modern, lightweight AI-driven web application.

  • Backend: GCP Cloud Storage, Cloud Run Functions and Cloud SQL database to process CGM and Pump data in real-time
  • Front End: Django Web App connecting to GCP services for Data and AI.
  • AI Layer: Google Gemini models are used to analyze food images, forecast BG and generate summaries, insights, and explanations from the aggregated data
  • App Serving: Deployed on Railway.com for scalability and security
  • Security: Credentials and secrets are handled via environment variables and cloud-native identity mechanisms

The architecture was intentionally kept modular so new data sources, models, and features can be added quickly.


Challenges we ran into

While coding was the easier part, thanks to coding agents, the toughest part was stitching the different services together.

GCP: Setting up Cloud Run functions to trigger on file arrival in Cloud Storage required understanding the nuances of different trigger types like Eventrac, Cloud Storage, Audit Logs etc. The different versions of Cloud Run functions like V1, V2 also contributed to some issues.

Railway: Setting up connectivity between the Django app and the Railway Postgres Database was a challenge.

AI Insights: Providing the right context and prompt to make the models do what I wanted them to do required a bit of trial and error as well. Extracting the output from AI Model and displaying the content also required a few iterations to get it right.


Accomplishments that we’re proud of

  • Built an end-to-end AI-powered diabetes insight pipeline in a short time
  • Successfully transformed raw metabolic data into understandable summaries
  • Created a flexible data model that can grow with the product
  • Grounded the project in a real, deeply personal problem rather than a hypothetical use case
  • Demonstrated how generative AI can reduce cognitive load, not replace human judgment

What we learned

Vibe coding ushers in a new era of building personalized apps quickly. AI has advanced a lot, what was unimaginably difficult is now super simple. AI is a great fit for Diabetes management given how data intensive Diabetes is.


What’s next for BGenius

Next, we plan to:

  • Store 90 days of history along with food data to provide deeper insights based on past data
  • Send text notifications via Twilio for highs and lows
  • Convert the app into an iOS and Android app

The long-term vision for BGenius is simple: make living with Type 1 Diabetes a little less overwhelming, one insight at a time.

Built With

Share this project:

Updates