Mode
Theme
Language
PTEN
← cases← Index

Maestro — the trainer in the student's pocket, and the student in charge of the workout

Applied AIDesign SystemProduct StrategyAI Engineering
42 views
see UI screens and prototypes →
Project
Maestro, my own product
Scope
Flutter app for students and trainers, AI that builds workouts and a closed beta
Role
Product designer and AI engineer
Work
Screens, design system in Figma and direction of the code written by Claude Code

A few numbers

Components in the design system
215
Tokens checked between Figma and code
148
Loose colors in code, outside the theme
0
Figma spacings bound to a token
95%
Themes, light and dark
2
Maestro — project cover

The problem

How do you make life easier for the trainer who wants to follow their students more closely? And how does someone who trains with a personal trainer bring them into the app without losing control of their own workout?

The solution

In Maestro, the student doesn't depend on the app the trainer chose: they import the workout as a PDF, or paste the text, and train on their own. Whenever they want, they invite the trainer, and the trainer can also invite the students they already have. Someone who trains can have more than one trainer. About twenty people are in the closed beta, and the app opens to the public when the beta ends.

My role

I designed and directed Maestro, from the design system in Figma to the Flutter code. The code was written by Claude Code and orchestrated by me, and the product decisions this case tells are mine.

Maestro's launch video

What the competitors didn't solve

I studied the competitors to understand what a training app needs to solve, focusing on Brazilian apps: MFIT, Tecnofit and the Smart Fit app. The main one was MFIT, which I used. Talking to other people who also used it, I landed on two interface and experience problems: how to log sets and progress, and how to watch the support videos.

Before any code, the analysis of MFIT and Tecnofit found the gap neither of them covered: the student who has a workout and stops showing up. In Maestro, the trainer has a queue of these students to message on WhatsApp.

Decision 1 of 5

The decision to take the video out of the set's way

The problem

The video showing how to do the exercise needed a place that wouldn't take the person out of the set. In the first version of Maestro, it sat in the middle of the workout screen, where it took over the screen and pushed the logging down.

The options

There were three places: the competitors' pop-up, the middle of the screen or a sheet that slides up from the bottom. The pop-up interrupted the session and left the movement too small, and the middle of the screen was what already weighed too much in the first version. The sheet costs one more tap, and in return it shows the video large and disappears when the person closes it.

What I decided

