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

Flutter≥ 3.0.0
Dart≥ 3.0.0
iOS≥ 13.0
AndroidAPI 21+
Webany modern browser

Install the SDK

Add the Koolbase SDK to your pubspec.yaml:

pubspec.yaml
YAML
dependencies:
  flutter:
    sdk: flutter
  koolbase_flutter: ^12.60.0

Or install via the command line:

flutter pub add koolbase_flutter

Then fetch dependencies:

flutter pub get

What's Included

The koolbase_flutter package includes the full platform in one dependency:

Koolbase.authRegister, login, sessions, OAuth (Google + Apple), and phone + OTP
Koolbase.dbJSONB collections, CRUD, access rules, realtime, populate, semantic search (auto-embed via Gemini or OpenAI), and offline cache
Koolbase.storageFile upload, download, and delete via Cloudflare R2
Koolbase.realtimeWebSocket subscriptions for live data updates
Koolbase.functionsInvoke and deploy serverless functions (Deno + Dart runtimes)
Koolbase.isEnabledFeature flags with percentage rollouts and targeting
Koolbase.configString / configInt / …Remote config values updated without app releases
Koolbase.checkVersionForce or soft-prompt users to update the app
Koolbase.analyticsEvents, screen views, DAU/WAU/MAU, funnels, and retention
Koolbase.messagingFCM push notifications — register tokens, receive, and handle
Koolbase.codePushCode push — config + flag overrides, directives, SDUI, and mandatory updates, no store release
KoolbaseAuthGate / KoolbaseCollectionListBehavioral widgets — auth branching and stale-while-revalidate lists, correct by construction (v10.3.0+)

Android Setup

Add internet permission to your AndroidManifest.xml:

android/app/src/main/AndroidManifest.xml
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/app/build.gradle
Groovy
android {
    defaultConfig {
        minSdkVersion 21
        ...
    }
}

Web Setup

The SDK runs in the browser from 12.0.0. Two steps, once:

terminal
Bash
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 subscriptions
shared_preferencesLocal caching of flags and config
flutter_secure_storageDefault secure session storage (pluggable)
package_info_plusApp version detection for version enforcement
cryptoRollout bucketing and bundle signature verification
driftOffline-first SQLite cache
connectivity_plusAuto-sync of queued writes on network reconnect
firebase_messagingFCM cloud messaging

Verify Installation

Confirm the SDK was installed correctly:

flutter pub deps | grep koolbase_flutter

You should see koolbase_flutter 12.60.0 (or newer) in the output.