Book Gym Classes — a Flutter app template for WooCommerce, powered by WooSignal.
WooGym turns a WooCommerce store into a class-booking app: members browse the timetable, book a class, pay with Stripe, PayPal or cash on delivery, and see their upcoming and past sessions. Gym owners get an admin dashboard listing who is booked onto each class.
Built on Nylo 7.
- Flutter >= 3.44.0
- Dart >= 3.12.0
- A WooCommerce store connected to a WooSignal app
- On the store: the WooGym plugin 1.1.0+ (class capacity and the admin participant list) and the WP JSON API plugin 5.0+ (member login), both from your WooSignal dashboard
1. Clone the project
git clone https://github.com/woosignal/flutter-gym-app.git
cd flutter-gym-app
flutter pub get2. Add your WooSignal app key
The repository ships a ready .env — you do not need to copy .env-example.
Open .env and set your app key from
woosignal.com/dashboard:
WOOSIGNAL_APP_KEY="your app key"Nylo reserves
APP_KEYfor encrypting the env file, so the WooSignal key lives underWOOSIGNAL_APP_KEY. LeaveAPP_KEYalone unless you want to rotate it withdart run nylo_framework:main make:key.
3. Build the env file
dart run nylo_framework:main make:envThis encrypts .env into lib/bootstrap/env.g.dart, which is what the app
actually reads. env.g.dart is gitignored and is not committed.
⚠️ Re-runmake:envafter every.envchange. Editing.envalone has no effect — the app boots fromenv.g.dart. Any CI job that runsflutter buildorflutter testmust runmake:envfirst.
4. Run the app
flutter runEverything below lives in .env. Re-run make:env after each change.
| Key | What it does |
|---|---|
APP_NAME |
Name shown on the landing screen |
WOOSIGNAL_APP_KEY |
Your WooSignal app key |
APP_ENV |
developing or production |
APP_DEBUG |
true to print logs (NyLogger honours this) |
ASSET_PATH |
Root of the bundled asset directory (assets) |
SHOW_SPLASH_SCREEN |
true to show the splash screen before the landing page |
APP_HERO_VIDEO |
Landing-page background video in assets/videos/ |
GYM_LOCATION |
Google Maps link for the "Location" row |
GYM_PHONE_NUMBER / GYM_EMAIL_ADDRESS |
Contact-us actions |
GYM_TYPE_OF_CLASSES |
Copy shown above the class timetable |
STRIPE_* / PAYPAL_* |
Payment gateway credentials (optional) |
Themes, storage keys, toast styles and the locale list are configured in code
under lib/config/. App icons come from assets/app_icon/appicon.png — rebuild
them with dart run flutter_launcher_icons.
APP_NAME in .env only sets the name used inside the app. The name on the
home screen and the store identifiers live in the platform projects:
| What | Where |
|---|---|
| iOS display name | ios/Runner/Info.plist → CFBundleDisplayName |
| iOS bundle id | ios/Runner.xcodeproj → Runner target → Bundle Identifier |
| Android label | android/app/src/main/AndroidManifest.xml → android:label |
| Android application id | android/app/build.gradle → applicationId |
Change the Android namespace in android/app/build.gradle to match your
application id, and move android/app/src/main/kotlin/...MainActivity.kt into
the matching package directory.
lib/
├── app/ controllers, events, models, networking, providers
├── bootstrap/ boot, decoders, events, providers, theme, helpers
├── config/ app, design, localization, storage_keys, toast_notification
├── resources/ pages, widgets, themes
└── routes/ router.dart + guards/
assets/ images, videos, json, fonts, app_icon
lang/ translations (en.json)
test/ flutter test
dart run nylo_framework:main make:env # first, so lib/bootstrap/env.g.dart exists
flutter testmake:env is required, not optional: env.g.dart is generated from your .env
and is not committed, so a fresh clone has no environment for the tests to read.
Re-run it after every .env change, and before any CI test run.
The suite runs offline and needs no device or emulator — around 300 tests in a few seconds:
flutter test # everything
flutter test test/order_payload_test.dart # one file
flutter test --coverage # writes coverage/lcov.infoWhat it covers: the models the app persists, the WooCommerce order payload, cart/coupon/tax arithmetic, class booking, the env and config classes, routing and both role guards, the checkout state actions and button locks, page and widget rendering, events, themes, translations and the payment gateway list.
How it stays offline: test/test_providers.dart boots a reduced provider list
(no WoosignalProvider, Firebase or push notifications) and test/harness.dart
installs a fake HttpClient, so nothing reaches woosignal.com, your WordPress
store or any payment provider. The woosignal and wp_json_api packages drive
their own HTTP clients, so anything that needs a real store is tested through
seeded fixtures rather than mocked responses — see test/TEST_PLAN.md.
Add your own tests as test/<area>_test.dart and start from bootTestApp() in
test/harness.dart.
- WooGym app docs — https://woosignal.com/docs/app/woogym
- Nylo 7 docs — https://nylo.dev/docs/7.x
See CHANGELOG.md.
If you discover a security issue, please email support@woosignal.com rather than opening an issue.
The MIT License (MIT). See LICENSE.