Most health apps overwhelm you with data or demand a 30-day commitment before you see any results. We wanted something simpler: a weekly check-in that actually tells you something meaningful. The idea came from asking — what if you could see your biological age change week by week, based on the habits you already track? Sleep, exercise, and smoking are three of the most well-studied lifestyle factors affecting longevity. We built LongevAI to make that feedback loop visible and actionable.
What it does
LongevAI is a weekly health check-in app that computes your health age — a projected biological age based on your current lifestyle habits. Each week, you log three things: average sleep hours, exercise days, and cigarettes per day. LongevAI compares your check-in to the previous week, recalculates your health score, and uses Gemini AI to generate a personalized summary of what changed and what to focus on next.
The core agentic loop is: this week's check-in → compare to last week → recalculate score → generate 3 insights
How we built it
We used a lean, unified stack to ship fast:
- Frontend & Backend: Next.js (App Router) with API routes as the backend — no separate server
- Styling: Tailwind CSS
- Charts: Recharts for the health age trend line
- Database: Supabase (PostgreSQL) with two tables:
profilesandcheckins - AI: Google Gemini API for generating the weekly summary paragraph
- Deployment: Vercel + GitHub
The scoring logic is deterministic TypeScript — we compute a risk score from sleep, exercise, and smoking inputs, then map it to a health age offset from the user's actual age. Gemini is only called once per check-in to generate the narrative summary, keeping API costs minimal.
Challenges we ran into
- Keeping the scope tight: we deliberately cut features (no auth, no notifications, no 30-day plans) to stay shippable within the hackathon window
- Designing a risk scoring formula that feels meaningful without being medically misleading
- Making the week-over-week comparison logic produce useful, non-redundant insight messages
Accomplishments that we're proud of
- A fully working agentic loop: check-in → score → compare → AI summary, all in one API call
- A clean dashboard that shows health age trend over time with Recharts
- Gemini integration that produces genuinely useful, context-aware summaries rather than generic health tips
What we learned
- Next.js API routes are fast enough to serve as a full backend for a hackathon-scale app
- Supabase makes it trivial to set up a relational schema and query it from server actions
- Keeping AI usage focused (one summary paragraph per check-in) makes the product feel more trustworthy, not less
What's next for LongevAI
- Add more lifestyle factors: stress level, alcohol, hydration
- Weekly email or push reminders to complete the check-in
- A streak system to reward consistency
- Shareable health age cards for social media
Built With
- eslint
- figma
- gemini
- github
- next.js
- recharts
- supabase
- tailwind
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.