How bidrohi/seahorse works
Main Components
a. Core Components:
• Seahorse Core Engine
• String Resource Providers
• FallbackSource (Platform-specific implementations)
• LocalStore (Different storage implementations)
• NetworkSource (Remote fetching implementations)
b. Platform-Specific Implementations:
• Android Implementation
• iOS Implementation
• JVM Implementation
• Linux Implementation
• Windows Implementation
• macOS/tvOS/watchOS Implementations
┌─ Application Layer ─────────────────────────────────────┐
• Android Apps iOS Apps Desktop Apps Command Line │
• ┬──────────────────────────────┘
┌─ Seahorse Core ──────────┼──────────────────────────────┐
• ▼ │
• ┌─ String Resource Manager ─┐ │
• (Seahorse.kt) │ │
• ┬───────────┘ │
• ┌───────────▼─────────────┐ │
• StringsRepository │ │
• ┬─────────────┘ │
• ┌──────────▼───────────┐ │
• Source Providers │ │
• ┘ │
• ┘
┌─ Implementation Layer ───────────────────────────────────┐
• ┌─ Storage ─┐ ┌─ Network ─┐ ┌─ Platform ─┐ │
• SQLite │ │ Ktor │ │ Android │ │
• Realm │ │ OkHttp │ │ iOS │ │
• Memory │ └──────────┘ │ Desktop │ │
• ┘ └──────────┘ │
• ┘
Component Relationships
• Data flow between components
• Dependencies between modules
• Platform-specific implementations
• Extension points
Important Details
a. Core Interfaces:
• FallbackSource
• LocalStore
• NetworkSource
b. Implementation Options:
Storage:
• SQLite
• Realm
• In-Memory
Network:
• Ktor
• OkHttp
Platform:
• ResourceFallbackSource (Android)
• NSLocalizedFallbackSource (iOS)
• Various platform-specific implementations
Additional Elements
• Version compatibility information
• Supported platforms with their respective badges
• Optional vs. required components
Key Flows to Highlight
1. String Request Flow:
• App → Seahorse Core → Local Store → Network Source → Fallback
2. Cache Update Flow:
• Network Source → Local Store → Memory Cache
3. Platform Integration Flow:
• Platform-Specific Implementation → Core Interface
Implementation Notes
• Module names from build.gradle.kts
• Version compatibility requirements