Miandar at Block 23: nothing is counted until the coach decides
Block 23 is a private home gym. Its classes, session packages and money run on Miandar میاندار, a phone-first web app built by Optiflow with one side for the coach and one for the athlete.
Talk about your operationSee the screens
- Where it runs
- Block 23, a private home gym
- Used by
- Coach and athletes
- Interface there
- Persian, right to left, Jalali calendar
- Built with
- React, TypeScript, Postgres
Try the rule: an evening class
Awaiting the coach’s decision
- Sara M.2 sessions leftNothing counted yet
- Ali A.7 sessions leftNothing counted yet
- Mina S.5 sessions leftNothing counted yet
- Behrad S.6 sessions leftNothing counted yet
- Parisa N.3 sessions leftNothing counted yet
- Nima H.4 sessions leftNothing counted yet
Tap a mark to change it, then decide. Until then no session is deducted.
A simplified model with invented members. It follows the app’s attendance rules.
What problem does Miandar solve for a small gym?
Miandar is built for gyms that run on spreadsheets, chat groups, paper and memory. There, sessions are deducted wrongly or not at all, promised make-ups are forgotten, snack-bar tabs go missing and transfers claimed in chat are hard to match. One record for the class, the athlete and the money replaces that.
The class is the unit of work. Once the coach says what happened, session counts, notices to athletes and renewal reminders follow from that one decision.
When does Miandar deduct a session?
Only when a coach closes the class. Everyone starts as present and the coach marks the exceptions. Athletes who attended use one session. Anyone marked absent, or unable to make it, keeps theirs. A cancelled class uses none, and the coach chooses whether everyone gets a make-up session. Nothing is charged automatically.
| What the coach records | Session used | Make-up session |
|---|---|---|
| Present, or left unmarked | One | None |
| Absent | None | None |
| Can’t make it | None | Given by default; the coach can withhold it |
| Class cancelled | None, for anyone | One each, unless the coach chooses none |
A class that has run but has no decision stays on a list, with a badge and a notification for the coach, and can be decided up to 30 days back. Attendance can still be corrected afterwards: the session goes back to its package or is taken again.
What do the coach and athlete screens look like?
These are real screens of the app in its English edition, filled with fictional demo data. Block 23 uses the Persian interface, and no member of the gym appears here.

Coach Today’s class 
Coach A class still open 
Coach Ending the class 
Coach Cancelling a class 
Coach Prepared messages 
Athlete Today 
Athlete Wallet 
Athlete Logging a result 
Gym TV Today’s workout
What changed during the build?
Two things were built and then taken back. An overnight job that deducted sessions was removed after real-world testing, so only a coach’s decision counts a class. Athlete self-service cancellation and make-up booking were switched off by default, leaving attendance in the coach’s hands.
The overnight charge went away
Before: a nightly sweep deducted sessions. Now: a class stays open until a coach decides it, and the app keeps asking.
Attendance moved to one pair of hands
Before: athletes could cancel and book make-ups themselves. Now: the coach records absences and make-ups, and athletes see the result.
Late payment sorts itself out
An athlete who trains without a covering package shows as an uncovered visit. When a package is sold later, those visits are counted against it, oldest first.
What do the coach and the athlete each get?
The coach runs classes, workouts, members, payments and messages from a phone. The athlete sees the day’s workout with weights worked out from personal records, logs results, buys packages and snack-bar items from a wallet, and keeps a body-analysis history. Results and body data stay between athlete and coach.
Coach side
- One-tap attendance, walk-in guests and class cancelling
- Workout designer with AMRAP, For Time, EMOM and strength formats, three difficulty levels and per-athlete changes
- Session packages, discounts, payment approvals and a finance report
- Prepared reminders that open in WhatsApp for one-tap sending
- A gym TV screen showing the day’s workout
Athlete side
- Today’s class, sessions left, make-ups and wallet balance
- Target weights from personal one-rep maximums, and records saved from logged results
- Snack bar, shop and bookable services paid from the wallet
- Body-analysis history, including reading an InBody PDF report on the phone
- Gym rules to read and accept, and notices in the app
How do payments work without a payment gateway?
Each athlete has one wallet. A top-up is a card-to-card transfer: the athlete enters the last four digits of the paying card, and the head coach confirms it. Packages, snack-bar items, shop orders and services are then deducted from the wallet, and every movement leaves a ledger line that is never edited.
- TransferThe athlete pays by bank card
- ConfirmThe head coach matches the four digits
- WalletOne balance per athlete
- LedgerEvery purchase and refund keeps its line
The balance can go below zero, within a limit the club may set, and shows in red with a minus sign. Money and booking actions carry a one-off key, so a double tap or a retry is not charged twice.
How is Miandar built and hosted?
It is a phone-first web app written in React and TypeScript, with Postgres and a single server function behind it. Block 23 runs it on its own server. The browser talks only to the app’s own address, with no third-party scripts, fonts or analytics. Backups are encrypted, and a restore test checks they can be read back.
- It installs to the home screen, and its shell loads from cache on a weak connection.
- Sign-in is by mobile number and PIN, with limits on repeated wrong attempts.
- Athletes see only their own data. A coach who rents class times sees only their own athletes and money.
- The server checks every rule again, so the screen on the phone is never the authority.
What does this case study leave out?
- No usage figures, revenue or time-saved numbers are published.
- The screens and the model above use invented people and amounts, not Block 23’s records.
- Reminders are prepared by the app and sent by a person. There is no SMS, web push or online payment gateway.
- Miandar is a web app, not a native Android or iOS app.
Questions about Miandar
Can athletes cancel a class themselves?
Not in the current setup. Self-service cancellation and make-up booking were built and then switched off by default, so the coach records absences and make-up sessions.
What happens if the coach forgets to close a class?
Nothing is deducted. The class stays on the list of classes awaiting a decision, with a badge and a notification, and the coach can decide it up to 30 days back.
Does Miandar send messages on its own?
No. It works out who needs which reminder and writes the message. A coach opens it in WhatsApp, or copies it, and sends it.
Could the same approach work outside a gym?
The pattern is a record that changes only on a named person’s decision, with one ledger behind it. Optiflow builds that kind of internal tool for other operations.
Related work and reading
- PadelYar case studyCourt booking, sign-in and a club console for a padel club.
- Custom dashboard and internal tools developmentOne source of truth with role-based access.
- Vibe coding development servicesHow Optiflow builds with AI coding agents under senior review.
- Why your automation keeps breaking at 3amIdempotency, retries and checks at the boundaries.
Does your operation still wait on someone’s memory?
Tell us where the counting happens today. Scope and price are agreed for each project before any code is written.
Schedule a callInternal tools and dashboards
Or show our email.