The member app is a standard Flutter project located in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ManiFed/TTN/llms.txt
Use this file to discover all available pages before exploring further.
app/ directory of the repository. It talks exclusively to the cloud server’s member API (/api/v1/*) and requires no direct connection to telescope nodes. To run it locally you need Flutter installed and the cloud server running — everything else is handled by flutter pub get and a single dart-define.
Prerequisites
- Flutter SDK ≥ 3.27 — installation guide
- Cloud server running — the app has no offline mode; it reads live data from the backend
- Dart SDK ≥ 3.6 (bundled with Flutter)
- For iOS builds: macOS with Xcode installed
- For Android builds: Android Studio or the Android SDK command-line tools
The
app/ directory ships with only the Dart source — no android/ or ios/ platform
folders are committed to the repository. Run flutter create . inside app/ once after
cloning to generate those folders before running on a device.Quick Start
Start the cloud server
In a separate terminal, start the cloud API on port 8800. The app will not load data without it.
Generate platform folders (first time only)
If you have never run the app before, generate the Android and iOS platform folders in place. This keeps
lib/ and pubspec.yaml intact.Run the app against your local cloud
Pass the API base URL as a
dart-define. Use localhost for the iOS/Android simulator or the web renderer. For a physical device on the same LAN, substitute your computer’s LAN IP address.Android requires cleartext HTTP to be allowed for local testing. Use HTTPS in production
or add a
network_security_config.xml to the Android manifest for development.API Base URL Configuration
The app resolves its API base URL inapp/lib/config.dart using the following priority order:
| Scenario | How to set the URL |
|---|---|
| Local development | --dart-define=API_BASE=http://localhost:8800 |
| Local dev (legacy alias) | --dart-define=BS_API_BASE=http://localhost:8800 |
| Web build (same-origin) | No flag needed — derives from Uri.base.origin |
| Production native build | No flag needed — falls back to https://api.thetelescope.net |
/api/v1 by the constant AppConfig.apiPrefix in the same file.
Web Build
The web build is a standard Flutter web output suitable for serving as a PWA from any static file server or CDN. It is also included automatically in Railway deployments viascripts/deploy-api.sh.
iOS Build
iOS builds require macOS and Xcode. The platform folder is atapp/ios/.
Native iOS Experiment
An experimental SwiftUI shell lives atapp/ios-native/BoundlessSkies.xcodeproj. It is a parallel native implementation that explores deeper platform integration for haptics, TTS accessibility, and native iOS navigation patterns. This is separate from the main Flutter app and does not replace it.
Android Build
Firebase Push Notifications
Push notifications use Firebase Cloud Messaging. The Firebase configuration lives inapp/lib/firebase_options.dart and is loaded during app startup in main.dart:
- Create a Firebase project at console.firebase.google.com
- Add iOS and Android apps to the project
- Download
google-services.json(Android) andGoogleService-Info.plist(iOS) - Run
flutterfire configureto regenerateapp/lib/firebase_options.dart - Place the platform files in
app/android/app/andapp/ios/Runner/respectively
App Architecture
The app follows a provider-based state architecture. The key files are:API Client
app/lib/api/api_client.dart wraps every member-authenticated cloud endpoint. All methods return typed Dart objects and throw ApiException on non-2xx responses. A status code of 401 signals an expired token; AppState.handleAuthError() catches this and signs the member out.
Auth Store
app/lib/api/auth_store.dart persists the bearer token using shared_preferences. The token is loaded during AppState.bootstrap() at startup, which resolves the _AuthGate to either LoginScreen or HomeScreen.
Deployment
Production deployments are handled by Railway viascripts/deploy-api.sh, which builds the Flutter web output and includes it in the cloud server deploy. GitHub Actions workflows watch the app/ and cloud/ directories and trigger deploys on push to main.
To point the deployed app at the production API:
dart-define is required — AppConfig falls back to https://api.thetelescope.net when running on a device.