buoyient-service
How to create and register new SyncableObjectService implementations using the buoyient offline-first sync library. Use this skill whenever the user wants to add a new data type or service to an app that uses buoyient, create a syncable model, build CRUD operations with offline support, set up background sync for a new entity, or integrate a new API endpoint with buoyient's sync engine. Also trigger when the user mentions SyncableObject, SyncableObjectService, ServerProcessingConfig, or asks about offline-first data patterns in a Kotlin/Android context.
- License 许可
- Apache-2.0
- 最近更新
- 2026-05-23
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- buoyient-service
- description
- How to create and register new SyncableObjectService implementations using the buoyient offline-first sync library. Use this skill whenever the user wants to add a new data type or service to an app that uses buoyient, create a syncable model, build CRUD operations with offline support, set up background sync for a new entity, or integrate a new API endpoint with buoyient's sync engine. Also trigger when the user mentions SyncableObject, SyncableObjectService, ServerProcessingConfig, or asks about offline-first data patterns in a Kotlin/Android context.
03 SKILL.md 正文
Use docs/creating-a-service.md as the authoritative service-building guide, and the project-level context file (CLAUDE.md / CODEX.md) for shared project conventions.
Key points to remember:
- Data models must be
@Serializabledata classes implementingSyncableObject<O>withwithSyncStatus()and@Transient syncStatus. - Services extend
SyncableObjectService<O, T>whereT : ServiceRequestTag. The constructor takes aKSerializer<O>(not a manual deserializer). - Service-level configuration classes (
ServerProcessingConfig,SyncFetchConfig,SyncUpConfig,SyncUpResult,ConnectivityChecker,EncryptionProvider,PendingRequestQueueStrategy,SyncableObjectRebaseHandler) are in thecom.elvdev.buoyient.serviceconfigspackage. - Data types used when interacting with
SyncableObjectService(HttpRequest,SyncableObjectServiceResponse,SyncableObjectServiceRequestState,GetResponse,CreateRequestBuilder,UpdateRequestBuilder,VoidRequestBuilder,ResponseUnpacker,SquashRequestMerger) are in thecom.elvdev.buoyient.datatypespackage. - Every operation (
create,update,void) requires aServiceRequestTagand uses functional interfaces:CreateRequestBuilder,UpdateRequestBuilder,VoidRequestBuilder,ResponseUnpacker. SyncUpConfig.fromResponseBody(requestTag, responseBody)returnsSyncUpResult<O>:Success(data),Failed.Retry(re-queue), orFailed.RemovePendingRequest(drop from queue).ServerProcessingConfig.serviceHeadersprovides per-service HTTP headers. For auth headers shared across all services, useBuoyient.globalHeaderProvider(aGlobalHeaderProviderlambda evaluated per-request, incom.elvdev.buoyient.globalconfigs).getAllFromLocalStore(limit)retrieves all items from the local database.LocalStoreManageraccepts an optionalqueueStrategy:Queue(default) stores every operation separately;Squashcollapses consecutive offline edits into one request. UseSquashfor PUT/replace APIs where intermediate states don't matter. Seedocs/creating-a-service.md§ "Pending request queue strategy".SyncableObjectcompanion constants use_KEYsuffix:SERVER_ID_KEY,CLIENT_ID_KEY,VERSION_KEY.
04 同仓库更多 Skills
buoyient-setup
暂无简介
buoyient-service
暂无简介
buoyient-mock-mode
暂无简介
buoyient-integration-testing
暂无简介
buoyient-setup
How to set up and install the buoyient offline-first sync library in an Android app. Use this skill when the user wants to add buoyient to their project, configure dependencies, set up initialization, register services for background sync, or integrate buoyient into an existing Android app. Also trigger when the user mentions adding buoyient as a dependency, setting up offline sync, configuring WorkManager for sync, or asks about BuoyientInitializer, Buoyient.registerServices, or SyncWorker setup.
buoyient-mock-mode
How to set up local mock mode for manual testing of apps that use buoyient, so the app runs against fake server responses without a real backend. Use this skill when the user wants to run their app with mock data, set up a developer toggle for fake/real server, create a local testing mode, build a demo mode, configure mock responses at runtime, or test the app manually without a backend. Also trigger when the user mentions mock mode, fake server, demo mode, local testing mode, or developer toggle in the context of buoyient or SyncableObjectService.