Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Read by SonarCloud Automatic Analysis (there is no scanner step in CI).
#
# Duplication detection only -- these files are still analysed for issues:
# - buddy-api.ts is generated from docs/backend/openapi/buddy.json (`task docs:openapi`);
# - the en/da translation dictionaries mirror each other's keys by design (da is typed against en).
sonar.cpd.exclusions=src/frontend/buddy/src/app/core/api/buddy-api.ts,src/frontend/buddy/src/app/core/i18n/translations/**
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ in real time.
- [x] Private iCal subscription link with the pickups and drop-offs a guardian is assigned to,
across all their children, with a reminder before each timed slot (see
[Pickup iCal feed](docs/backend/analysis/pickup-ical-feed.md))
- [x] Night duty: a fixed (1–4 week) schedule of who is responsible for a child at night, with
per-night overrides, switches and free-text notes such as a weekly screen night, shown on
the printed week plan and as a "Tonight" card for the child

### Child

Expand Down
2 changes: 2 additions & 0 deletions docs/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Backend documentation for the Buddy API.
- [Pickups flow](pickups/flow.md)
- [Babysitters flow](babysitters/flow.md)
- [Work locations flow](work-locations/flow.md)
- [Night duty flow](night-duty/flow.md)
- [Print templates flow](print-templates/flow.md)
- [Task Library flow](task-library/flow.md)
- [Progress flow](progress/flow.md)
Expand Down Expand Up @@ -84,6 +85,7 @@ model or permissions logic.
- [Skipping single occurrences](analysis/skip-occurrences.md)
- [Publishing Docker images on GitHub](analysis/publish-docker-images.md)
- [SBOM generation for builds](analysis/sbom-generation.md)
- [Night duty](analysis/night-duty.md)

## Current focus areas

Expand Down
4 changes: 4 additions & 0 deletions docs/backend/analysis/aggregate-roots.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ flowchart TB
PickupSchedule["PickupSchedule\nPickupScheduleId(Guid)"]
PickupFeed["PickupFeed\nPickupFeedId(Guid)"]
WorkLocationSchedule["WorkLocationSchedule\nWorkLocationScheduleId(Guid)"]
NightSchedule["NightSchedule\nNightScheduleId(Guid)"]
BabysitterList["BabysitterList\nBabysitterListId(Guid)"]
PrintTemplate["PrintTemplate\nPrintTemplateId(Guid)"]
TaskTemplate["TaskTemplate\nTaskTemplateId(Guid)"]
Expand Down Expand Up @@ -74,6 +75,8 @@ flowchart TB
PickupFeed -- "guardianId (stored, equals stream id)" --> User
BabysitterList -- "guardianId (stored, equals stream id)" --> User
WorkLocationSchedule -- "guardianId (stored, equals stream id)" --> User
NightSchedule -- "childId (stored, equals stream id); nights' guardianId / modifiedBy" --> User
NightSchedule -- "nights: babysitterId (on guardianId's list)" --> BabysitterList
PrintTemplate -- "owner (user or group); rows reference children, groups, calendars, work locations" --> User
PrintTemplate -- "owner group" --> Group
TaskTemplate -- "createdBy / lastModifiedBy" --> User
Expand Down Expand Up @@ -131,6 +134,7 @@ flowchart TB
| PickupFeed | `Features/Pickups/Types/PickupFeed.cs` | `PickupFeedId(Guid)`, equal to the guardian's `UserId` | `guardianId` → User (the feed reads that guardian's children's PickupSchedules through active GuardianLinks) |
| BabysitterList | `Features/Babysitters/Types/BabysitterList.cs` | `BabysitterListId(Guid)`, equal to the guardian's `UserId` | `guardianId` → User |
| WorkLocationSchedule | `Features/WorkLocations/Types/WorkLocationSchedule.cs` | `WorkLocationScheduleId(Guid)`, equal to the guardian's `UserId` | `guardianId` → User |
| NightSchedule | `Features/NightDuty/Types/NightSchedule.cs` | `NightScheduleId(Guid)`, equal to the child's `UserId` | `childId` → User; pattern days' and overrides' `guardianId` → User; a babysitter entry's `babysitterId` → a BabysitterList entry; events' `modifiedBy` → User |
| PrintTemplate | `Features/PrintTemplates/Types/PrintTemplate.cs` | `PrintTemplateId(Guid)` | `owner` → User or Group; rows' `childId` / `guardianId` / `assignedToId` → User, `mealGroupId` → Group, `calendarIds` → Calendar, `workLocationId` → a WorkLocationSchedule location (references only, never access grants) |
| TaskTemplate | `Features/TaskLibrary/Types/TaskTemplate.cs` | `TaskTemplateId(Guid)` | `createdBy` / `lastModifiedBy` → User; owning `childId` lives in `TaskTemplateIndexDocument`, not the aggregate itself |
| ChildProgress | `Features/Progress/Types/ChildProgress.cs` | `ProgressId(Guid)`, equal to the child's `UserId` | `childId` → User; `awardedOccurrences` → CalendarItem (computed reference, not a foreign-key relationship) |
Expand Down
8 changes: 8 additions & 0 deletions docs/backend/analysis/domain-model-diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ classDiagram
+DateOverrides Overrides
}

class NightSchedule {
+NightScheduleId Id
+UserId ChildId
+NightPattern[] Patterns
+DateOverrides Overrides
}

class BabysitterList {
+BabysitterListId Id
+UserId GuardianId
Expand Down Expand Up @@ -232,6 +239,7 @@ classDiagram
MedicineEffectLog --> User : childId
MedicineEffectLog ..> MedicineSchedule : regimen
PickupSchedule --> User : childId, assignments
NightSchedule --> User : childId, nights
PickupFeed --> User : guardianId
WorkLocationSchedule --> User : guardianId
BabysitterList --> User : guardianId
Expand Down
5 changes: 3 additions & 2 deletions docs/backend/analysis/event-stream-snapshots.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Event-Stream Snapshots

Status: Implemented for all 28 event-sourced aggregates across all 18 modules (the 28th,
`PickupFeed`, came with docs/backend/analysis/pickup-ical-feed.md). Questions 1-5
Status: Implemented for all 29 event-sourced aggregates across all 19 modules (the 28th,
`PickupFeed`, came with docs/backend/analysis/pickup-ical-feed.md, the 29th, `NightSchedule`, with
docs/backend/analysis/night-duty.md). Questions 1-5
below are resolved with what was actually built, including several real Marten/serialization
constraints hit along the way that the original plan only flagged as possibilities — plus two
more found during the full rollout (a `ValueTuple`-keyed dictionary/set gotcha, and a
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading