Move toju-app into own its folder

This commit is contained in:
2026-03-29 23:30:37 +02:00
parent 0467a7b612
commit 8162e0444a
287 changed files with 42 additions and 34 deletions

View File

@@ -0,0 +1,31 @@
# Shared Kernel
Types and constants that are **intentionally shared** across multiple bounded
contexts (domains). Changing anything here affects every consumer, so changes
require coordination.
## Files
| File | Contents |
|---|---|
| `user.models.ts` | `User`, `UserStatus`, `UserRole`, `RoomMember` |
| `room.models.ts` | `Room`, `RoomSettings`, `RoomPermissions`, `Channel`, `ChannelType` |
| `message.models.ts` | `Message`, `Reaction`, `DELETED_MESSAGE_CONTENT` |
| `moderation.models.ts` | `BanEntry` |
| `voice-state.models.ts` | `VoiceState`, `ScreenShareState` |
| `chat-events.ts` | `ChatEventType`, `ChatEvent`, `ChatInventoryItem` |
| `media-preferences.ts` | `LatencyProfile`, `ScreenShareQuality`, quality presets |
| `signaling-contracts.ts` | `SignalingMessage`, `SignalingMessageType` |
| `attachment-contracts.ts` | `ChatAttachmentAnnouncement`, `ChatAttachmentMeta` |
## When to add here vs. in a domain
Add to shared-kernel when a type is referenced by **two or more domains** or by
**infrastructure + store**. If a type is only used inside one domain, keep it
in that domain's `domain/` folder.
## Backward compatibility
`core/models/index.ts` re-exports everything from this folder so existing
`import { X } from 'core/models'` lines keep working. **New code** should
import directly from `shared-kernel/` for clarity.