AndroidPoet / cloudflare-kmp
PublicKotlin Multiplatform SDK and Worker gateway for Cloudflare D1, KV, R2, and realtime apps
Cloudflare KMP is a Kotlin library that helps mobile app developers connect their Android, iOS, or web apps to Cloudflare's backend services (databases, storage, and file management). Instead of exposing sensitive credentials directly in the app, developers use a lightweight 'Worker gateway' that runs on Cloudflare's servers. The SDK provides simple, type-safe methods for querying databases, storing key-value data, handling file uploads/downloads, and even real-time communication. It's designed to be modular so developers only include the features they need.
How It Works
A mobile developer learns about Cloudflare KMP as a way to safely connect their app to Cloudflare's powerful backend services without exposing sensitive credentials.
The developer adds the Cloudflare KMP library to their app, choosing only the pieces they needβdatabases, storage, or all of it.
With just a Worker URL and a publishable key, the developer sets up a client that keeps all the sensitive stuff safely hidden on the server.
Query, add, update, and delete records in your D1 database using a familiar table-based approach.
Store and retrieve text or JSON data in KV namespaces with simple get and put operations.
Generate signed URLs for uploading and downloading files from R2 buckets.
Every operation returns a result object that makes it easy to handle both success and failure cases with clean, readable code.
Your mobile app now has safe, fast access to Cloudflare's backend services, with all the sensitive credentials staying safely on your server.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.