hotrungtruc/CoreX

TypeScript

0

1 commits

updated Oct 5, 2026

See the code

README

CoreX

CoreX is an AI-powered sports and nutrition platform that combines cloud-based coaching agents with privacy-conscious edge inference. It helps users understand meals, plan nutrition, evaluate body composition, generate training programs, and receive real-time movement feedback.

Product Scope

CoreX is organized around five cooperating capabilities:

  • Nutrition vision: Analyze meal images and estimate calories, macronutrients, ingredients, confidence, and nutrition guidance.
  • Diet planning: Generate meal plans from calorie, macro, dietary, and budget constraints.
  • Body composition: Calculate body-fat percentage, BMI, BMR, TDEE, calorie targets, and macros from biometric inputs.
  • Workout planning: Build structured programs for strength training, calisthenics, running, swimming, and other sports.
  • Coaching and biomechanics: Provide readiness and coaching workflows while supporting exercise-specific pose rules and real-time form feedback.

Architecture

The repository contains three primary application surfaces:

CoreX/
|-- backend/                  FastAPI service, domain modules, agents, and migrations
|-- mobile/                   React Native and Expo mobile application
|-- preview/                  Static web preview served by Nginx
|-- packages/                 Shared TypeScript packages, including biomechanics
|-- docs/                     Architecture, API, and vision system documentation
|-- scripts/                  Data, training, benchmarking, and Docker utilities
|-- docker-compose.yml        Local PostgreSQL, Redis, backend, and preview stack

The backend exposes versioned REST endpoints under /api/v1 and uses PostgreSQL for persistent application data and Redis for cache and agent memory. The application startup path initializes SQLAlchemy metadata and exposes health and OpenAPI endpoints. Model weights, datasets, image assets, and local database files are intentionally kept outside source control.

Technology Stack

AreaTechnologies
BackendPython, FastAPI, SQLAlchemy, Alembic, Pydantic
AI orchestrationSpecialized nutrition, body-composition, workout, diet, and coaching agents
Computer visionVision-language inference, food segmentation, nutrition retrieval, and pose analysis
MobileReact Native, Expo, TypeScript
Shared packagesTypeScript biomechanics engine
Data servicesPostgreSQL and Redis
Local deploymentDocker Compose and Nginx

Quick Start

Prerequisites

  • Docker Desktop with Compose support
  • Python 3.12 or a compatible supported version for local backend development
  • Node.js and npm for mobile development
  • Access to the required environment variables and model files when enabling AI inference

Run the full local stack

Create a local .env.docker file with the required application and model configuration, then run:

docker compose up -d --build

The services are available at:

Inspect or stop the stack with:

docker compose ps
docker compose down

Windows and Unix helper scripts are also available in scripts/.

Run the backend locally

cd backend
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
uvicorn app.main:app --reload

The backend expects a configured database and the environment variables documented in the application configuration. Do not commit secrets or local database files.

Run the mobile application

cd mobile
npm install
npx expo start

Open the static preview

Open preview/index.html directly in a browser, or use the Docker Compose web-preview service for the containerized version.

API Overview

The main API domains are:

  • /api/v1/auth for account registration and authentication
  • /api/v1/biometrics for body composition and metabolic calculations
  • /api/v1/nutrition for food scanning, dish retrieval, macro recalculation, and diet plans
  • /api/v1/workouts for multi-sport workout plans
  • /api/v1/pose for exercise biomechanics rules
  • /api/v1/coach for readiness, chat, and action-plan workflows

See docs/API_SPECIFICATION.md for request and response details.

Development Documentation

Repository and Data Policy

This repository contains source code, configuration, migrations, documentation, and reproducible scripts. Image files, local databases, model weights, generated binaries, and other large artifacts are excluded from Git to keep the repository portable and reviewable. Obtain private or externally hosted assets through the project setup process instead of committing them.

Before opening a pull request, verify the staged file list and confirm that no secrets, images, database files, datasets, or model artifacts are included.

