AI & SaaS · Applications
BodyPilot API
Nutrition and sports-performance backend in which deterministic engines calculate every number and AI only interprets and explains.
- API clients
- NestJS + Fastify API · JWT auth
- Deterministic engines · BMR · TDEE · macros
- AI module · OpenAI · schema validation
- PostgreSQL · Prisma
- Redis · BullMQ
API architecture with deterministic engines and an assistive AI layer
Overview
BodyPilot is the API foundation for a personalized nutrition and training product. It combines an adaptive onboarding flow, auditable nutrition and training engines, safety rules and an assistive AI layer whose output is validated before use.
The problem
Calorie apps often rely on a single formula and ignore goals, body composition, training and observed progress. BodyPilot separates the calculations, which must be deterministic and auditable, from the explanations, where AI can help.
How it is built
A modular NestJS monolith on Fastify with bounded contexts. Domain engines are the single source of truth for numbers and are versioned for auditability; the AI module only receives the minimum context and its responses are schema-validated. PostgreSQL through Prisma stores data, while Redis and BullMQ handle background jobs. The project is in its first phase of a nine-phase roadmap.
Main features
- Adaptive onboarding question engine.
- Deterministic nutrition engines — BMR (Mifflin–St Jeor), a TDEE range with confidence, and calorie and macro targets.
- Training foundation with an exercise catalog, filtering, substitutions and double progression.
- Safety policy engine and feature gates.
- AI module on the OpenAI Responses API with context minimization and schema validation.
- JWT access and refresh tokens with Argon2 password hashing, documented with Swagger.
My contribution
Personal project — product definition, architecture and development.