id: T048 name: SDK Improvements - gRPC クライアントの一貫性向上 goal: Create consistent gRPC client crates for each PhotonCloud service (separate crates, unified patterns) status: planned priority: P1 owner: peerA created: 2025-12-12 depends_on: [T047] blocks: [] context: | **User Direction (2025-12-12):** "SDKは統一はしないが同じような形で使えるようにはする" "一部の機能がほしいのにデカすぎるライブラリをコンパイルするのはかなり苦労する" **Approach:** - Separate crates per service (chainfire-client, flaredb-client, etc.) - Consistent API patterns across crates (same error types, builder pattern, etc.) - Small, focused crates that compile independently - No monolithic unified SDK PROJECT.md 守るべき事柄 #2: "仕様や使い方を揃えて、統一感があるようにする" acceptance: - Separate client crates: chainfire-client, flaredb-client, iam-client, etc. - Consistent error handling pattern across all crates - Consistent builder pattern for configuration - Each crate compiles independently (<30s compile time target) - Examples and documentation per crate steps: - step: S1 name: Client Pattern Design done: Define consistent patterns (error types, config builders, async traits) status: pending owner: peerA priority: P0 notes: | Design decisions: - Shared error enum pattern - Config builder pattern - Connection retry/backoff pattern - Auth integration pattern (IAM token) - step: S2 name: Base Traits Crate done: Create small shared traits crate (if needed, or inline patterns) status: pending owner: peerB priority: P1 notes: | Options: A) Shared traits crate (photocloud-client-common) B) Document patterns, each client implements independently Prefer B to avoid dependency coupling. - step: S3 name: Service Client Audit done: Review existing client implementations for consistency status: pending owner: peerB priority: P0 notes: | Check existing: - chainfire-api client code - flaredb client code - iam client code - Identify inconsistencies - step: S4 name: Client Standardization done: Apply consistent patterns to all service clients status: pending owner: peerB priority: P0 evidence: [] notes: | **Key Principle:** Small independent crates > monolithic SDK User explicitly rejected unified SDK due to compile time concerns. Focus on API consistency, not code sharing.