Ludusio: A Trainer Booking App, and Who Actually Owns the Calendar

Ludusio is a two-sided trainer booking app. Trainers set their working hours and the sessions they run, and customers browse by sport and location, book a private hour or a group seat, pay, and message the trainer. Mobilions built the native mobile apps and the custom PHP server behind them. Work started in April 2021, and the app launched in June 2022.

Two customers open the same trainer's profile on a Tuesday, and both see 6 pm free. Both tap it, and both reach the payment screen. One of them is getting an apology and a refund, and the trainer loses the hour either way. The hard part was never the browsing or the card. It was deciding what a phone is allowed to promise.

Ludusio trainer booking app on iOS and Android

Ludusio at a glance

Ludusio at a glance
FactDetail
ProductTwo-sided booking marketplace for sports trainers and customers
PlatformsNative iOS and Android
Built byMobilions. Work started April 2021, launched June 2022
Roles in the appTwo, trainer and customer. Admin sees everything but is a separate console, not a third app role
BackendA custom PHP server. Availability, bookings and money all live there
ChatOurs, built on Firebase, and deliberately outside the booking server
PaymentsBraintree checkout: new card, saved card, PayPal, Google Pay
What reaches our serverA one-time payment token. Never a card number
Trainer payoutsPayPal, and only once a payout account is saved
What a trainer earnsSession price times the number of participants, minus the platform's service fee
Private session timesCome from the trainer's own schedule
Group session timesGenerated from working hours, stepped by the session length, with the private slots removed
Who decides an hour is freeThe server, at payment. The greyed out grid on the phone is a hint, not a hold
TimeStored in UTC, shown in the reader's own zone, daylight saving applied automatically
RegistrationOpen from age 12

The challenge: one hour, booked twice

A booking marketplace doesn't fail by going down. It fails when one hour gets booked twice. A trainer's calendar is shared by everyone who opens their profile, and nothing tells the others looking at it that you are about to take 6 pm. Two people can walk all the way to payment on an hour only one of them can have.

What that evening looks like. Two people pay for the same hour, and the trainer finds out when both turn up. Somebody apologises, somebody gets refunded, and both sides now know the calendar lies. That is worse than downtime, because downtime is obvious and this is not.

How sign-up, chat and location work in Ludusio

A half-finished trainer sign-up restarts at the first missing step

Trainers who quit sign-up halfway pick up exactly where they stopped. Trainer registration is long and needs approval at the end, so people close the app partway through all the time. On launch and after login, one router sends each person somewhere based on their type and account status. A trainer who stopped midway lands on phone number, then location, then experience, then sports, whichever is missing first. Trainers waiting on approval get a holding screen that watches their status and moves them to the dashboard when it changes.

Chat is ours, and it sits outside the booking server

Chat runs on Firebase, separately from bookings and payments. The two user IDs are put in a fixed order before the conversation is looked up, so it doesn't matter who wrote first: both sides land in the same thread. Unread counts climb as messages arrive, reset when the chat is opened or left, and add up to a badge on the Messages tab.

Location is a fallback chain, not a permission prompt

The app finds a customer's location without stopping to ask. It tries the last saved position first, then the one on the user's profile, then a live reading from the device. If the phone has location switched off, the app sends people to settings rather than spinning. The header shows the neighbourhood name, and tapping it lets anyone search a different city and refresh the list for it.

Engineering decisions

01 The phone greys out. The server decides.

Decision: Every time a customer picks a date, the app asks the server for that trainer's current bookings and marks the taken hours unavailable. They are greyed out and can't be tapped. The server then makes the real check again when payment goes in.

How it works: The grid you see is built from the trainer's bookings as they stood when you opened the date. Availability is checked again on the server on every booking call, before payment is taken. If the hour went while you were choosing, the booking is turned down and the reason says so. FAQ 1 covers why you need both halves.

What it costs: The grid is a snapshot, so a customer can be refused an hour the app showed as open a minute earlier. That is a worse moment than a greyed out cell, and it is the right place to put the bad news.

What it does not solve: Nothing here reserves anything. There is no hold, no queue and no first in line. Keeping the hour while someone finds their card is a different design, and its cost is abandoned holds.

02 Two kinds of session, two sources of times

Decision: Private times come from the trainer's own schedule. Group times are generated from the trainer's working hours, stepped by the length of the session, with the private slots taken out. FAQ 3 covers why one shared list fails.

How it works: The trainer sets working hours behind an availability switch, and the end time has to come after the start. Slots are generated from those hours and the session length. If the trainer changes the session length, the old selections are cleared and the slots rebuilt, so nothing stale survives the edit. The form won't save without prices, capacity and a description.

What it costs: Group slots exist only as a function of working hours and session length, so a trainer can't hand-place one awkward class outside those hours.

What it does not solve: Working hours are one set for the week rather than one per day. A trainer who finishes early on Fridays has no way to say so.

03 One checkpoint on every request, and the server's own words on the way back

Decision: Attach the user's token and the app version to every outgoing request in one place. When the server refuses something, show the message the server sent.

How it works: One checkpoint sits in front of every call, so no screen has to remember to prove who is asking, and none can forget. On a refusal, whether that is a wrong password, a declined card or a lost hour, the app reads the server's message and puts that text on screen.

Why it works: "Card declined" tells a customer what to do next. "Something went wrong" doesn't, and it sends them to support instead of to another card. Because the app version rides along, a complaint arrives already saying which build it came from.

What it does not solve: None of this helps with no connection, and a lot of real use is on a gym floor or in a park. For that, the app checks for a signal before it fires, clears the loading indicator on failure as well as on success, and hands a failed call an empty result so the screen stays usable.

Money, roles and what the server is told

Ludusio's server sees a payment token, never a card, and it pays a trainer only through a saved PayPal account.

  • Card numbers never reach us. Braintree's checkout turns a card into a one-time payment method nonce, and that token is all our server sees. FAQ 5 has the rest.
  • Payment won't start on a half-finished booking. No time or no location means no checkout, and the app names which one is missing instead of greying out the button and leaving the customer to guess. The participant counter stops at the trainer's maximum, and the total on the Book button changes the moment that number does.
  • A trainer's earnings are one sum. It is the session price times the number of participants, minus the platform's service fee, added up on the transaction screen. Withdraw appears only after a trainer saves a PayPal payout account, and withdrawing at a zero balance does nothing.
  • Two roles, and one gate that mattered. There are trainers and customers, and every request carries the user's token. The permission that took real work was trainer approval: a new trainer waits on the holding screen and can't take a booking until an admin approves them. Admins see everything. Everyone else sees only profile pages.

Engineer's notes

Notes from the build, by Dhaval Patel (Android) and Ankit Dhimmar (iOS), Mobilions.

In a booking marketplace, the calendar is the product. One double booking and both sides leave.

Taken times are greyed out when a customer picks a date, and the server makes the final check when payment goes in. If the hour has gone by then, the booking is turned down with a clear reason. The phone shows what's free. Only the server can promise it.

We'd change the availability model: give each day its own hours, and store slots as real times with a zone attached. Instead of PHP, we like to use Node.js and MongoDB.

The lesson: decide early where the truth lives. Bookings and money sat on the server and chat sat in Firebase, so a chat problem could never stop a payment.

Limitations and lessons

The calendar model is the part we would change first, and these are the four trade-offs to know before building something similar.

1. Working hours are one set for the whole week. Every day gets the same start and end, so a trainer with a short Friday either loses the hours or offers ones they don't want. Giving each day its own hours is the first thing we would change.

2. Slots were stored without a zone attached. Keeping UTC on the server, with each reader seeing their own zone, is enough for one-off bookings. Storing a slot as a real local time plus an IANA time zone identifier is the stronger model, and it's the one we would build now.

3. Changing a session length throws away a trainer's slot choices. That is on purpose, because keeping them produces overlapping sessions. But it still means a trainer redoes work after a one-field edit. A warning before the clear would have cost us an afternoon.

4. Honest errors are only as good as the server's wording. Passing the server's own refusal through to the screen was the cheapest useful thing we did, but it moved the problem rather than solving it. Every vague message on the server is now a vague message in front of a customer.

Outcome

Mobilions delivered Ludusio between April 2021 and June 2022, when the app launched. We built native trainer and customer apps on one custom PHP backend, and the availability and booking engine. The build also covered private and group sessions, Braintree checkout with PayPal payouts, and Firebase chat with notifications that open the conversation they are about. Around those sit the discovery, filtering, ratings and earnings screens. Registration was open from age 12, and every scheduling decision was made on the server. Ludusio sits alongside our other sports app development and fitness app work.

Building a marketplace where the product is somebody's diary?

Three things break: the hour two people both think is theirs, the group class coming out of the same working hours as the private sessions, and the money sitting between a booking and a session nobody has delivered yet. Book a call, and we will show you how we would model all three before anyone writes a payment call.

FAQ

Do it in two places. The app asks for the trainer's current bookings when the customer picks a date and greys out the taken hours, which removes almost every collision before anyone reaches a card. Then the server checks again when payment goes in, and refuses the booking if the hour went. The grid is a courtesy. The server call is the guarantee.

Ours doesn't, and we would ask hard questions before building one. A hold means deciding how long it lasts, what happens when the app is killed mid-checkout, and whether someone who abandons it blocks a customer who would have paid. We took the refusal at payment instead: it is rare, and honest when it happens.

Keep two sources of times. Private times come from the trainer's own schedule. Group times are generated from their working hours, stepped by the session length, with the private slots removed. Switching between the two resets the times, the price and the headcount together, so a private hour can never be sold as a group seat.

Our server kept every time in UTC, and each user saw it in their current zone, with daylight saving applied automatically. That is enough for one-off bookings. For a repeating slot, store the local wall clock time plus a zone identifier, and resolve each occurrence separately. That is the model we would build next time.

Use the provider's own checkout. Braintree handled new cards, saved cards, PayPal and Google Pay, and turned the card into a one-time payment token. That token was the only thing that reached our server. We never stored or saw a card number, and customers could still save a card for next time, because the provider held it, not us.

We put chat on Firebase and kept bookings and money on our own server, and that separation paid for itself: a chat problem could never stop a payment. The one thing to get right is conversation identity. Sort the two user IDs into a fixed order before looking the thread up, and whoever writes first, both sides land in the same conversation.

Ludusio ran from April 2021 to June 2022, launch included. What drives that timeline is not the browsing screens but the calendar: two session types, generated slots, availability checked on the server on every booking call, payouts, and a two-role sign-up with an approval gate. Tell us your session rules and we will scope from those. Our MVP development cost guide shows how we turn scope like this into a budget.

Mostly, and the calendar is the part to re-examine. What carries over is the two-role sign-up, the approval gate, server-side availability, the checkout and the payout split. What needs rework is session length, capacity and whether a provider's hours differ by day, which is where we would start.

Let them leave and come back to the exact step they missed. In Ludusio, one router checks each person's type and account status on launch and after login. A trainer who stopped midway lands on the first missing step: phone number, then location, then experience, then sports. Trainers waiting on approval see a holding screen that moves them to the dashboard as soon as an admin approves them.

Let's build your next big thing

Let's build your next big thing. Share your idea and get a free consultation. We respond within one business day.

Call Us (USA)
+1-856-524-5593

Get a Free Quote

A senior engineer replies within one business day · NDA on request · no obligation · you own the code and IP.