The video opens in a sheet, from the "Ver execução" (see how it's done) button. Whoever wants to see the movement taps, watches, closes and is back on the same set, and whoever doesn't need it never even sees it.

What changed

With the video out of the middle, the screen was left for logging. The current set shows up in a card, with the previous and the next one peeking at the edges, and within thumb's reach there are only the weight, the reps and the log button.

Infographic: in the first version, the video in the middle of the screen pushed the logging down; in the current version, the video opens in a sheet from the "Ver execução" button and, on closing, the person is back on the same set, with weight, reps and the log button within thumb's reach.
  • Version 1
  • Version 2
  • Version 2
In the first version, the demo took up the middle of the screen and pushed the logging to the bottom. In the current one, it becomes the "Ver execução" button, which opens the sheet with the movement, and "Fechar" (close) takes the person back to the same set.

Decision 2 of 5

Correct the set in the card itself

The problem

Whoever types 20 when it was 30 needs to correct it right away. Before, the correction lived in a Séries registradas (logged sets) sheet, with a pencil inside it, and the person had to look for the set in a list right during the rest, which is when they notice the wrong number.

The options

I thought about keeping the correction in the sheet, but it took up too much space. In the carousel, the correction fits in the card itself, with one tap, and the set gains visual impact.

I vetoed the first version of the carousel on the device, because it swapped the whole screen: the whole row slid out through one edge and another came in through the opposite one. Of the three proposals that followed, I chose the row with scale, where the neighbor is the card at 90% and grows until it reaches the center.

What I decided

The finished set comes back to the center of the carousel with a swipe back or a tap on its card, which peeks at the edge. The card shows the logged weight and reps, and the panel below, the same one used for logging, swaps "Registrar série" (log set) for "Salvar" (save) and gains a "Cancelar" (cancel). Forward, the card only peeks, because the order of the sets is the one the trainer built.

The tap is also the way in for people who use a screen reader, because VoiceOver and TalkBack capture the swipe. For them, the card announces "Série 1 feita. Corrigir" (set 1 done, correct).

Infographic of the set carousel: the finished and the next set at 90%, the current one at 100%. Swiping back brings the finished set back into the card to be corrected; forward, the card only peeks. The first version, where the whole row switched, was vetoed on the device.
During the rest, the finished set peeks at the left edge of the card: one swipe back and it returns to be corrected.
Correcting a set in the app: after logging, the finished set comes back to the card, weight and reps are corrected in the panel and "Salvar" (save) returns the card to the current set

What changed

Getting into the correction took two taps and now takes one, or a swipe. From the card to "Salvar" (save), the path went from three taps to two, and the logged sets sheet left the app.

Taps to get into the correction
2 → 1
Taps from the card to "Salvar"
3 → 2

I also decided

The weight number stays clean and large, without the white form-field box, which I tested and vetoed. Tapping the number opens the keyboard, and the ± is left for fine adjustment, in 0.5 kg steps.

Decision 3 of 5

The decision not to let the AI prescribe load in the dark

The problem

Maestro has AI on both sides: the trainer builds the student's workout with it, and the student without a personal trainer builds their own in the chat. A load suggested with no data about the person is a guess, and a high guess pushes the user above their limit.

The options

Suggesting load with no history never entered the equation: it's risky, and a beginner loses nothing without that number. What I weighed was the case with history, where the load helps if it's clear that it is a suggestion, because strength varies from one training day to the next.

What I decided

With no training history, the AI suggests no weight at all; with history, the load shows up as an explicit suggestion. Logging a set follows the same rule: the weight comes filled in with the one from the last session, with no load prediction.

What changed

No weight the app shows comes from outside the person's own training. Someone who just arrived trains with the weight they choose, and the suggestion only shows up once the app knows their training.

The conversation with the AI is capped at 20 messages every 24 hours per person. In the first measurement, the cost was US$ 0.78 over 30 days, against a ceiling of US$ 30 a month.

Messages
20 / 24 h
Cost over 30 days, 1st measurement
US$ 0.78 of 30
2.6% of the budget at the first measurement.
Infographic of the load rule: when the AI builds a workout, with no history it suggests no weight at all; with history, the load shows up as an explicit suggestion. Logging a set follows the same rule: the weight comes filled in with the one from the last session.
With no history, the AI builds the workout and leaves the load to the person: "start light and go up when the reps come out clean".

I also decided

The health rule changed after a test of mine. The old version refused the topic, and I asked for a hypertrophy workout focused on lipedema: the rule would have blocked the request coming from exactly the person who most needs a workout planned around their condition. Today the AI uses the condition as context and provides no diagnosis, medication or diet. When in doubt between refusing and adapting, it adapts.

Decision 4 of 5

Ask about limitations before the goal

The problem

In the closed beta, the feedback was good, especially about the chat. The only suggestion came from someone who built a running workout with the AI: ask about limitations first. Until then, the chat opened with the goal.

The options

The guidelines of the American College of Sports Medicine and the National Strength and Conditioning Association put health screening before the goal. The full path would be the PAR-Q, with seven questions: seven taps before the workout and health data loose in the conversation, when its place is a profile with its own consent.

What I decided

The chat started opening with a question about injury, condition or limitation, and from the PAR-Q only what protects came in. If the person mentions chest pain, fainting or shortness of breath during effort, the AI asks for a doctor's clearance and doesn't build the workout without it. It is the only exception to the rule of adapting.

What changed

Before the workout, the person answers one question instead of seven, and the case that calls for a doctor shows up in the very first answer.

Questions before the workout
7 → 1
Infographic of the chat's opening: the first question is about injury, condition or limitation. Chest pain, fainting or shortness of breath during effort lead the AI to ask for a doctor's clearance; any other answer adapts the workout. The full seven-question PAR-Q stays out of the chat.
![Maestro's AI chat open: after the introduction, the first question is whether the person has any injury, condition or limitation, with the answers "Não tenho" (I don't) and "Tenho" (I do).](/images/ui/maestro/galeria/10-ia-abertura-mockup.webp 'The chat's first question is about injury, condition or limitation, with two one-tap answers.')

The design system inside

When the first version of the app turned out heavy and dated, I rebuilt the foundation before the screens: the tokens, the theme, a round of only taking things out and, last, screen by screen.

The process video

Each Figma collection is a theme class in Flutter, like AppThemeColors or AppSpacing, and each variable is one of its fields. The raw palette stays out of the color picker, only feeding the others.

The variables in Figma: each collection is a theme class in Dart, and in AppThemeColors each field points to one primitive in light and another in dark.

Color that belongs to a single piece, like the button states, the filter, the glass and the chart colors, lives in a group inside the theme itself, because that's how the code stores it. There's no separate component collection like in my other design systems.

The measuring rule is the rule of 8. Typography moves along a scale of 12, 16, 24, 32, 40, 48, 56 and 64, in steps of eight, with a single step of four between 12 and 16. The rule applies to the font size and also to the line height: body text is 16 with a 24 line, and the number that opens the workout summary is 64 with a 64 line.

It also measures the controls. A button's height is the label's line height plus the padding above and below, and in the smallest one 24 plus 8 and 8 make 40. When the rule gets in the person's way, the exception is declared in the code: the small label is 14 with a 20 line, because at the gym, with the arm stretched out, 12 can't be read.

Accessibility is also a rule of the system, and every rule has a measure. An automated test calculates the contrast of the theme's color pairs with the WCAG formula, with a floor of 4.5:1 for text and 3:1 for icons and borders. By the same math, the focus of the floating button measured 1.35:1 in light and 1.22:1 in dark, and it was redone in the code and in Figma.

The touch target is at least 44 points, even when the drawing is smaller, and the few exceptions are declared in the code. In the set carousel, the swipe is never the only way in: the finished set can also be corrected with a tap, which the screen reader reaches.

Each component has three boards: the overview, the anatomy with the measurements and the token table. They guide the team's choices and work, steer the AI when it builds a screen and show, visually, whether design and code are moving together. The page only gets the ✅ when Figma matches the code.

The Button documentation: overview, anatomy and tokens.
  • Anatomy · measures
  • Variants × states
  • Tokens

Decision 5 of 5

The decision to give each token the same name in Figma and in code

The problem

The design system lives in two places, the Figma variables and the Dart theme, and the one who builds the screens is Claude Code, reading the code. With different names, nobody checks whether both sides still say the same thing.

The options

I considered Figma as the source of truth, which is the most common path. But I started with the code, and it was easier to bring the app into Figma, fix there what was bad and only then hand it back to the app. And the app is what the person uses and what Claude Code reads to make the next screen.

What I decided

Figma uses the literal name the token has in the Dart code, and an automated test checks that the two match. For divergences, I decided that the code wins: Figma gets corrected until it catches up with the app.

Infographic of the token: the same name, AppThemeColors/textPrimary, in Figma and in the Dart code, with an automated test in between; in a divergence, the code wins. The test checked 20 tokens the first time and checks 148 today.

What changed

The test checked 20 tokens the first time and today it checks 148. On the component pages, Figma has 1,107 spacings bound to a token and 57 loose ones. Of those, 55 are on purpose, with the reason written in the code, like the 6 between the icon and the label of the Tag, which come apart at 8.

The other 2 are an open divergence, and the test checks only the token's name, not the value. I would rather write that down than say everything matches.

Tokens checked by the test
20 → 148

What I learned and what I would do differently

  • The device decides. The first carousel only showed its flaw on the phone, where the whole row switched as if it were another screen.
  • Whoever tests sees what I didn't. A single suggestion from the closed beta changed how the AI chat opens.
  • A safety rule gets tested with a real case. The old health rule seemed prudent until it refused the lipedema workout, from exactly the person who most needs an adapted workout.

By starting with function alone, with no visual reference, I confirmed that the path I have always followed, having the references first and working on function after, is also the best one when AI enters the process.