GlucoPulse: An Open-Source AI Metabolic Guardian I Built for My Friend Alex A developer built GlucoPulse, an open-source, privacy-first metabolic digital twin that forecasts post-meal glucose spikes using Prior Labs' TabPFN tabular foundation model and Google Gemma 2 for plain-English coaching. Built for a 24-year-old software engineer with an HbA1c of 5.9%, the app predicted a Pad Kee Mao meal would peak at 197.8 mg/dL and showed that a 15-minute walk plus eating a side salad first lowered the predicted peak to 156.2 mg/dL. The project reports 60 days of journaling with 82.5% time in range and an estimated HbA1c of 5.4%, down from a 5.9% baseline. This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend https://dev.to/challenges/hacktoberfest-weekend-2026-10-01 A few months ago, my close friend and former roommate Alex a 24-year-old software engineer received alarming news from routine annual bloodwork: an HbA1c of 5.9% , placing them squarely in the pre-diabetic danger zone. Alex bought an over-the-counter Continuous Glucose Monitor CGM to learn how food impacted their body. But instead of feeling empowered, Alex felt overwhelmed and anxious: "Every time I sit down to eat, I feel this surge of anxiety. My CGM app screams at me at 178 mg/dL, but only AFTER I’ve finished eating and the damage is done. The commercial apps on the market don't tell me what to do beforehand, they lock predictive features behind $40/month subscriptions, and worst of all, they harvest my intimate medical biometrics to sell to pharma advertisers. I just want to know: if I eat this bowl of noodles, what will happen? And what can I do so I don't spike into oblivion?" I built GlucoPulse — an open-source, privacy-first metabolic digital twin designed specifically for Alex. GlucoPulse takes the meals Alex actually loves like spicy Thai Pad Kee Mao noodles or a morning bagel with cream cheese , combines them with physiological biomarkers pre-meal baseline glucose, sleep deprivation, stress levels, and post-meal movement , and runs them through Prior Labs' TabPFN tabular foundation model to forecast: When I opened GlucoPulse on my laptop and handed it to Alex, their jaw literally dropped. We immediately loaded Alex's biggest dietary weakness: Spicy Thai Drunken Noodles Pad Kee Mao with a short 5.5 hours of sleep from the night before. TabPFN predicted a sharp hyper-spike peaking at 197.8 mg/dL . Then, we clicked over to the Intervention Studio . Watching the combined protocol curve drop the predicted peak down from 197.8 mg/dL to 156.2 mg/dL simply by adding a 15-minute walk and eating a side salad first changed everything for Alex: "Wait... you mean I don't have to give up Pad Kee Mao forever? I just need to eat the chicken and veggies first and take a walk around the block with my dog? Seeing this curve shift in real time gives me my life back. And knowing this runs right here on my machine with zero subscription and zero medical tracking gives me peace of mind I haven't felt in months." Here is a quick look at GlucoPulse in action: 🚀 Live Application: Backend & ML: FastAPI + Prior Labs TabPFN + Google Gemma 2 Interactive 180-Minute Glycemic Curve: Visualizes rising velocity, peak time, and clearance duration with shaded Bayesian confidence bands and clinical thresholds 140 mg/dL and 180 mg/dL . What-If Intervention Studio: Side-by-side multi-curve comparisons between baseline meal, 15-minute walk, fiber boost, and meal sequencing. Gemma 2 Clinical Coaching: Plain-English biochemical mechanisms, practical culinary swaps, and empathetic encouragement. 60-Day Journal: 180 real-world meal records with clinical metrics Time in Range: 82.5% , Estimated HbA1c: 5.4% down from 5.9% baseline . Physician Export Sheet: One-click copy/print clinical summary for healthcare providers. You can explore the complete, open-source codebase on GitHub: Built with love for Alex — a 24-year-old software engineer and close friend diagnosed with pre-diabetes, who felt paralyzed by unpredictable blood sugar spikes and closed-source commercial apps that sell personal health data. A few months ago, my close friend and former roommate Alex received alarming news from routine annual bloodwork: an HbA1c of 5.9% , officially putting them in the pre-diabetic danger zone. Alex bought an over-the-counter Continuous Glucose Monitor CGM to track their body's response to food. But instead of feeling empowered, Alex felt overwhelmed: glucopulse/ ├── backend/ │ ├── main.py FastAPI REST API & static asset server │ ├── models/ │ │ ├── tabpfn engine.py Prior Labs TabPFN foundation model & Bayesian engine │ │ ├── gemma coach.py Google Gemma 2 clinical reasoning & culinary swaps │ │ └── voice service.py ElevenLabs neural voice synthesis │ └── data/ │ ├── generate data.py Physiological metabolic dataset generator │ └── alex metabolic history.csv Alex's 60-day CGM calibration log ├── frontend/ Modern React 18 + Vite + Tailwind + Recharts │ ├── src/ │ │ ├── components/ │ │ │ ├── Header.tsx │ │ │ ├── MealPredictorTab.tsx │ │ │ ├── InterventionStudioTab.tsx │ │ │ ├── GemmaCoachTab.tsx │ │ │ ├── HistoryExplorerTab.tsx │ │ │ ├── ClinicalReportTab.tsx │ │ │ └── SettingsModal.tsx │ │ ├── App.tsx │ │ └── types.ts ├── render.yaml 1-click cloud deployment blueprint for Render ├── Dockerfile Multi-stage production container └── requirements.txt Pinned backend dependencies --- How I Built It GlucoPulse is built on a modern, decoupled architecture centered around open-source AI: mermaid flowchart LR A "Alex / User Input" -- B "React 18 + Recharts UI" B -- C "FastAPI Backend Engine" C -- D "Prior Labs TabPFN Tabular Foundation Model " C -- E "Google Gemma 2 Open-Weight LLM " C -- F "ElevenLabs Voice Engine" D -- B E -- B F -- B 1. Tabular Foundation Model: Prior Labs TabPFN Most machine learning models for tabular continuous glucose data fail because individual metabolic datasets are small a few hundred meals and noisy. Traditional gradient boosting XGBoost/LightGBM requires hyperparameter tuning and easily overfits on small personal logs. Prior Labs' TabPFN Tabular Prior-data Fitted Network is a game-changer: - It is a foundation transformer pretrained on millions of synthetic tabular prior datasets. - TabPFN delivers instant zero-shot Bayesian predictions without needing iterative gradient descent or hyperparameter searches. - We passed a 12-dimensional feature vector representing Alex's meal carbs, fiber, net carbs, protein, fat, glycemic index, pre-meal glucose, sleep hours, stress level, post-meal walk minutes, and meal hour to TabPFNRegressor and TabPFNClassifier . - TabPFN predicts the realized peak glucose and classifies the excursion risk category with full uncertainty estimation. - In addition, GlucoPulse features an intelligent dual-mode architecture: if native TabPFN weights are loaded with a token, it uses Prior Labs' native engine; otherwise, it seamlessly evaluates a Bayesian physiological surrogate calibrated to Alex's exact historical distribution so the app works reliably for any evaluator out of the box python from tabpfn import TabPFNRegressor, TabPFNClassifier X vec = np.array carbs, fiber, net carbs, protein, fat, gi, gl, pre meal, sleep, stress, walk, hour peak pred = float tabpfn regressor.predict X vec 0 cls pred = str tabpfn classifier.predict X vec 0 probs = tabpfn classifier.predict proba X vec 0 2. Clinical Reasoning & Culinary Swaps: Google Gemma 2 Tabular foundation models give precise numbers, but humans need narrative understanding. We integrated Google's open-weight Gemma 2 to parse TabPFN's posterior output and deliver clinician-grade advice: - Biochemical Explanation: Explaining why short sleep increases cortisol and blunts insulin sensitivity, or how soluble fiber slows gastric emptying. - Smart Swaps: Offering practical, tasty food modifications e.g. cooling rice to form retrograded resistant starch, or using sprouted sourdough bread . - 5-Minute Micro-Steps: Concrete behavioral nudges e.g. drinking water with apple cider vinegar or taking a 10-minute conversational stroll . 3. Hands-Free Voice Guidance: ElevenLabs When Alex is in the kitchen with food on their hands, reading a screen is impractical. We integrated the ElevenLabs Text-to-Speech API to synthesize Gemma's metabolic guidance into a calm, natural voice briefing. 4. Cloud Deployment: Render To make GlucoPulse accessible anywhere Alex goes, the app includes a production-ready render.yaml blueprint. A single web service compiles the Vite React frontend and serves both the REST API and static UI with zero CORS friction and continuous /api/health monitoring. --- Why Does Open Innovation Matter? When dealing with chronic health conditions like pre-diabetes, open innovation is not just a developer preference — it is an ethical requirement : 1. Absolute Health Data Privacy & Sovereignty: Continuous glucose readings, sleep logs, and meal records reveal the most intimate details of a person's life. Proprietary closed-source wellness apps routinely monetize biometric telemetry by packaging it for insurance underwriters, ad trackers, and data brokers. By using open-weight models TabPFN and Gemma , Alex's health data stays 100% private, running on a local machine or private cloud container with zero corporate surveillance. 2. Democratizing Chronic Disease Prevention Zero Paywalls : Commercial CGM software companies lock predictive AI features behind $30 to $50 per month subscription paywalls. For a 24-year-old friend just starting their career, that adds up to $600/year. Because TabPFN and Gemma are open, GlucoPulse costs $0 to run forever . 3. Offline Reliability No Wi-Fi Needed : When Alex is camping, traveling on an airplane, or experiencing an internet outage, closed API-dependent apps go completely dark. GlucoPulse can run entirely offline on a laptop CPU without internet access. 4. Transparent, Auditable Logic: Medical technology should never be an unexplainable "black box." Because the codebase and models are open, Alex and their doctor can inspect every single line of code, understand the physiological formulas, and trust the predictions. --- My Agent Session This project was built with the assistance of an autonomous coding agent. The interactive DevRelay transcript captures the complete trajectory — from validating Prior Labs TabPFN foundation model zero-shot inference to architecting the dual-mode Bayesian surrogate engine and configuring the production Render deployment. {% agent session 450 %} 🔗 Interactive DevRelay Transcript: View Agent Session 450 on DEV https://dev.to/agent sessions/building-glucopulse-open-source-ai-metabolic-guardian-tabpfn-gemma-render-4tvtfa --- Prize Categories I am officially entering GlucoPulse into the following partner categories: - Best Use of TabPFN $200 : Native integration of Prior Labs' TabPFNRegressor and TabPFNClassifier for zero-shot Bayesian continuous glucose forecasting and counterfactual lifestyle simulation. - Best Use of Gemma $200 : Utilizing Google's open-weight Gemma 2 model to translate tabular metabolic statistics into warm, empathetic clinical coaching, food sequencing, and culinary swaps. - Best Use of Render $200 : Production deployment configured via render.yaml with multi-stage build, health check endpoint, and zero-configuration environment setup. - Best Use of ElevenLabs $100 : Integrated ElevenLabs neural voice synthesis to deliver hands-free audio briefings while cooking in the kitchen. --- Built with love for Alex • Hacktoberfest 2026: Build for a Friend