hotrungtruc/CoreX

TypeScript

0

1 commits

updated Oct 5, 2026

See the code

README

CoreX

CoreX is an AI-powered sports and nutrition platform that combines cloud-based coaching agents with privacy-conscious edge inference. It helps users understand meals, plan nutrition, evaluate body composition, generate training programs, and receive real-time movement feedback.

Product Scope

CoreX is organized around five cooperating capabilities:

  • Nutrition vision: Analyze meal images and estimate calories, macronutrients, ingredients, confidence, and nutrition guidance.
  • Diet planning: Generate meal plans from calorie, macro, dietary, and budget constraints.
  • Body composition: Calculate body-fat percentage, BMI, BMR, TDEE, calorie targets, and macros from biometric inputs.
  • Workout planning: Build structured programs for strength training, calisthenics, running, swimming, and other sports.
  • Coaching and biomechanics: Provide readiness and coaching workflows while supporting exercise-specific pose rules and real-time form feedback.

Architecture

The repository contains three primary application surfaces:

CoreX/
|-- backend/                  FastAPI service, domain modules, agents, and migrations
|-- mobile/                   React Native and Expo mobile application
|-- preview/                  Static web preview served by Nginx
|-- packages/                 Shared TypeScript packages, including biomechanics
|-- docs/                     Architecture, API, and vision system documentation
|-- scripts/                  Data, training, benchmarking, and Docker utilities
|-- docker-compose.yml        Local PostgreSQL, Redis, backend, and preview stack

The backend exposes versioned REST endpoints under /api/v1 and uses PostgreSQL for persistent application data and Redis for cache and agent memory. The application startup path initializes SQLAlchemy metadata and exposes health and OpenAPI endpoints. Model weights, datasets, image assets, and local database files are intentionally kept outside source control.

Technology Stack

AreaTechnologies
BackendPython, FastAPI, SQLAlchemy, Alembic, Pydantic
AI orchestrationSpecialized nutrition, body-composition, workout, diet, and coaching agents
Computer visionVision-language inference, food segmentation, nutrition retrieval, and pose analysis
MobileReact Native, Expo, TypeScript
Shared packagesTypeScript biomechanics engine
Data servicesPostgreSQL and Redis
Local deploymentDocker Compose and Nginx

Quick Start

Prerequisites

  • Docker Desktop with Compose support
  • Python 3.12 or a compatible supported version for local backend development
  • Node.js and npm for mobile development
  • Access to the required environment variables and model files when enabling AI inference

Run the full local stack

Create a local .env.docker file with the required application and model configuration, then run:

docker compose up -d --build

The services are available at:

Inspect or stop the stack with:

docker compose ps
docker compose down

Windows and Unix helper scripts are also available in scripts/.

Run the backend locally

cd backend
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
uvicorn app.main:app --reload

The backend expects a configured database and the environment variables documented in the application configuration. Do not commit secrets or local database files.

Run the mobile application

cd mobile
npm install
npx expo start

Open the static preview

Open preview/index.html directly in a browser, or use the Docker Compose web-preview service for the containerized version.

API Overview

The main API domains are:

  • /api/v1/auth for account registration and authentication
  • /api/v1/biometrics for body composition and metabolic calculations
  • /api/v1/nutrition for food scanning, dish retrieval, macro recalculation, and diet plans
  • /api/v1/workouts for multi-sport workout plans
  • /api/v1/pose for exercise biomechanics rules
  • /api/v1/coach for readiness, chat, and action-plan workflows

See docs/API_SPECIFICATION.md for request and response details.

Development Documentation

Repository and Data Policy

This repository contains source code, configuration, migrations, documentation, and reproducible scripts. Image files, local databases, model weights, generated binaries, and other large artifacts are excluded from Git to keep the repository portable and reviewable. Obtain private or externally hosted assets through the project setup process instead of committing them.

Before opening a pull request, verify the staged file list and confirm that no secrets, images, database files, datasets, or model artifacts are included.