Primary Purpose
Provide a unified user experience for managing personal fitness routines, food intake, hydration, AI-driven recommendations, recovery awareness, journaling, and social accountability.
Production Documentation
This document describes the current MXCI application as implemented in the codebase: a mobile-first fitness platform with nutrition tracking, workout management, AI-assisted guidance, social engagement, subscription controls, and an admin panel.
MXCI is a mobile-first health and fitness application designed to consolidate personal workout planning, nutrition management, progress monitoring, AI-assisted coaching, and community engagement in a single system. The application is delivered as a web application and synchronized to Android and iOS through Capacitor.
Provide a unified user experience for managing personal fitness routines, food intake, hydration, AI-driven recommendations, recovery awareness, journaling, and social accountability.
Frontend in React + Vite, cloud data in Firebase Firestore, authentication in Firebase Auth, AI logic in Firebase Cloud Functions, and device capabilities through Capacitor plugins.
Individuals using the app to manage workouts, meal logs, hydration, progress, AI coaching, and social interactions.
Users with elevated tier entitlements such as higher AI quotas and ad-free or premium access depending on subscription tier.
Personnel using the admin dashboard to view users, manage suspension, adjust tiers, update subscription dates, and monitor user account state.
The client application is the orchestration layer. Firebase Authentication manages identity, Firestore persists user and community data, Cloud Functions implement privileged AI workflows, and Capacitor bridges the same web codebase to native mobile platforms.
Handles sign-in, sign-up, logout, Google OAuth, password authentication, auth timeout protection, local auth tracing, and user bootstrap caching.
Centralizes authenticated state, user settings, tier information, subscription metadata, periodic sync behavior, and cache hydration/reset workflows.
Stores BMR profile, nutrition targets, meal entries, hydration values, supplement selections, and AI-assisted food analysis and coaching conversations.
Supports date-based workout plans, AI-generated routines, exercise execution, exercise library access, recovery review, and image-based form checking.
Captures body progress photos, weight records, goals, and AI journal entries with date-oriented retrieval and review.
Provides community profile management, posts, likes, comments, privacy-controlled feeds, backup integration, and export utilities.
Standalone HTML/JS admin interface connected to Firebase for user viewing, tier management, subscription date management, AI reset, and suspension control.
Abstracts Capacitor plugins for camera, ads, push notifications, filesystem, share, haptics, and text-to-speech.
The platform uses a user-centric Firestore model. Most application data is stored under `users/{uid}` and its subcollections/documents. Community content is stored in shared top-level collections.
users/{uid}
settings/app
foodLogs/{date}
hydration/{date}
supplements/current
supplements/{date}
journal/entries
weight/entries
goals/current
workouts/{date}
prs/current
grocery/current
chat/{channel}
aiUsage/{date}
nutrition/{date}
progressPhotos/timeline
social/app
communityPosts/{postId}
communityProfiles/{uid}
adminUsers/{uid}
| Tier | Daily AI Limit |
|---|---|
| Ad | 5 |
| Ad-Free | 10 |
| Standard | 25 |
| Pro | 100 |
The application targets mobile devices where repeated route changes, duplicated token requests, aggressive listener creation, and excessive cache writes can create visible lag. The current optimization strategy reduces main-thread churn and minimizes redundant Firebase operations.
This documentation set is stored under `public/system-docs/`. When the web app is built, it becomes available as a static route. It can also be uploaded directly to any static hosting service without modification.
npm install
npm run dev
npm run build
npx cap sync
npx cap open android
npx cap open ios