Quick Start
Get Koolbase running in an app you are writing yourself, in under 5 minutes. Pick your platform.
Rather not write the code? Start from a prompt
Choose your platform
Get your API key
Log in to your Koolbase dashboard, create a project, then create an environment. Copy the public API key:
pk_live_6e4abe2ffba691e8e44093d9Environments
Install the SDK
Add the Koolbase SDK to your pubspec.yaml:
dependencies:
flutter:
sdk: flutter
koolbase_flutter: ^12.60.0Or install via CLI:
flutter pub add koolbase_flutterInitialize the SDK
Call Koolbase.initialize() before runApp():
import 'package:flutter/material.dart';
import 'package:koolbase_flutter/koolbase_flutter.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Koolbase.initialize(const KoolbaseConfig(
publicKey: 'pk_live_your_key_here',
baseUrl: 'https://api.koolbase.com',
));
runApp(const MyApp());
}Register and login users
// Register: signed in at once, unless the project
// asks for a verified email first.
final result = await Koolbase.auth.signUp(
email: '[email protected]',
password: 'securepassword',
);
if (result.verificationRequired) {
// ask them to verify, then sign in
}
// Sign in
final user = await Koolbase.auth.login(
email: '[email protected]',
password: 'securepassword',
);
// The signed-in user, or null
final me = Koolbase.auth.currentUser;
// Logout
await Koolbase.auth.logout();Store and query data
// Insert — optimistic write, syncs when online
await Koolbase.db.insert(
collection: 'posts',
data: {'title': 'Hello Koolbase', 'published': true},
);
// Query — cache-first, returns instantly
final result = await Koolbase.db
.collection('posts')
.where('published', isEqualTo: true)
.limit(20)
.get();
if (result.isFromCache) {
debugPrint('Served from local cache');
}
// Fetch related records in one query
final withAuthors = await Koolbase.db
.collection('posts')
.populate(['author_id:users'])
.get();
// Update / delete a single record by id
await Koolbase.db.doc(id).update({'title': 'Updated'});
await Koolbase.db.doc(id).delete();
// Manually sync pending offline writes
await Koolbase.db.syncPendingWrites();Offline-first
Upload files
// Upload
await Koolbase.storage.upload(
bucket: 'avatars',
path: 'user_${userId}.jpg',
file: file,
);
// Get download URL
final url = await Koolbase.storage.getDownloadUrl(
bucket: 'avatars',
path: 'user_${userId}.jpg',
);Feature flags and remote config
// Feature flag
if (Koolbase.isEnabled('new_checkout')) {
// show new checkout UI
}
// Remote config
final timeout = Koolbase.configInt('timeout_seconds', fallback: 30);
final apiUrl = Koolbase.configString('api_url', fallback: 'https://api.myapp.com');
final darkMode = Koolbase.configBool('force_dark_mode', fallback: false);Swift, Kotlin or a server? Every SDK call is a plain HTTPS request — see the API Reference.
What's next
Designer
Refine your app, run it, deploy or export it
Authentication
Email verification, OAuth, password reset
Database
Access rules, realtime subscriptions, queries
Semantic Search
Auto-embed records via Gemini or OpenAI, query by meaning
Functions
Deploy serverless functions in TypeScript or Dart
Feature Flags
Rollout percentages, kill switches, targeting