[E7.S5-2] Common Module - Shared Data Models (DTOs) #44

Closed
opened 2025-06-03 03:56:06 +00:00 by rwachters · 0 comments
rwachters commented 2025-06-03 03:56:06 +00:00 (Migrated from github.com)

Description

As a developer, I will implement the core data transfer objects (DTOs) that are shared between the app (frontend) and server (backend) modules. These models will include fields to support v1.1 features like message threading (parentMessageId, childrenMessageIds) and session grouping (groupId).

Acceptance Criteria

  • Implement ChatSession.kt model
  • Implement ChatSessionSummary.kt model
  • Implement ChatMessage.kt with sealed class and subclasses
  • Implement ChatGroup.kt model
  • Implement LLMModel.kt enum or data class
  • Implement ModelSettings.kt configuration class
  • Ensure all models include proper threading support (parent/child relationships)
  • Ensure all models include appropriate session grouping support
  • Unit tests for model validations and relationships

Implementation Details

This PR introduces the shared data models that will be used throughout the application. These DTOs define the core domain objects and their relationships:

  • ChatSession: Represents a complete conversation with metadata
  • ChatSessionSummary: Lightweight version of session data for listing views
  • ChatMessage: Sealed class hierarchy for different message types
  • ChatGroup: For organizing sessions into logical groups
  • LLMModel: Available LLM models and their capabilities
  • ModelSettings: Configuration options for LLM interactions

All models will be placed in the common module at the path common/src/main/kotlin/eu/torvian/chatbot/common/models/

Dependencies

  • PR #42 (Initial Multi-Module Project Setup) must be completed first

Parent User Story

Parent: #41 [E7.S5] Implement Layered Architecture

Foundation for Stories

This PR provides the foundation for:

  • E1.S1, E1.S4, E1.S5 (Chat Session Management)
  • E2.S1, E2.S3, E2.S4 (Message Threading)
  • E6.S1, E6.S2, E6.S3, E6.S4 (Session Organization)
  • Epic 4 (Model Selection)
  • Epic 5 (Settings & Configuration)
## Description As a developer, I will implement the core data transfer objects (DTOs) that are shared between the `app` (frontend) and `server` (backend) modules. These models will include fields to support v1.1 features like message threading (`parentMessageId`, `childrenMessageIds`) and session grouping (`groupId`). ## Acceptance Criteria - [ ] Implement `ChatSession.kt` model - [ ] Implement `ChatSessionSummary.kt` model - [ ] Implement `ChatMessage.kt` with sealed class and subclasses - [ ] Implement `ChatGroup.kt` model - [ ] Implement `LLMModel.kt` enum or data class - [ ] Implement `ModelSettings.kt` configuration class - [ ] Ensure all models include proper threading support (parent/child relationships) - [ ] Ensure all models include appropriate session grouping support - [ ] Unit tests for model validations and relationships ## Implementation Details This PR introduces the shared data models that will be used throughout the application. These DTOs define the core domain objects and their relationships: - `ChatSession`: Represents a complete conversation with metadata - `ChatSessionSummary`: Lightweight version of session data for listing views - `ChatMessage`: Sealed class hierarchy for different message types - `ChatGroup`: For organizing sessions into logical groups - `LLMModel`: Available LLM models and their capabilities - `ModelSettings`: Configuration options for LLM interactions All models will be placed in the `common` module at the path `common/src/main/kotlin/eu/torvian/chatbot/common/models/` ## Dependencies - PR #42 (Initial Multi-Module Project Setup) must be completed first ## Parent User Story Parent: #41 [E7.S5] Implement Layered Architecture ## Foundation for Stories This PR provides the foundation for: - E1.S1, E1.S4, E1.S5 (Chat Session Management) - E2.S1, E2.S3, E2.S4 (Message Threading) - E6.S1, E6.S2, E6.S3, E6.S4 (Session Organization) - Epic 4 (Model Selection) - Epic 5 (Settings & Configuration)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Torvian.eu/chatbot#44
No description provided.