halkyon/apps/meditate/halkyon_meditate_server/lib/src/meditate_base.dart

75 lines
3.8 KiB
Dart
Raw Normal View History

import 'package:halkyon_base_server/base.dart';
import 'package:halkyon_meditate_server/src/meditate_data.dart';
/// Where this project's source is published, which the instance names
/// unless its operator sets `SOURCE_URL`. Both licences require offering it
/// to the people who use the instance (AGPL-3.0-or-later for the app,
/// SSPL-1.0 for the server).
const upstreamSourceCodeUrl =
'https://code.halkyon.app/project-halkyon/halkyon';
/// The oldest build of the app this server works with (the number after `+`
/// in the app's version); apps below it are asked to update. Raise it in the
/// commit that breaks older apps, to the build of the first that works again.
const minimumAppBuild = 1;
/// How Halkyon Meditate sets halkyon_base up (ADR 0014), the module giving every
/// Halkyon server its sign-in, the account and its deletion, the pruning and
/// the instance's basics: the instance says it serves `meditate` (the app accepts
/// only such an instance; never change it), sign-in mails name the app, and
/// the instance names this project's source. A person's sittings and keys go
/// with them ([deleteMeditateData]). It holds the instance's
/// register, or is a member of the one [accounts] names (ADR 0016; the
/// server reads it from the operator's environment, `ACCOUNT_REGISTER_URL`).
/// The server sets it up before it starts (`server.dart`), and so do its
/// tests.
HalkyonBase meditateBase({AccountsMode accounts = const HoldsRegister()}) =>
HalkyonBase(
app: 'meditate',
appName: 'Halkyon Meditate',
upstreamSourceCodeUrl: upstreamSourceCodeUrl,
minimumAppBuild: minimumAppBuild,
deletePersonData: const [deleteMeditateData],
accounts: accounts,
privacyPagePoints: _privacyPagePoints,
);
/// What the instance's privacy page says of Meditate's data (ADR 0038, D7,
/// D14, D15), where Meditate's server serves the page: what is sealed, and
/// what a dream spoken passes through. Change it with what Meditate keeps
/// or sends.
const List<PrivacyPagePoint> _privacyPagePoints = [
(
english:
'On Halkyon Meditate, your settings, the sittings you keep and the '
'dreams you write down are encrypted on your devices with your key: '
'the instance sees how many there are, their size and when they '
'changed, never what they hold. A device that can’t encrypt keeps '
'none.',
german:
'In Halkyon Meditate werden deine Einstellungen, die Sitzungen, die '
'du aufbewahrst, und die Träume, die du aufschreibst, auf deinen '
'Geräten mit deinem Schlüssel verschlüsselt: Die Instanz sieht, wie '
'viele es sind, wie groß sie sind und wann sie sich änderten, nie, '
'was sie enthalten. Ein Gerät, das nicht verschlüsseln kann, bewahrt '
'keine auf.',
),
(
english:
'A dream you speak is written by your device’s own speech '
'recognition. On Android, Meditate asks for recognition on the '
'device, which Android 12 and later offer where the language is '
'installed; otherwise Android’s recogniser may send the sound to '
'Google or the phone’s maker. Apple’s and Windows’ recognisers decide '
'for themselves whether the sound leaves the device. It never reaches '
'the instance.',
german:
'Einen Traum, den du erzählst, schreibt die Spracherkennung deines '
'Geräts auf. Unter Android bittet Meditate um Erkennung auf dem '
'Gerät, die Android ab Version 12 bietet, wo die Sprache installiert '
'ist; sonst kann Androids Spracherkennung den Ton an Google oder den '
'Hersteller des Telefons senden. Die Spracherkennung von Apple und '
'Windows entscheidet selbst, ob der Ton das Gerät verlässt. Bei der '
'Instanz kommt er nie an.',
),
];