Installation
Add Koolbase to an app you are writing yourself — in Flutter, React Native (Expo) or the browser. One package, one initialize call, and the whole platform is there.
Building with the Designer? There is nothing to install. An app built from a prompt or in the Designer already includes the SDK in every project it exports.
Before you start
Create a free account at app.koolbase.com, create a project, and copy its public key from Environments. Each environment — production, staging, development — has its own.
Choose your platform
Requirements
Install the SDK
Add the Koolbase SDK to your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
koolbase_flutter: ^12.60.0Or install via the command line:
flutter pub add koolbase_flutterThen fetch dependencies:
flutter pub getWhat's Included
The koolbase_flutter package includes the full platform in one dependency:
Koolbase.authRegister, login, sessions, OAuth (Google + Apple), and phone + OTPKoolbase.dbJSONB collections, CRUD, access rules, realtime, populate, semantic search (auto-embed via Gemini or OpenAI), and offline cacheKoolbase.storageFile upload, download, and delete via Cloudflare R2Koolbase.realtimeWebSocket subscriptions for live data updatesKoolbase.functionsInvoke and deploy serverless functions (Deno + Dart runtimes)Koolbase.isEnabledFeature flags with percentage rollouts and targetingKoolbase.configString / configInt / …Remote config values updated without app releasesKoolbase.checkVersionForce or soft-prompt users to update the appKoolbase.analyticsEvents, screen views, DAU/WAU/MAU, funnels, and retentionKoolbase.messagingFCM push notifications — register tokens, receive, and handleKoolbase.codePushCode push — config + flag overrides, directives, SDUI, and mandatory updates, no store releaseKoolbaseAuthGate / KoolbaseCollectionListBehavioral widgets — auth branching and stale-while-revalidate lists, correct by construction (v10.3.0+)Android Setup
Add internet permission to your AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
...
</manifest>Ensure your minSdkVersion is at least 21:
android {
defaultConfig {
minSdkVersion 21
...
}
}Web Setup
The SDK runs in the browser from 12.0.0. Two steps, once:
flutter create . --platforms web
flutter run -d chrome --web-port 8080 --dart-define=KOOLBASE_PUBLIC_KEY=pk_live_...Then add the origin your app is served from — http://localhost:8080 in development, your domain in production — to your project's Trusted Origins. Without it the browser refuses every request to the API.
Code push and offline sync are not available on the web; auth, database, storage, realtime and functions are. Check Koolbase.isCodePushAvailable rather than branching on kIsWeb.
iOS Setup
No additional configuration required for the core SDK. Koolbase works out of the box on iOS 13+. Ensure your deployment target is set to iOS 13.0 or higher in Xcode.
Internal Dependencies
The Koolbase SDK manages these dependencies automatically:
httpDefault API transport (injectable — swap in your own client)web_socket_channelRealtime WebSocket subscriptionsshared_preferencesLocal caching of flags and configflutter_secure_storageDefault secure session storage (pluggable)package_info_plusApp version detection for version enforcementcryptoRollout bucketing and bundle signature verificationdriftOffline-first SQLite cacheconnectivity_plusAuto-sync of queued writes on network reconnectfirebase_messagingFCM cloud messagingVerify Installation
Confirm the SDK was installed correctly:
flutter pub deps | grep koolbase_flutterYou should see koolbase_flutter 12.60.0 (or newer) in the output.