feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
import 'package:halkyon_base_server/base.dart';
|
|
|
|
|
import 'package:halkyon_todo_server/src/generated/serverpod.dart';
|
|
|
|
|
import 'package:halkyon_todo_server/src/pruning.dart';
|
|
|
|
|
import 'package:halkyon_todo_server/src/todo_base.dart';
|
2026-10-19 20:08:27 +02:00
|
|
|
import 'package:serverpod_auth_idp_server/core.dart';
|
|
|
|
|
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
/// The starting point of Halkyon Todo's server.
|
|
|
|
|
Future<void> run(List<String> args) async {
|
|
|
|
|
// The generated Serverpod is already connected with the generated code.
|
2026-10-19 20:08:27 +02:00
|
|
|
final pod = Serverpod(args);
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
// What every Halkyon server has (ADR 0014): sign-in, the account and its
|
2026-10-19 23:10:08 +02:00
|
|
|
// deletion, the pruning, the instance's basics, set up for Todo; a member
|
|
|
|
|
// of the instance's register where the operator names one (ADR 0016).
|
|
|
|
|
HalkyonBase.configure(
|
|
|
|
|
pod,
|
|
|
|
|
todoBase(accounts: AccountsMode.fromEnvironment()),
|
|
|
|
|
);
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
// Token managers validate and issue authentication keys; identity
|
|
|
|
|
// providers are the ways people can sign in (halkyon_base's
|
|
|
|
|
// auth_config.dart).
|
2026-10-19 20:08:27 +02:00
|
|
|
pod.initializeAuthServices(
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
tokenManagerBuilders: tokenManagerBuilders,
|
|
|
|
|
identityProviderBuilders: identityProviderBuilders(pod),
|
2026-10-19 20:08:27 +02:00
|
|
|
);
|
|
|
|
|
|
2026-10-19 23:10:08 +02:00
|
|
|
// The calls between the instance's services, on the web server
|
|
|
|
|
// (ADR 0016); Caddy never forwards them.
|
|
|
|
|
addInstanceRoutes(pod);
|
|
|
|
|
|
2026-10-19 20:08:27 +02:00
|
|
|
await pod.start();
|
feat(todo): the server on halkyon_base
Todo's server includes halkyon_base (ADR 0014), configured for Todo:
its basics say it serves `todo`, sign-in mails name Halkyon Todo, the
source is this repository, minimumAppBuild 1. Authentication through
the module (anonymous, GitHub, email codes, server-side sessions) in
place of the scaffold's email-and-password provider; the module's
pruning scheduled once however often the server starts. The scaffold's
greeting, its Flutter web hosting, cloud storage and Docker files go;
session logs are never persisted. Todo was never deployed, so its
migrations start again with one initial migration. The root's lints
apply, with the four constructor rules off as on Learn's server.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-10-19 21:56:12 +02:00
|
|
|
|
|
|
|
|
await schedulePruning(pod);
|
2026-10-19 20:08:27 +02:00
|
|
|
}
|