Architecting Zeera: Engineering a Context-Aware Fitness & Nutrition Platform
Building a health tracker in 2026 requires moving beyond manual logbooks. When founder Aditi Rao set out to build Zeera, the goal was simple: eliminate tracking friction. Users shouldn't have to search a database of 10,000 items to log a cup of coffee. They should be able to say, "I had black coffee and two eggs at 8 AM," and have the system structure it instantly.
Here is the technical blueprint of how we engineered and launched Zeera’s member portal, database architecture, and subscription engine using Next.js 15, Supabase, and Stripe in just 4 weeks.
1. The Core Architecture
Zeera is built as a highly responsive Progressive Web App (PWA).
graph TD
User[Client / PWA] -->|Unstructured Input| Next[Next.js App Router]
Next -->|Server Actions| AI[Gemini / JSON Schema]
AI -->|Structured JSON| DB[(Supabase PostgreSQL)]
Next -->|Billing Checkout| Stripe[Stripe Billing Engine]
Stripe -->|Webhooks| Next
Tech Stack Choices
- Frontend: Next.js 15 (React 19) utilizing Server Components for fast initial paints.
- Database & Auth: Supabase. PostgreSQL handles relational meal logs, and Row Level Security (RLS) protects medical/fitness details.
- Styling & Motion: Tailwind CSS and Framer Motion for premium, context-rich micro-interactions.
- Payment Rail: Stripe billing engine with secure hosted checkout sessions.
2. Dynamic Schema Processing via JSON Schema
Instead of requiring manual drop-downs, Zeera takes unstructured voice/text logs and converts them into structured tables.
Here is the Next.js Server Action that handles the processing pipeline:
// app/actions/logger.ts
"use server";
import { generateObject } from "ai";
import { google } from "@ai-sdk/google";
import { z } from "zod";
export async function parseFitnessLog(unstructuredInput: string) {
const { object } = await generateObject({
model: google("gemini-2.5-pro"),
schema: z.object({
entries: z.array(
z.object({
name: z.string().describe("Name of food item or exercise"),
quantity: z.string().describe("Amount consumed or duration"),
calories: z.number().describe("Estimated calories"),
type: z.enum(["food", "exercise"]),
})
),
summary: z.string().describe("Friendly summary of the logged activities"),
}),
prompt: `Parse this natural language log: "${unstructuredInput}"`,
});
return object;
}
This ensures that the database receives clean, structured data every time, while the user enjoys a seamless, single-input typing experience.
3. Bulletproof Row Level Security (RLS)
Security is paramount in health tech. We implemented Supabase RLS to guarantee that users only ever access their own metrics.
-- Enable RLS
ALTER TABLE public.user_logs ENABLE ROW LEVEL SECURITY;
-- Select Policy
CREATE POLICY "Users can view their own logs"
ON public.user_logs
FOR SELECT
USING (auth.uid() = user_id);
-- Insert Policy
CREATE POLICY "Users can insert their own logs"
ON public.user_logs
FOR INSERT
WITH CHECK (auth.uid() = user_id);
4. Deployed Founder Outcomes
By leveraging serverless functions and managed databases, Zeera launched with zero server infrastructure to maintain:
- Meal Logging Friction Reduced: 85% reduction in daily input time.
- Zero Overhead Billing: Hosted Stripe portals automate plan upgrades and cancellations.
- Speed to Market: 4 weeks from concept to production launch.
Are you looking to scale your own SaaS or automate database workflows? Learn more about Gozora’s founder-track cohort program at gozora.me/learners.
