Pro Build
A gym management platform on Next.js and Payload CMS: members, memberships, invoices, QR check-ins, reports and a tested permission matrix.
- Role
- Solo developer
- Period
- 2024 – Present
- Status
- maintained
- Stack
- Next.jsPayload CMSMongoDBTypeScriptFlutterTraefikDokployGitHub ActionsFirebase Cloud Messaging
- commits
- 417
- staff roles, one permission matrix
- 4
- unit test files for core logic
- 17
Problem
A gym's front desk needs one place for memberships, renewals, payments and attendance, with strict control over who can see member data.
Approach
A staff app on Next.js 15, Payload 3 and MongoDB. Members are a keyless collection identified by phone number and a generated member code. Staff roles (owner, manager, front desk, trainer) are enforced by one permission matrix covering collection, field and action access, with login lockout and an append-only audit log. Google Wallet passes carry a QR code that a Flutter kiosk scans over QR or NFC. eSewa payments sit behind a feature flag, FCM handles push, and a nightly job refreshes statuses and sends expiry reminders. CI runs typecheck, lint, tests and build; releases use release-please; deployment is Dokploy behind Traefik.
What I'd change
I first built it as a multi-tenant SaaS with wildcard subdomains (Traefik and Cloudflare DNS-01 certificates). Without paying tenants the complexity was not earning its keep, so in October 2026 I removed tenancy and kept a single-gym app. The lesson: validate demand before building the platform layer.