Back to projects

Fitston — calorie tracking and strength training in one system

A PWA for tracking calories, macronutrients and strength training, built from scratch — because no available app worked the way it should. Nutrition, periodization, a set log and data analytics in one place, with an AI model reading the user's real results.

PWANext.jsTypeScriptMongoDBAI

The problem

Available calorie-tracking apps were slow, heavy and required a permanent internet connection. Product databases were often incomplete and macronutrient tracking was clunky. Nutrition and training lived in separate apps: nobody connected what you eat with what you lift.

The solution

A minimal PWA running in the browser: fast, with an extensive product database and a full nutritional profile — from energy, through fats and carbohydrates, to 12 minerals and 14 vitamins. On top of that, a training module with periodization, a set-by-set log and daily summaries, plus AI analytics that reads the user's data and draws conclusions from it.

Architecture

Next.js on the frontend, Fastify on the backend, MongoDB as the database. Client and server exchange data through a REST API with JWT authentication. AI analysis runs server-side — the model key never reaches the client.

Client — Next.js PWA

React + TypeScript + Sass. A browser-based interface, installable on a device.

Server — Fastify

REST API with helmet, rate-limit and MongoDB data sanitization (protection against NoSQL injection). Periodization engine, training statistics and nutrition aggregations.

AI Gateway — bridge to ilit.pl

Training data analysis through the AI gateway. Service-to-service communication with a service key; user data reaches the model only on the server side.

Key features

What sets Fitston apart from a typical calorie counter.

Barcode scanner

Add products from the shelf in seconds — no manual typing.

Full nutritional profile

Over 300 products in the database, each with a full profile: energy, fats (including omega-3/6/9), fiber, proteins, 12 minerals and 14 vitamins.

Macronutrient goals

Customizable kcal, protein, fat and carbohydrate goals — broken down into grams and percentages.

Training periodization

Training cycles from ready-made presets, 1RM records, your own equipment list and cycle history. The daily plan is derived from the current phase instead of being typed in by hand.

Workout log

Exercises that expand into a list of sets: weight, reps, duration. Daily and per-workout summaries calculated automatically, with history going back in time.

AI analysis

The model reads the user's real data — intake, training volume, check-ins — and returns a summary plus correlations, for example how yesterday's calories translate into tomorrow's energy.

Check-ins

A daily rating of energy, mood, pain, sleep and stress — five dimensions the analytics turn into a picture of overall condition.

See it in action

Screenshots from production — no stock images, real screens of the system in use.

Fitston — calorie tracker app
Fitston — main dashboard
Fitston — products list
Fitston — adding a new product
Fitston — product details
Fitston — settings

Technology stack

TypeScriptNext.jsReactPWASassFastifyMongoDBChart.jsAI Gateway

Project status

300+products in the database
43exercises in the catalogue
26nutrients per product
5check-in dimensions