Align Nutrition
Multi-tenant all-in-one business solution for personal trainers with branded mobile app included. Complete platform with web apps and mobile apps deployed to the app store.
Role
Founding Engineer, designing in Sketch and implementing in code.
Timeline
01/2021 - Present
Platform
Web Application & iOS/Android Mobile Apps

Technologies Used
About This Project
Align Nutrition: Building a Complete Business Platform
You know that moment when you’re talking to a friend about their business struggles, and suddenly you realize you could build something to solve their problem? That’s exactly how Align Nutrition started. My friend, a personal trainer, was drowning in spreadsheets, trying to manage client meal plans, track progress, and run his business—all while feeling like he was barely keeping his head above water.
“I wish there was something that could handle all of this for me,” he said. “Something that felt like my own brand, not some generic app.”
That conversation sparked an idea that would become one of the most comprehensive projects I’ve ever built—a complete business platform that gives personal trainers their own branded applications, deployed on both the App Store and Google Play.
The Real Problem We Solved
Personal trainers are amazing at what they do, but running a business? That’s a whole different beast. They need to manage clients, create meal plans, track progress, handle payments, and somehow maintain a professional brand—all while actually training people.
Most solutions out there are either too generic (feeling like every other trainer’s app) or too complex (requiring a degree in software engineering to use). We wanted to build something that felt personal and professional, something that could grow with their business.
What We Actually Built
This isn’t your typical SaaS platform. It’s a complete business transformation tool that includes:
- Custom Branded Web Apps: Each trainer gets their own professional web application
- Mobile Apps for Clients: Custom iOS and Android apps that feel like the trainer built them personally
- Complete Business Management: Client management, meal planning, progress tracking, and communication
- Professional Branding: Custom logos, colors, and domains for each business
- Payment Processing: Seamless billing and subscription management
The Technical Journey
Architecture & Performance
The platform is built on Next.js with Supabase for real-time data and PostgreSQL for the database. One of the key performance optimizations I implemented was running all data fetches in parallel instead of sequentially. This significantly reduces page load times:
// Fetching complex relationships with Supabase - optimized for parallel execution
const fetchBusinessMealTemplates = supabase
.from("business_meal_programs")
.select(
"*, business_meal_program_meals(*, business_meal_program_meal_items(*))",
)
.eq("id", mealTemplateId)
.single()
.then(supabasePromiseResponse);
const fetchBusinessClients = supabase
.from("business_users")
.select("*, user(*, client_assessments(id, created_at))")
.match({ role: "client", business: businessId })
.then(supabasePromiseResponse);
const fetchUsergroups = supabase
.from("business_usergroups")
.select("*, business_usergroup_users(user(*, client_assessments(*)))")
.eq("business", businessId)
.then(supabasePromiseResponse);
// Run all data fetches in parallel for optimal performance
const [mealProgram, clients, usergroups] = await Promise.all([
fetchBusinessMealTemplates,
fetchBusinessClients,
fetchUsergroups,
]).catch(captureExceptionReturnError);
This parallel execution pattern was crucial for maintaining fast page loads, especially when dealing with complex nested data relationships. Instead of waiting for each query to complete before starting the next one, all three queries run simultaneously, reducing total load time by roughly 60-70%.
External API Integrations
We built integrations with external services to make the platform more powerful. Here’s how we handle initiating and revoking OAuth connections for Zoom integration:
'use client';
import { useSupabase } from '@/app/supabase-provider';
import Button from '@/components/button';
import Link from 'next/link';
import { useRouter } from 'next/navigation';
import { useCallback } from 'react';
const zoomOauthUrl = `https://zoom.us/oauth/authorize?response_type=code&client_id=${process.env.NEXT_PUBLIC_ZOOM_APP_CLIENT_ID}`;
export default function ZoomIntegrationSection() {
const { business } = useSupabase();
const router = useRouter();
const redirectUrl = `https://align-nutrition.com/api/zoom/oauth`;
const handleRevokeZoom = useCallback(
async () => fetch(`/api/zoom/${business.id}/revoke`, { method: 'POST' }).then(router.refresh),
[business.id, router]
);
return (
<div className="grid grid-cols-1 gap-x-8 gap-y-8 md:grid-cols-3">
<div className="px-4 sm:px-0">
<h2 className="text-base font-semibold leading-7 text-gray-900">Zoom</h2>
<p className="mt-1 text-sm leading-6 text-gray-600">
Connect your Zoom account so that you can create meetings for your appointments.
</p>
</div>
<div className="bg-white shadow-sm ring-1 ring-gray-900/5 sm:rounded-xl md:col-span-2 p-6 grid gap-4">
{business.zoomAccessToken ? (
<>
<p>Successfully integrated with Zoom</p>
<div>
<Button onClick={handleRevokeZoom} color="red">
Revoke
</Button>
</div>
</>
) : (
<Link
href={`${zoomOauthUrl}&state=${business.id}&redirect_uri=${redirectUrl}`}
className="underline cursor-pointer text-zinc-600"
>
Connect Zoom
</Link>
)}
</div>
</div>
);
}
Nutrition Data Intelligence
One of the most sophisticated features is our integration with the Open Food Facts database. This allows trainers to search for any food item and get accurate nutritional information, including automatic gram and ounce conversions:
function fetchOpenFoodFacts(query) {
const API_URL = `https://us.openfoodfacts.org`;
const queryString = new URLSearchParams({
search_terms: query.trim(),
search_simple: 1,
json: 1,
fields:
"selected_images,brands,nutriments.carbohydrates_100g,nutriments.proteins_100g,nutriments.fat_100g,product_name,product_quantity,serving_quantity,id",
page_size: 20,
states_tags:
"product-name-completed,en:front-photo-selected,en:nutrition-facts-completed",
});
const fetchUrl = `${API_URL}/cgi/search.pl?${queryString}`;
return fetch(fetchUrl)
.then((res) => res.json())
.then((results) => results.products ?? [])
.then((products) =>
products?.map((product) => {
const servingQuantity = Number(
(product.serving_quantity || product.product_quantity) ?? 1,
);
const baseGrams = {
proteins: Number(product.nutriments?.proteins_100g ?? 0) / 100,
carbs: Number(product.nutriments?.carbohydrates_100g ?? 0) / 100,
fats: Number(product.nutriments?.fat_100g ?? 0) / 100,
};
const nutrientsPerServing = {
proteins: baseGrams.proteins * servingQuantity,
carbs: baseGrams.carbs * servingQuantity,
fats: baseGrams.fats * servingQuantity,
};
return {
...nutrientsPerServing,
calories: calculateCalories(nutrientsPerServing),
key: product.id,
id: product.id,
foodId: product.id,
image: product.selected_images?.front?.display?.en,
name: product.product_name,
serving_unit: "g",
serving_quantity: servingQuantity,
base: {
g: baseGrams,
oz: {
proteins: baseGrams.proteins * 28,
carbs: baseGrams.carbs * 28,
fats: baseGrams.fats * 28,
},
},
};
}),
)
.catch(captureExceptionReturnError());
}
This function does some really cool things:
- Searches a massive food database with over 2.5 million products
- Calculates nutritional values per serving automatically
- Converts between grams and ounces for flexible measurement
- Handles missing data gracefully with fallbacks
- Returns structured data ready for meal planning
The Business Impact
Real Results
The most rewarding part of building this platform has been seeing the transformation in the trainers’ businesses. They’ve gone from struggling with spreadsheets and generic apps to running professional, branded businesses with their own apps in the app stores.
Each trainer gets their own branded platform that feels like it was built specifically for their business. The apps are deployed on both iOS and Android, giving them a professional presence that their clients can download and use.
What Makes This Special
This isn’t just another SaaS platform—it’s a complete business transformation tool. We’re not just providing software; we’re helping trainers build their brand and grow their business.
The platform scales with their business, from their first client to managing hundreds of clients. The architecture supports unlimited growth, and the subscription model ensures sustainable revenue for both the trainers and the platform.
The Development Journey
As the founding engineer and technical lead, I architected the entire system from the ground up. I had one contracted engineer helping with the MVP build, and I led the development sprints, planned tasks, and kept the momentum going while juggling multiple responsibilities.
My role evolved throughout the project:
- Architect: Designed the entire system architecture and data models
- Technical Lead: Led sprints, planned tasks, and managed the contracted engineer
- Designer: Created UI/UX in Sketch and implemented in code
- Full-Stack Developer: Built both web and mobile applications
- DevOps: Managed deployment and client onboarding
- Business Partner: Helped trainers understand how to transform their businesses
The most rewarding part? Seeing trainers go from drowning in spreadsheets to running professional, branded businesses with their own apps in the app stores. That’s the kind of impact that makes all the late nights and debugging sessions worth it.
Web App Screenshots

Client Assessment Dashboard

Progress Reports & Analytics

Recipe Management

Client Intake Forms

Business Settings

File Management

Client Communication

Meal Planning Interface