Skip to content

Design Specifications

This document contains the design specifications that bridge requirements to implementations.

Database Design

dsn~datenbank-design~1

The database uses GORM ORM with the following core models: - User, Child, Location, Group for organizational structure - UserChild for parent-child relationships with validity periods - AbsenceNotification for absence reporting - ParentalLetter, Message for communication - News, Document for content distribution - Role, Permissions for authorization - Sync* tables for intranet data staging

Needs: impl, utest

Covers:

  • req~datenbank-modell~1

Dual API Architecture Design

dsn~dual-api-architektur~1

The application implements a dual-frontend architecture: - HTML routes under /:lang/... for server-rendered pages - JSON API routes under /api/v1/:lang/... for mobile/SPA clients - Content negotiation via shouldReturnJSON() helper - Same controller handlers serve both interfaces

Needs: impl, utest

Covers:

  • req~highlevel-architektur~1

Absence Notification Design

dsn~abwesenheitsmeldungen-design~1

Absence notifications are implemented via: - AbsenceNotification model with type (Illness, Vacation, Other) - Notify controller for parent submission - Employee controller for staff view - Date range support (FromDate, ToDate) - Acknowledgment tracking

Needs: impl, utest

Covers:

  • req~abwesenheitsmeldungen~1

Parental Letters Design

dsn~elternbriefe-design~1

Parental letters system includes: - ParentalLetter model with review workflow (draft, pending_review, approved, published) - ParentalLetterRead for tracking read status and responses - InteractionType field (informal, answer_possible, answer_required) - Deadline support for required responses - Location/Group scoping

Needs: impl, utest

Covers:

  • req~elternbriefe-system~1

Messages Design

dsn~nachrichten-design~1

Direct messaging system includes: - Message model linked to specific child - MessageRead for tracking read status and responses - MessageRecipients for multi-recipient support - InteractionType field for response requirements - Draft/Published workflow

Needs: impl, utest

Covers:

  • req~nachrichten-system~1

Import/Export Design

dsn~import-export-design~1

Intranet data sync is implemented via: - Staging tables (SyncPerson, SyncGroup, SyncLocation, etc.) - Bearer token authentication with IP allowlist - REST API endpoints under /api/intranet/... - SyncProcessor service for staging→app transformation - ExternalID mapping for upsert operations - SyncProcessingLog for audit trail

Needs: impl, utest

Covers:

  • req~import-export-system~1

Access Management Design

dsn~zugriffsmanagement-design~1

Parent access control includes: - UserChild.ValidFrom/ValidUntil for access periods - CanUserAccessChild() for authorization checks - LocationAccessTimes controller for admin management - Location-based scope for staff roles

Needs: impl, utest

Covers:

  • req~zugriffsmanagement~1

Authorization Design

dsn~rechtevergabe-design~1

Role-based access control includes: - Role model (Parent, Employee, GroupLead, LocationLead, Admin) - User.Roles many-to-many relationship - HasRole(), IsParent(), IsEmployee(), etc. helpers - Permissions model for fine-grained control (TODO) - Group-based staff assignment via group_teachers

Needs: impl, utest

Covers:

  • req~rechtevergabe-system~1

Document Management Design

dsn~dokumentenverwaltung-design~1

Document system includes: - Document model with title, path, validity period - BlackboardDocument for bulletin board items - CreatedBy tracking - PublishedAt/ValidUntil for visibility control

Needs: impl, utest

Covers:

  • req~dokumentenverwaltung~1