01 Marketplace · Payments · Mobile

Kayn Fitness

  • Elixir
  • Phoenix
  • Ash
  • Oban
  • GraphQL
  • React Native
  • Postgres
  • Cloudflare

A pay-per-session fitness network for Morocco. Members buy tokens and book a gym, pool, pilates studio, padel court or spa from one balance — no subscription. Venues open their empty slots and get paid for every check-in.

Visit the site

Two sides, one system

Members

Buy a token pack, find a venue by sport or location, book a slot, and scan a QR pass at the door. Tokens leave the balance only on an actual visit.

Venues

Set their own rate, open the off-peak hours they choose, manage sessions and capacity, and receive one aggregated payout a month.

What made it hard

  1. 01

    Two products, one system

    A marketplace is not one app. Members and venues have opposite needs, but they share bookings, capacity, and money — so the same rules have to hold on both sides at once.

  2. 02

    Money that cannot go missing

    Tokens are prepaid value. A booking that fails after a balance is debited, or a check-in counted twice, is a customer who paid for nothing and a venue paid for a visit that never happened.

  3. 03

    Capacity is a race

    A class with eight places gets more than eight people tapping book at once. Overselling a slot means turning someone away at the door for a session they already paid for.

  4. 04

    The door is the worst place to fail

    Check-in happens on a phone, at a venue, on whatever connection exists there. It has to work in a basement gym with no signal as reliably as it does on Wi-Fi.

How we built it

01

Booking and balance in one transaction

Debiting tokens and reserving a place happen together or not at all. There is no window where a member has been charged but holds no booking.

02

Capacity enforced at the database

The seat limit is held where the data is, not in application code hoping two requests do not arrive together — so a full session is full even under a simultaneous rush.

03

Payouts built from an auditable ledger

Every check-in is a recorded event. A venue's monthly payout is derived from those records rather than a running total, so a disputed amount can be traced to the visits behind it.

04

Rules declared once, enforced everywhere

Who may cancel, what a slot costs, when a refund applies — defined in the domain layer, so the mobile app, the venue dashboard, and the API cannot disagree.

Yours could be next.

Tell us what you are building and what it cannot afford to get wrong. We will tell you honestly whether we are the right team for it.

Start a project hello@elixiria.ma
enfrar