Tech Stack:
Health‑AI Fitness App — Cross‑Platform with React Native, GenKit & Firebase
An intelligent fitness companion that generates adaptive workout plans, personalized health insights, and conversational data intake—Cross-platform using React Native, an AI engine powered by GenKit, and Firebase backend services.
🧠 Project Overview
An end‑to‑end, AI-powered fitness app designed to:
- Dynamically build user profiles through intelligent, chat-style + traditional check-mark based questionnaires.
- Generate adaptive, goal-driven workout plans that evolve with user progress.
- Provide personalized health insights and notifications based on user data and habits.
- Offer a conversational interface for seamless data intake.
- Integrate securely with Firebase for authentication, storage, analytics, and AI logic.
- Plot personalized workout and meal schedules on a daily calendar view for better planning.
- Include reminders and push notifications to improve adherence to plans.
- Implement a sophisticated algorithm considering health standards like the PAR-Q+ questionnaire and established fitness guidelines.
- Aim for future migration to native development for maximum performance and deep integration with device sensors and OS-level features.
🔧 Tech Stack
| Layer | Technology |
|---|---|
| Front-end | React Native (iOS & Android) |
| AI Engine | GenKit (AI orchestration, structured JSON) |
| Backend | Firebase Auth, Firestore, Analytics |
| UI Components | GiftedChat, FlatList, Calendar libraries |
📌 Core Features & Code Snippets
1. Adaptive Questionnaire UI
Collects user data such as weight, goals, and detailed health screening questions based on PAR-Q+ standards:
const questions = [
{ id: 'weight', prompt: "What's your current weight?" },
{ id: 'goal', prompt: "What's your main fitness goal?" },
{ id: 'parq', prompt: "Do you have any known health issues that affect exercise?" },
];
const handleAnswer = async (id, answer) => {
console.log('Answer:', id, answer);
await firestore.collection('profiles').doc(user.uid)
.set({ [id]: answer }, { merge: true });
proceedToNextQuestion();
};
2. AI‑Driven Complex Workout & Nutrition Algorithm
Constructs personalized plans considering user goals, health constraints, and standards:
async function generatePlan(profile) {
const prompt = `
Design a workout and meal plan:
- Age: ${profile.age}
- Weight: ${profile.weight}
- Goal: ${profile.goal}
- Health issues: ${profile.parq}
Include a full day's schedule mapped to time slots, with calories, macros, and exercise details. Ensure all exercises are safe given any health limitations and follow ACSM and PAR-Q+ standards.`;
const response = await genkit.call({ model: 'AI-Model_from_a _popular_provider', prompt });
try {
return JSON.parse(response.text);
} catch (e) {
console.error('JSON parse error:', e);
return null;
}
}
3. Calendar Integration for Daily Planning
Maps the generated plan onto a calendar UI, making adherence easy:
<Calendar
markedDates={
plan.days.reduce((acc, day) => {
acc[day.date] = { marked: true };
return acc;
}, {})
}
onDayPress={day => showPlanForDay(day.date)}
/>
4. Notifications for Adherence
Schedules reminders to improve consistency:
import PushNotification from 'react-native-push-notification';
PushNotification.localNotificationSchedule({
message: "Time for your workout!",
date: new Date(Date.now() + 60 * 1000) // triggers in 1 minute
});
5. Conversational Data Intake
Uses chat UI for logs:
import { GiftedChat } from 'react-native-gifted-chat';
const onSend = async newMessages => {
setMessages(prev => GiftedChat.append(prev, newMessages));
const text = newMessages[0].text;
await firestore.collection('logs').add({
userID: user.uid,
text,
timestamp: firebase.firestore.FieldValue.serverTimestamp()
});
};
6. Firebase Authentication & Data Storage
Authenticates and manages user data:
import auth from '@react-native-firebase/auth';
const signIn = async (email, pass) => {
try {
await auth().signInWithEmailAndPassword(email, pass);
} catch (err) {
console.error('Auth error:', err);
}
};
🛠️ Complex Algorithm Insights
- Factors in user biometrics, goals, and PAR-Q+ health constraints.
- Matches workouts and meals to ACSM guidelines for safety and efficacy.
- Dynamically adjusts caloric intake and workout intensity over time.
- Maps activities into time slots to produce a full-day schedule.
- Handles JSON parsing errors robustly.
🎨 UI/UX Highlights
- Clean questionnaire with progress indicators.
- Calendar view showing planned activities.
- Conversational UI for logs and progress updates.
- Visual tracking for calories, macros, and exercise history.
- Smooth navigation between daily schedules and progress charts.
🚀 Future Enhancements
-
Transition from React Native to fully native Swift (iOS) and Kotlin (Android) apps for:
- Deeper hardware integration (sensors, health APIs)
- Improved performance for animations and large data sets
- Custom native components for advanced UI/UX
-
Offline support with local caching.
-
AI-driven predictions for plateaus and injury prevention.
-
Integration with wearables for real-time biofeedback.
✅ Summary
This project aspires to build a truly intelligent personal trainer that:
- Generates safe, adaptive plans based on recognized health standards.
- Fits workouts and meals into each user's unique daily schedule.
- Engages users through conversational logging and reminders.
- Evolves toward native development for performance and precision.
All while maintaining clean architecture, strong security, and user-centric design.