Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions llms.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!-- repo: clix-so/clix-flutter-sdk -->
<!-- ref: main -->
<!-- commit: bd8582f32d7042085d16f3480bedc1c0710e9a42 -->
<!-- generated_at: 2025-12-02T02:04:40Z -->
<!-- commit: ae214b076eb6c2ee24a8ed7237986ee62a9c9c8a -->
<!-- generated_at: 2026-02-13T09:23:03Z -->
# Platform: Flutter

## /
- [Readme](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/README.md): Developer-facing README providing installation, configuration, and usage guidance for the Clix Flutter SDK, including initialization via `Clix.initialize`, user management APIs, Firebase-based push notification integration, platform setup steps, error handling, and sample app references.
- [Changelog](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/CHANGELOG.md): Documents versioned SDK changes (per Keep a Changelog / SemVer), including core initialization, user management, push notification integration, device/logging features, installation requirements, and updates such as the ClixAPIClient default `User-Agent` header behavior.
- [Changelog](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/CHANGELOG.md): Changelog documenting releases 0.0.
- [License](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/LICENSE): Defines the project’s modified MIT-style license, granting standard use/modify/distribute rights while restricting all substantial use to Clix-provided services and disallowing repurposing for unrelated platforms without explicit permission.

## android/src/main/kotlin/so/clix
Expand All @@ -26,16 +26,16 @@
- [Clix Flutter](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/clix_flutter.dart): Primary library entrypoint that re-exports core Clix SDK configuration/runtime (`clix.dart`, `clix_config.

## lib/src/core
- [Clix Config.g](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_config.g.dart): Generated `json_serializable` helpers for `ClixConfig`, providing `_$ClixConfigFromJson`/`_$ClixConfigToJson` for JSON mapping, default endpoint/log level handling, extraHeaders map conversion, and enum–string mapping via `_$ClixLogLevelEnumMap`.
- [Clix Config.g](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_config.g.dart): Generated JsonSerializable helpers for ClixConfig (do not edit): provides _$ClixConfigFromJson and _$ClixConfigToJson plus ClixLogLevel enum mapping, enforcing defaults (endpoint='https://api.clix.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore complete llms summary text

This entry is now truncated mid-value (endpoint='https://api.clix.), which makes the generated llms.txt metadata inaccurate for downstream consumers that rely on these summaries for defaults and API understanding. In the previous version this description was complete, so this regression indicates the index generator is cutting content and should be fixed/regenerated to avoid propagating incorrect SDK details.

Useful? React with 👍 / 👎.

- [Clix Version](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_version.dart): Provides a lazily-resolved, cached SDK version string via `ClixVersion.version`, using `package_info_plus`’s `PackageInfo.
- [Clix](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix.dart): Central entrypoint singleton that initializes Clix services (storage, API client, device, events, notifications), manages SDK configuration and logging, and exposes public static APIs for user identity/properties, device ID, push token retrieval, and event tracking.
- [Clix](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix.dart): Singleton Clix orchestrates SDK initialization (storage, API client, token/device/event/session/notification services, persists config for background), exposes public APIs—initialize, Notification, setUserId/setUserProperties/remove..
- [Clix Notification](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_notification.dart): Manages push notifications (FirebaseMessaging) for Clix: exposes configure, requestPermission, getPermissionStatus, setPermissionGranted (syncs to server), getToken, deleteToken and handler registration (onMessage/onBackgroundMessage/onNotificationOpened/onFcmTokenError), with init gating and error logging.
- [Clix Config](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_config.dart): Defines the immutable `ClixConfig` JSON-serializable configuration model (projectId, apiKey, endpoint, logLevel, extraHeaders) used to initialize the SDK, with `toJson`/`fromJson` generated via `json_annotation` and dependent on `ClixLogLevel`.
- [Clix Config.g](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_config.g.dart): Generated `json_serializable` helpers for `ClixConfig`, providing `_$ClixConfigFromJson`/`_$ClixConfigToJson` for JSON mapping, default endpoint/log level handling, extraHeaders map conversion, and enum–string mapping via `_$ClixLogLevelEnumMap`.
- [Clix Config](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_config.dart): Immutable ClixConfig (projectId, apiKey, endpoint default 'https://api.clix.
- [Clix Config.g](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_config.g.dart): Generated JsonSerializable helpers for ClixConfig (do not edit): provides _$ClixConfigFromJson and _$ClixConfigToJson plus ClixLogLevel enum mapping, enforcing defaults (endpoint='https://api.clix.
- [Clix Version](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_version.dart): Provides a lazily-resolved, cached SDK version string via `ClixVersion.version`, using `package_info_plus`’s `PackageInfo.
- [Clix](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix.dart): Central entrypoint singleton that initializes Clix services (storage, API client, device, events, notifications), manages SDK configuration and logging, and exposes public static APIs for user identity/properties, device ID, push token retrieval, and event tracking.
- [Clix](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix.dart): Singleton Clix orchestrates SDK initialization (storage, API client, token/device/event/session/notification services, persists config for background), exposes public APIs—initialize, Notification, setUserId/setUserProperties/remove..
- [Clix Notification](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_notification.dart): ClixNotification manages push notification lifecycle and handlers in the Clix SDK—wrapping FirebaseMessaging via Clix services to request/get permissions, sync server push permission, fetch/delete FCM tokens, toggle autoHandleLandingURL, and register onMessage/onBackgroundMessage/onNotificationOpened/onFcmTokenError callbacks while logging errors.
- [Clix Config](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_config.dart): Defines the immutable `ClixConfig` JSON-serializable configuration model (projectId, apiKey, endpoint, logLevel, extraHeaders) used to initialize the SDK, with `toJson`/`fromJson` generated via `json_annotation` and dependent on `ClixLogLevel`.
- [Clix Config](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/core/clix_config.dart): Immutable ClixConfig (projectId, apiKey, endpoint default 'https://api.clix.

## lib/src/models
- [Clix Push Notification Payload](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/models/clix_push_notification_payload.dart): Defines the `ClixPushNotificationPayload` JSON-serializable model for push message metadata (IDs, URLs, custom properties), providing `fromJson`/`toJson` via `json_serializable` and value semantics where equality and hashing are based solely on `messageId`.
Expand All @@ -58,20 +58,21 @@
- [Messages.g](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/platform/messages.g.dart): Autogenerated Pigeon message definitions for the Flutter–host bridge, providing a custom `_PigeonCodec` (int handling) and the `ClixHostApi` entry point that configures the `BinaryMessenger` and channel name suffix for platform message channels.

## lib/src/services
- [Session Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/session_service.dart): SessionService implements WidgetsBindingObserver to monitor lifecycle, persists last-activity in StorageService, enforces a >=5000ms session timeout, and emits 'SESSION_START' via EventService (optionally with pending messageId); public APIs: start(), setPendingMessageId(), cleanup().
- [Clix Api Client](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/clix_api_client.dart): HTTP client wrapper that builds `/api/v1` URIs from `ClixConfig`, injects versioned common headers (project ID, API key, extra headers, User-Agent), logs requests/responses, and exposes `get`, `post`, `put`, `delete`, and `close` methods using `package:http`.
- [Token Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/token_service.dart): Manages push token lifecycle using `StorageService`, providing retrieval (`getCurrentToken`, `getPreviousTokens`), persistence with deduped/limited history (`saveToken`), conversion from byte device tokens (`convertTokenToString`), and full cleanup/reset (`clearTokens`, `reset`) with `ClixLogger` error/debug logging.
- [Event Api Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/event_api_service.dart): Provides `EventAPIService.trackEvent`, which logs, constructs the `/events` request payload (device_id, name, custom_properties, optional message_id), posts via `ClixAPIClient`, validates HTTP 2xx responses, and logs or rethrows on failure using `ClixLogger`.
- [Event Api Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/event_api_service.dart): EventAPIService provides trackEvent(deviceId,name,properties,messageId?,sourceType?
- [Device Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/device_service.dart): Manages device identity and metadata, mapping local storage, token management, and platform/app info into `ClixDevice` models and delegating to `DeviceAPIService` to register devices, bind/unbind project user IDs, and upsert/remove user properties and push tokens.
- [Notification Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/notification_service.dart): Implements `NotificationService`, a singleton that wires Firebase Cloud Messaging with flutter_local_notifications to manage permission requests, topic subscriptions, FCM token persistence/registration, Clix payload parsing, event tracking, deep-link/URL handling, and foreground/background notification display and callbacks.
- [Event Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/event_service.dart): Provides `EventService.trackEvent` to send cleaned, device-scoped analytics events via `EventAPIService`, resolving the current device ID from `DeviceService`, logging with `ClixLogger`, and rethrowing failures (typically when `Clix.
- [Notification Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/notification_service.dart): Singleton NotificationService managing FCM and flutter_local_notifications lifecycle (initialize, foreground/background handlers, token lifecycle, server registration), Clix payload parsing, event tracking, image download, URL navigation, and public APIs for init/permissions/token/topic management.
- [Event Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/event_service.dart): EventService orchestrates event tracking by fetching the current deviceId from DeviceService, sanitizing properties (drops null values), and delegating to EventAPIService.trackEvent (with name, messageId, sourceType), logging success/errors and rethrowing failures.
- [Storage Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/storage_service.dart): JSON-backed key–value storage abstraction over `SharedPreferences` that lazily initializes preferences, logs lifecycle events via `ClixLogger`, transparently migrates legacy string values, and exposes generic `set<T>`, `get<T>`, and `remove` APIs for SDK data persistence.
- [Device Api Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/device_api_service.dart): Defines `DeviceAPIService`, a wrapper around `ClixAPIClient` that logs and performs HTTP POST/DELETE calls to register devices, bind/unbind project user IDs, and upsert/remove `ClixUserProperty` values for a given device, throwing on non-2xx responses.
- [Clix Api Client](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/clix_api_client.dart): HTTP client wrapper that builds `/api/v1` URIs from `ClixConfig`, injects versioned common headers (project ID, API key, extra headers, User-Agent), logs requests/responses, and exposes `get`, `post`, `put`, `delete`, and `close` methods using `package:http`.
- [Token Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/token_service.dart): Manages push token lifecycle using `StorageService`, providing retrieval (`getCurrentToken`, `getPreviousTokens`), persistence with deduped/limited history (`saveToken`), conversion from byte device tokens (`convertTokenToString`), and full cleanup/reset (`clearTokens`, `reset`) with `ClixLogger` error/debug logging.
- [Event Api Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/event_api_service.dart): Provides `EventAPIService.trackEvent`, which logs, constructs the `/events` request payload (device_id, name, custom_properties, optional message_id), posts via `ClixAPIClient`, validates HTTP 2xx responses, and logs or rethrows on failure using `ClixLogger`.
- [Event Api Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/event_api_service.dart): EventAPIService provides trackEvent(deviceId,name,properties,messageId?,sourceType?
- [Device Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/device_service.dart): Manages device identity and metadata, mapping local storage, token management, and platform/app info into `ClixDevice` models and delegating to `DeviceAPIService` to register devices, bind/unbind project user IDs, and upsert/remove user properties and push tokens.
- [Notification Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/notification_service.dart): Implements `NotificationService`, a singleton that wires Firebase Cloud Messaging with flutter_local_notifications to manage permission requests, topic subscriptions, FCM token persistence/registration, Clix payload parsing, event tracking, deep-link/URL handling, and foreground/background notification display and callbacks.
- [Event Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/event_service.dart): Provides `EventService.trackEvent` to send cleaned, device-scoped analytics events via `EventAPIService`, resolving the current device ID from `DeviceService`, logging with `ClixLogger`, and rethrowing failures (typically when `Clix.
- [Notification Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/notification_service.dart): Singleton NotificationService managing FCM and flutter_local_notifications lifecycle (initialize, foreground/background handlers, token lifecycle, server registration), Clix payload parsing, event tracking, image download, URL navigation, and public APIs for init/permissions/token/topic management.
- [Event Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/event_service.dart): EventService orchestrates event tracking by fetching the current deviceId from DeviceService, sanitizing properties (drops null values), and delegating to EventAPIService.trackEvent (with name, messageId, sourceType), logging success/errors and rethrowing failures.
- [Storage Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/storage_service.dart): JSON-backed key–value storage abstraction over `SharedPreferences` that lazily initializes preferences, logs lifecycle events via `ClixLogger`, transparently migrates legacy string values, and exposes generic `set<T>`, `get<T>`, and `remove` APIs for SDK data persistence.
- [Device Api Service](https://raw.githubusercontent.com/clix-so/clix-flutter-sdk/main/lib/src/services/device_api_service.dart): Defines `DeviceAPIService`, a wrapper around `ClixAPIClient` that logs and performs HTTP POST/DELETE calls to register devices, bind/unbind project user IDs, and upsert/remove `ClixUserProperty` values for a given device, throwing on non-2xx responses.

Expand Down