- README update — Logic Engine v2 operators
New operators:
gte— greater than or equalslte— less than or equalscontains— string or list contains valuestarts_with— string starts withends_with— string ends within_list— value is in a listnot_in_list— value is not in a listbetween— numeric value in range [min, max]is_true— value is boolean trueis_false— value is boolean falsenot_exists— value is null or missing
All operators work with AND/OR condition groups.
- Added
KoolbaseAppleAuth.signIn()— Sign in with Apple for React Native - Added
KoolbaseAuth.oauthLogin()— unified OAuth login method - Apple identity token verified server-side using Apple's JWKS endpoint
- Works with any Apple credential provider (bring your own apple-auth library)
import { KoolbaseAppleAuth } from 'koolbase-react-native';
const session = await KoolbaseAppleAuth.signIn(async () => {
// Use @invertase/react-native-apple-authentication or any other library
const credential = await appleAuth.performRequest({
requestedOperation: appleAuth.Operation.LOGIN,
requestedScopes: [appleAuth.Scope.EMAIL, appleAuth.Scope.FULL_NAME],
});
return credential;
});Install @invertase/react-native-apple-authentication and configure your App ID in the Apple Developer portal.
- Added
KoolbaseMessaging— push notification delivery via FCM - Added
Koolbase.messaging.registerToken({ token, platform, userId? })— register FCM device token - Added
Koolbase.messaging.send({ to, title, body, data? })— send push notification to a specific device KoolbaseConfigextended withmessagingEnabledparameter (default: true)- Device ID automatically reused from analytics stable device ID (AsyncStorage)
// After obtaining FCM token from @react-native-firebase/messaging
const fcmToken = await messaging().getToken();
await Koolbase.messaging.registerToken({
token: fcmToken,
platform: 'android', // or 'ios'
});
// Send to a specific device
await Koolbase.messaging.send({
to: deviceToken,
title: 'Your order is ready',
body: 'Pick up at counter 3',
data: { order_id: '123' },
});Add your FCM server key as a project secret named FCM_SERVER_KEY in the Koolbase dashboard.
- Updated README — added Code Push, Analytics, Logic Engine sections, clearer get started guide
- Added
KoolbaseAnalytics— event tracking with batched flush - Added
Koolbase.analytics— top-level accessor - Added
Koolbase.analytics.track(eventName, properties)— custom event tracking - Added
Koolbase.analytics.screenView(screenName, properties)— screen view tracking - Added
Koolbase.analytics.identify(userId)— attach authenticated user - Added
Koolbase.analytics.setUserProperty(key, value)— user property - Added
Koolbase.analytics.setUserProperties(map)— bulk user properties - Added
Koolbase.analytics.reset()— clear identity on logout - Added
Koolbase.analytics.flush()— manual flush - Added
Koolbase.analytics.dispose()— flush and shut down - Auto events:
app_open,screen_view,session_end - Batch flush: every 30s, on app background, on close, or at 20 events
- Anonymous by default (stable device_id via AsyncStorage), attach user_id on identify()
KoolbaseConfigextended withanalyticsEnabledandappVersionparameters
- Added
Koolbase.executeFlow(flowId, context)— evaluate named flow from active bundle - Added
KoolbaseLogicEngine— safe, deterministic flow evaluator - Supported node types:
if,sequence,event(terminal),set - Supported operators:
eq,neq,gt,lt,and,or,exists - Supported data sources:
context(app-provided),config(bundle),flags(bundle) BundlePayloadextended withflowsandscreensfields- Never throws — returns safe
FlowResulton any error
// Analytics
await Koolbase.initialize({
publicKey: 'pk_live_xxx',
baseUrl: 'https://api.koolbase.com',
appVersion: '1.0.0',
analyticsEnabled: true,
});
Koolbase.analytics.track('purchase', { value: 1200, currency: 'GHS' });
Koolbase.analytics.screenView('checkout');
Koolbase.analytics.identify(user.id);
Koolbase.analytics.setUserProperty('plan', 'pro');
// Logic Engine
const result = Koolbase.executeFlow('on_checkout_tap', { plan: user.plan });
if (result.hasEvent) navigation.navigate(result.eventName!);- Database: Offline-first support powered by AsyncStorage
- Cache-first reads — returns local data instantly, refreshes from network in background
- Optimistic writes — inserts saved locally first, synced when online
- Auto-sync on network reconnect via NetInfo
Koolbase.db.syncPendingWrites()— manually trigger syncQueryResult.isFromCacheflag — know whether data came from cache or network- Write queue with max 3 retries before dropping failed writes
- User-scoped cache — no cross-user data leakage on shared devices
PendingWritetype exported from package
- Initial release
- Auth — register, login, logout, current user
- Database — insert, query, get, update, delete, populate
- Storage — upload, download, delete
- Realtime — WebSocket subscriptions
- Functions — invoke deployed functions
- Feature flags and remote config
- Version enforcement