Skip to content

Pérdida de Grasa Avanzada

A diet calculator that does the maths for you. A web app that turns body data into calorie and macro targets, then into real meals, weekly diet plans, a shopping list and a PDF.

Client
Aarón Fernández
Year
2026
Services
Web development
Stack
Next.js, React, Payload CMS
[04]

All screenshots and videos show demo data: a seeded demo account with its own plan and example client calculators. The Pérdida de Grasa Avanzada (PDGA) brand is shown. Email sending is disabled in the demo recording. The numbers in the public calculator and in the app belong to different profiles on purpose.

Context and problem

Aarón Fernández is a fitness influencer. He had already sold a fat-loss calculator that he built himself in Google Sheets. He wanted to go further: something interactive, online, easier to use and with a sense of community: a catalog of ingredients and dishes that grows with what the users themselves add. The product is sold as a one-time payment.

A spreadsheet makes people copy formulas and add up every quantity by hand. Here the person types their data, sees their target and builds the diet from real foods, with the maths always in view.

My role

I designed, built and deployed the whole product, end to end: product and UI design, architecture, development and deployment. The client brought the problem and the reference of his spreadsheet. I turned them into screens, data and calculation rules.

Solution overview

One calculator holds a whole plan on one page, in four steps: calculate calories, distribute macros, build diets from meals, and assign the diets to the days of up to four weeks. A shopping list and a PDF come out of the same data. The public site offers a free calorie calculator that leads to the paid product.

Stack: Next.js 16 and Payload CMS on PostgreSQL; React Email for the emails; the PDF is generated in the browser.

Key features

1. Calculate your targets and macros

Paso 1 asks for sex, age, height, weight and body fat %, works out the fat-free mass and offers four activity levels by daily steps and three goals: "Perder grasa", "Mantener" and "Ganar músculo". Paso 2 calculates the "Metabolismo basal" and the "Calorías totales diarias". Protein, fat and carbs are set with sliders in grams per kilo, and the macro table shows grams, percentage and calories for each. Changes save on their own.

The main video walks through these two steps, and the screenshot in "Context and problem" shows another, finished calculator.

2. Build diets from dishes and ingredients

A plan holds several diets, for example "Día de entreno", "Día de descanso" and "Fin de semana". Each diet has meals, and each meal mixes dishes (with their ingredients) and loose ingredients. Any quantity is edited in its own row, and the row, the meal and the day update. An ingredient can also be swapped for another, one can be added to a dish, and rows can be reordered or deleted.

One search covers ingredients and dishes and ignores accents: typing "platano" finds "Plátano mediano" and the dishes that use it. A dish arrives with all its ingredients.

The totals tables compare "Total diario pautado" with "Total actual" and mark the difference with colour badges. For calories: green up to 5 %, orange up to 15 %, red above. For macros: green up to 15 %, orange up to 25 %, red above.

3. Create your own dish or ingredient

When the search finds nothing, "Crear nuevo y añadir" opens a form for a new dish or a new ingredient, and the result goes into the meal in the same step. In the video, the search "gachas" returns nothing and the dish "Gachas de avena con cacao" is created from rolled oats, unsweetened cocoa powder and one medium banana; the meal goes from 298 to 661 kcal.

An item a user creates is private to that user at first. When the admin reviews it and publishes it from the Payload panel, it joins the shared catalog and shows up in everyone's search. The catalog grows with the community's contributions and stays verified.

The ingredient form asks for a name, a unit (gr, ml or uds), a default quantity and the four values per 100 gr. The product and nutrition label images are optional.

4. From diets to weeks

Each day of the week gets a diet. The table shows, per day, calories and macros with their difference, and below it the week totals against the target. A calculator holds up to four weeks, each with its own pattern.

5. Shopping list and PDF

The shopping list comes from the plan, with nothing to type. It has three views: "Por dieta", "Por semana" and "Todo". Each ingredient appears once, in alphabetical order, with the quantity summed over all the days that use it.

The "Descargar PDF" button exports the whole plan: a cover with the personal data, the notes, the targets and the weeks, and one page per diet with its meals. The PDF is generated in the browser from the same data as the editor.

6. Manage calculators

Each account keeps its calculators in a list. A person can keep their own, and a coach can use one calculator per client: duplicate one as a starting point, rename it and open it. In the demo, the list holds "Mi definición" and three example client calculators: "Laura · Recomposición", "Marcos · Volumen" and "Carmen · Definición". To delete a calculator, the confirmation asks for its typed name.

The marketing site

The public page is a free calorie calculator. After a short calculating sequence, a dialog asks for an email and for acceptance of the privacy policy. Then the basal metabolism, the daily calorie target and the macros appear, with the button to buy the product. A sales page, /clase, explains the class and the calculator and shows the fixed one-time price.

The emails are React Email templates: the welcome email after purchase and the calculator results email, with a five-step mini guide.

Responsive

The landing and the editor adapt to phone screens: the public form and the editor, with the header actions rearranged, fit in 390 px of width.

Outcome

I delivered a complete product: a calculator editor with four steps, food search, creation of your own dishes and ingredients, diet weeks, a shopping list and PDF export; a list to manage several calculators; a free public calculator; a sales page with a one-time payment; and the email templates for the purchase and results flows.

Let's make your project a reality

Four ways to talk to me. Pick the one that suits you best and I will reply within 24 hours.

Currently accepting projects

Hours: Mon–Fri · 9:00–18:00 (Madrid time)

[01]
Budget*(select an option)