Legko: Building a Recovery Fitness Platform in Eight Months

Legko

You’ve probably heard of BetterHelp, a service for sessions with therapists. Legko works on the same principle but helps you take care of your body. The founder came to FANS with an idea and a team of trainers: in a week, we put together a working prototype out of off-the-shelf services, and then, over eight months, we built and launched a full-fledged platform. Here’s what came out of it.

Launching Before Development Started

On the Legko platform, a person can train with a trainer online to recover from a serious injury, such as a fracture, faster and without complications.

Building a platform without knowing whether the service will be in demand is a bad strategy. So even before development started, we put together a working prototype based on off-the-shelf tools: Yandex 360 for booking appointments, WhatsApp for messaging with clients, and Kontur.Talk for online meetings.

Самат Галимов
Alexander Popov
Founder of Legko

«Before development started, the FANS team built us a quick solution in WhatsApp so we could monitor how trainers work with clients. It fully covered our needs at that early stage and let us test the business model.»

Интерфейс компонентов
A flowchart of how the prototype works: it’s important to make sure everyone understands the task the same way

The Platform

After launching the working prototype, we started developing the full-fledged platform. We wrote the backend in Django and the frontend in Nuxt and JavaScript. We launched the service in a cloud that complies with local personal data law and allows storing personal medical data.

Интерфейс компонентов
Platform architecture

Client Dashboard

Вебиум-Страница курсаВебиум-Страница курса

One of the platform’s key sections is the client dashboard. First, a new user goes through onboarding: they fill out a questionnaire about their condition and the results they want. Sharing medical data requires an e-signature, implemented with a one-time code. After onboarding, the patient can choose a trainer and book their first session.

Plus, the dashboard has everything for convenient work on recovery: a list of scheduled sessions, recovery progress, homework assignments, a chat with the trainer, and the option to attach lab results.

Trainer Dashboard

Вебиум-Страница курса

In their dashboard, the trainer keeps something like an electronic medical record for each client. It lists that client’s goals: for example, recovering from a broken arm and improving hip joint mobility. For each goal, the trainer tracks progress, adds notes, and gives recommendations.

The key tools in a trainer’s work are assessment sheets, which we developed together with Legko’s specialists to help track recovery progress. They’re designed so that trainers don’t have to deal with unnecessary paperwork, while the data can still be used to evaluate the recovery work.

Calendar

Вебиум-Страница курсаВебиум-Страница курса

The calendar turned out to be one of the most complex features of the project. That might sound strange: a calendar seems like a simple thing built into every device out there. In reality, it raises a whole lot of questions.

  • Time zone sync: if a client in Kaliningrad schedules a session for 8:00 PM, for a trainer in Kamchatka it’s 6:00 AM the next day.
  • Each hourly slot pulls data from three sources: the recurring weekly schedule, one-off changes (say, the trainer took a day off), and the appointments actually booked. For every slot to show the correct status, the calendar has to correctly process data from all three sources.
  • The calendar has to know the current time to dim past events and send reminders on schedule. On top of that, a trainer might travel to another city, and the app needs to catch the time zone change.
  • Additional features: drag-and-drop for moving events; day, week, and month views; and color coding for events.

To avoid developing the calendar forever, we focused on a single use case: a trainer needs to see their week, with free and booked slots, and to quickly add and cancel appointments. To make that work, we invested as much as possible in the hard part — time zone math and state resolution.

The component that correctly resolves events took about 500 lines of Vue code. A lot of time went into testing situations where the trainer and the client are in different parts of the country and time zones have to be matched correctly.

Chat

Вебиум-Страница курсаВебиум-Страница курса

The app has a chat where trainers and clients can talk. The hardest part of building it was maintaining the WebSocket connection — a two-way communication channel that delivers messages correctly and quickly. Building a component like that from scratch takes a long time and costs a lot, so we used the open-source Centrifugo and kept only the data storage on our backend.

Transferring Video Recordings

Training session recordings are stored on an external service and periodically need to be pulled into our own storage. Periodic tasks like this are usually handled with Celery, but it’s a poor fit for large files, so we went with rclone.

It turned out rclone can’t be fully relied on: the service can restart, the task gets lost, and you never find out. So we reworked the module and released the result publicly — now everything is visible, no workarounds needed.

Accepting Payments

Payments at Legko go through an agency model: the patient pays the platform, and the platform distributes the money among the trainers. Taxes are calculated only on the platform’s commission rather than the full amount — that’s exactly how major services — ride-hailing services, for example — work with independent contractors.

The platform also uses a deferred payment model: the money is charged only when the session starts.

Results

The platform is live, with 12 trainers currently working with clients. Legko plans to develop two more areas: fitness and doctor consultations on lab results.

Самат Галимов
Alexander Popov
Founder of Legko

«Since the project deals with recovery fitness, plenty of legal nuances affecting the technical implementation came up along the way. And the FANS team always thought through the details with the lawyers.

FANS also organized the development process well and kept it structured and fast-moving despite the frequently changing requirements. They didn’t just complete tasks — they ran them through the filter of their own experience and suggested the best solutions, both in terms of time spent and the effectiveness of the end result.»

Why It Worked

bullet

We shaped the product vision together with the client.

At the start, the founder had only a general idea of how the platform should work.

bullet

We got the business processes running before development started.

We assembled a business process for the client out of off-the-shelf tools to test the hypothesis right away.

bullet

We focused on a single use case when building the calendar.

That lets us deliver a working tool quickly instead of stretching development out over months.

bullet

We worked with the client as one team.

We dug into the business side and looked for the best ways to implement things rather than just checking off tasks from the spec.

Команда

FANS

Fedor Borshev,
Samat Galimov

technical directors

Alexey Chudin

architector

Nikolay Kiryanov

Vyacheslav Nabatchikov

backend developer

Mihail Burmistrov

frontend lead

Vladimir Taranovsky

frontend developer

Alexander Prihodko

project manager

MateÇa

Kirill Tarelkin

design director

Olga Pisareva

art director

Alexander Galyanov

Maria Makarenko

designers

Polina Kruchina

design project manager

Legko

Alexander Popov

founder

Dmitriy Stepin

product lead

Ksenia Molot

consultant

Marina Golyshkova

project coordinator

Sergei Rodionov

research director
Order a similar project for yourself!