apps/train with halkyon_train_server, _client and _flutter, as Todo's: halkyon_base configured by trainBase(), its own register alone and a member of the instance's where the operator names one, the app on halkyon_app's gates with Train's frame, account sheet and About, texts in British English and German that speak of workouts, app.halkyon.train on Android, iOS, Linux, macOS and Windows. Where it differs from Todo: development ports of its own (8180 to 8190), so it runs beside Learn's server; one initial migration with the schema Todo's migrations end at (the same tables, compared line by line), not Todo's seventeen; and Todo's icon as a placeholder until the icon tool of ADR 0031 draws Train's bike. The workspace, the licences, the READMEs and AGENTS.md name it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
33 lines
1.3 KiB
Dart
33 lines
1.3 KiB
Dart
import 'package:halkyon_base_server/base.dart';
|
|
import 'package:halkyon_train_server/src/generated/serverpod.dart';
|
|
import 'package:halkyon_train_server/src/pruning.dart';
|
|
import 'package:halkyon_train_server/src/train_base.dart';
|
|
import 'package:serverpod_auth_idp_server/core.dart';
|
|
|
|
/// The starting point of Halkyon Train's server.
|
|
Future<void> run(List<String> args) async {
|
|
// The generated Serverpod is already connected with the generated code.
|
|
final pod = Serverpod(args);
|
|
// What every Halkyon server has (ADR 0014): sign-in, the account and its
|
|
// deletion, the pruning, the instance's basics, set up for Train; a member
|
|
// of the instance's register where the operator names one (ADR 0016).
|
|
HalkyonBase.configure(
|
|
pod,
|
|
trainBase(accounts: AccountsMode.fromEnvironment()),
|
|
);
|
|
// Token managers validate and issue authentication keys; identity
|
|
// providers are the ways people can sign in (halkyon_base's
|
|
// auth_config.dart).
|
|
pod.initializeAuthServices(
|
|
tokenManagerBuilders: tokenManagerBuilders,
|
|
identityProviderBuilders: identityProviderBuilders(pod),
|
|
);
|
|
|
|
// The calls between the instance's services, on the web server
|
|
// (ADR 0016); Caddy never forwards them.
|
|
addInstanceRoutes(pod);
|
|
|
|
await pod.start();
|
|
|
|
await schedulePruning(pod);
|
|
}
|