Move toju-app into own its folder
This commit is contained in:
31
toju-app/src/app/shared-kernel/README.md
Normal file
31
toju-app/src/app/shared-kernel/README.md
Normal 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.
|
||||
Reference in New Issue
Block a user