CRM for a network of martial-arts clubs
A network of clubs now brings clients back with WhatsApp funnels, sees which advertising and which trainers pay off, pays trainers automatically and takes personal-session bookings from its website. I built it as a layer on top of the software the clubs already used.
§01 The case in detail
- Task
- A network of clubs needed to bring clients back, see what advertising and each trainer actually bring, and pay trainers correctly, without replacing the booking and payment software it already used.
- What it does for the business
- WhatsApp messages for different events, to clients and to trainers. Setup is flexible: links, and personalised messages with links.
- Own tracking of mailings through a redirect, and own tracking links for advertising campaigns.
- Funnels of messages: a series that brings clients back to the club.
- Personal touches: birthday greetings, and a back-to-school greeting for clients who listed children in their profile.
- Many reports by visitor segment: how steady the client base is, growth, churn, advertising effectiveness, trainer performance in personal and group sessions.
- A card-payment terminal service is connected, and financial reports are built in different cuts.
- Trainer pay is calculated automatically by complex formulas.
- The club website shows the schedule, and visitors book personal sessions themselves; the client and the trainer both get a WhatsApp notification.
- One system for several clubs, multi-club and multi-country.
- Under the hood
- Integrations with the systems the clubs already used (bookings, payments)
- WhatsApp campaigns protected against duplicate sends (a unique key: client / club / scenario / step)
- Trainer availability windows for personal sessions
- Trainer report calculated from confirmed sessions (group, personal, rental)
- P&L from payment data and manual expenses by category
- A public API for the website with scoped keys
- Constraint
- It lives inside systems I do not own, so data and permissions are scoped per club.
- Stack
- FastAPI · Jinja + HTMX · PostgreSQL 16 · ~25 scheduled jobs in the app · queue = a Postgres table · no Redis
- Result
- Mailings, reports, trainer pay and online booking of personal sessions run in one system on top of the software the clubs already used. The P&L report is assembled automatically, and reception no longer agrees personal-session times by hand.
| Commits | 3,847 |
|---|---|
| Days with commits | 172 |
| First commit | 23.03.2026 |
| Python in app/ | ~76,800 lines |
| Templates | 17,600 lines |
| Server tests | 6,812 |
| e2e tests | 816 |
| Security commits | 37 |
| Reviews | red/blue team reports |
Architecture
Architecture as text: who passes what to whom
Bookings
- Booking system → CRM API: webhook
- Booking system → Scheduler: poll, sync
- CRM API → PostgreSQL: events, visits
Terminal payments
- Payments system → Scheduler: terminal payments
- Scheduler → PostgreSQL: payments, payroll
- Staff UI ↔ CRM API: segment reports
WhatsApp and tracking
- Scheduler → Outbox: queue: events, funnels, birthdays
- Outbox → Meta WhatsApp: template, text
- Meta WhatsApp → CRM API: statuses, inbound
- CRM API → Telegram: inbound alert
- Telegram bot ↔ Telegram: approval card, tap
- CRM API ↔ LLM: text, chat
- Meta WhatsApp → Scheduler: cost analytics
Website booking
- Club website ↔ CRM API: schedule, bookings
- CRM API → Meta WhatsApp: login code, booking notices
- CRM API → Booking system: create, cancel
Backup
- Scheduler → Telegram: encrypted dump
§02 CRM for martial arts clubs: problem, approach, outcome
- Problem
- A network of clubs needed to bring clients back, see what advertising and each trainer actually bring, and pay trainers correctly, without replacing its booking and payment software.
- Approach
- A CRM layer on top of the existing software: integrations with the booking and payment systems, WhatsApp campaigns with funnels and tracked links, reports by visitor segment, automatic trainer pay, and a website integration where visitors book personal sessions.
- Outcome
- Mailings, reports, trainer pay and online booking of personal sessions run in one system. The P&L report is assembled automatically, and reception no longer agrees personal-session times by hand.
Short answers
- Can a club CRM work with the booking and payment software the clubs already use?
- Yes. It integrates with those systems (bookings, payments) instead of replacing them, and data and permissions are scoped per club.
- What can WhatsApp campaigns do in a club CRM?
- Send messages for different events to clients and to trainers, with personalised messages and links. Funnels send a series of messages to bring clients back. There are birthday greetings and a back-to-school greeting for clients who listed children. Campaigns are protected against duplicate sends.
- How are mailings and advertising campaigns tracked?
- Mailings are tracked through the system’s own redirect, and advertising campaigns get their own tracking links.
- Is trainer payroll calculated automatically?
- Yes. Trainer pay is calculated automatically by complex formulas, and the trainer report is built from confirmed sessions (group, personal, rental).
- Which reports does it give?
- Reports by visitor segment: how steady the client base is, growth, churn, advertising effectiveness, and trainer performance in personal and group sessions. Financial reports are built in different cuts from the card-payment terminal service, plus a P&L from payment data and manual expenses.
- Can clients book personal sessions online?
- Yes. The club website shows the schedule and visitors book personal sessions themselves. The client and the trainer both get a WhatsApp notification.
See also: LLM integration into working systems Team forecasting system.
§03 Related
- Approval system for financial requestsPersonal project: rules as data, encryption, audit log
- Team forecasting systemDeterministic Monte Carlo, no LLM on the numbers
- Person dossier aggregator from official sourcesMany sources, one reviewed dossier
- LLM integration into working systemsWire a model into the POS, booking, CRM, messengers
Have a task like this? Write to me.
Send me a message
It goes straight to my Telegram. I reply to the address you leave.