How it works
SportsMgnt is one web application in front of one database. The same rules serve the web pages, the installable app and the API.
The parts
Web application
Written in PHP 8.3 on the CodeIgniter 4 framework. Pages are rendered on the server and work without JavaScript; scripts only add conveniences.
Database
MariaDB stores everything in about a hundred tables. Money is stored in whole cents, times in UTC, and the database itself refuses a second booking of the same facility slot.
API
A JSON API under /api/v1 with personal access tokens, scopes and rate limits, documented by an OpenAPI 3.1 file.
Installable web app
A web app manifest and a service worker make the site installable and keep the household schedule available offline.
Modules
The code is split into a core and four modules: registration, facilities, back office and this platform site. Modules plug into shared registries for menus, permissions, seed data, the API, settings and help content, so each can be built and tested on its own.
What happens when a resident registers
- The catalog search reads published sessions and the resident's household.
- The fee engine prices each line from fee rules and splits every cent to cost centers.
- Checkout locks the session rows, checks seats and schedule conflicts, and records the signed waivers.
- The demo payment processor approves or declines a sample instrument; no card number exists anywhere.
- Enrolments, order lines, payments and balanced ledger entries are written in one transaction.
- The receipt email is stored in the Demo Outbox and the calendar updates.
The nightly reset
Every night at 3:15 AM Pacific time the demo rebuilds its sample data from a fixed seed, so every visitor starts from the same place. Walkthrough requests and the owner account are kept.
Hosting
The demo runs on a single server operated by WeldonPC, with a Let's Encrypt certificate. It makes no requests to other websites: fonts, icons and charts are served from the same server.
Documentation
The project repository includes architecture, data model, operations and deployment guides. Ask for a walkthrough to see them. Request a walkthrough