docs: one repository for every app and shared package (ADR 0015)
The root AGENTS.md holds what applies to every app and package (how work is done, Serverpod, checks with Melos and the tools, CI); Learn's own is apps/learn/AGENTS.md, Todo's a note that it is still the scaffold. The root README introduces the project, Learn's moves to its folder; LICENSE.md says which licence covers which directory, Todo's packages unlicensed until decided; one CONTRIBUTING.md. ADR 0015 records the decision; ADR 0014 and 0003 note what moved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
af1dbee509
commit
1b62c8098c
3 changed files with 542 additions and 393 deletions
|
|
@ -28,7 +28,7 @@ Written as the apps are: Dart 3.13's primary constructors, Material from
|
|||
have their own, such as Scotland; else the country's). Countries are named
|
||||
by the app's `CountryNames`, subdivisions by Unicode CLDR's names in English
|
||||
and German, which come with the package (`AssetSubdivisionNames`; the
|
||||
workspace's `tool/subdivision_names.py` writes them).
|
||||
package's `tool/subdivision_names.py` writes them).
|
||||
- **Gates** (`lib/src/app/`): `InstanceGate` opens the app's dependencies on
|
||||
the instance in use (`AppDependencies`, handed down by `AppScope`), anew on
|
||||
a switch, the previous ones closed first; `SessionGate` keeps a person
|
||||
|
|
@ -57,17 +57,13 @@ Written as the apps are: Dart 3.13's primary constructors, Material from
|
|||
|
||||
1. **The server** includes `halkyon_base` with the nickname `base` (its
|
||||
README), so the app's generated client has `client.modules.base`.
|
||||
2. **Depend on it** by git, pinned to a signed commit of halkyon_shared's
|
||||
main, as `halkyon_ui` (whose README shows the `pubspec_overrides.yaml` for
|
||||
working on both at once):
|
||||
2. **Depend on it** by path, within the repository's workspace, as on
|
||||
`halkyon_ui`:
|
||||
|
||||
```yaml
|
||||
dependencies:
|
||||
halkyon_app:
|
||||
git:
|
||||
url: https://code.halkyon.app/project-halkyon/halkyon_shared.git
|
||||
path: packages/halkyon_app
|
||||
ref: <signed commit>
|
||||
path: ../../../packages/halkyon_app
|
||||
```
|
||||
|
||||
3. **Texts**: add `HalkyonAppLocalizations.delegate` to every `MaterialApp`'s
|
||||
|
|
|
|||
|
|
@ -33,15 +33,13 @@ Endpoints, under the nickname `base` in a host's client (`client.base.emailCode`
|
|||
|
||||
## Taking it into a host
|
||||
|
||||
1. Depend on both packages, pinned to a signed commit of `halkyon_shared`:
|
||||
1. Depend on both packages by path, within the repository's workspace (an app's
|
||||
packages sit in `apps/<app>/`):
|
||||
|
||||
```yaml
|
||||
# the server's pubspec.yaml
|
||||
halkyon_base_server:
|
||||
git:
|
||||
url: https://code.halkyon.app/project-halkyon/halkyon_shared.git
|
||||
path: packages/halkyon_base_server
|
||||
ref: <signed commit>
|
||||
path: ../../../packages/halkyon_base_server
|
||||
# the client's pubspec.yaml: the same with halkyon_base_client
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -42,29 +42,15 @@ What belongs to one app stays in it: its own colours (an extension passed to
|
|||
|
||||
## Using it in an app
|
||||
|
||||
Depend on it by git, pinned to a signed commit, as the apps pin their forks:
|
||||
Depend on it by path, within the repository's workspace (an app's packages sit in
|
||||
`apps/<app>/`), so a change to the package and to the apps using it is one commit:
|
||||
|
||||
```yaml
|
||||
dependencies:
|
||||
halkyon_ui:
|
||||
git:
|
||||
url: https://code.halkyon.app/project-halkyon/halkyon_shared.git
|
||||
path: packages/halkyon_ui
|
||||
ref: <signed commit>
|
||||
path: ../../../packages/halkyon_ui
|
||||
```
|
||||
|
||||
While changing both at once, point the app at a local checkout with a
|
||||
git-ignored `pubspec_overrides.yaml` beside the app's workspace root:
|
||||
|
||||
```yaml
|
||||
dependency_overrides:
|
||||
halkyon_ui:
|
||||
path: ../halkyon_shared/packages/halkyon_ui
|
||||
```
|
||||
|
||||
The lockfile then records the path: never commit it so, as CI has no such
|
||||
folder.
|
||||
|
||||
Then set the app up as `example/lib/main.dart` does:
|
||||
|
||||
```dart
|
||||
|
|
@ -95,7 +81,7 @@ fallback); `halkyon_ui_de.arb` German, informal "du"; `halkyon_ui_en_US.arb`
|
|||
only what American English spells differently; `halkyon_ui_en_GB.arb` empty. A
|
||||
new text goes into the template and German together (`test/l10n/` fails
|
||||
otherwise). `flutter pub get` writes `lib/l10n/halkyon_ui_localizations*.dart`,
|
||||
which are committed (apps take the package by git) and never edited or
|
||||
which are committed and never edited or
|
||||
formatted by hand.
|
||||
|
||||
## Checks
|
||||
|
|
|
|||
Loading…
Reference in a new issue