SDK Architecture Overview
The Azeoo SDK uses a single entry point and a two-step lifecycle: initialize (with API key and options), then connect (with user ID and token). Native and Flutter apps talk to the Dart core via Pigeon-generated APIs; you never deal with method channels or engine setup directly.
High-level flowβ
Two-step lifecycleβ
- Initialize β Call the SDK with your API key and optional configuration (locale, theme, safe area, deep links, analytics, offline). No user is attached yet.
- Connect β Call
connect(userId, token)to attach a user. After this, you can use the nutrition and training modules and the user/theme/navigation APIs.
Until you call connect, the UI modules and user-dependent APIs are not available.
Core surface (what you use)β
- AzeooSDK (or platform equivalent) β The single entry point. You call
init/initializeonce, thenconnectwhen the user is known. - User β
AzeooSDK.user(orsdk.user) for profile and user operations. - Theme β
AzeooSDK.themefor theme mode and colors. - Navigation β
AzeooSDK.navigationfor programmatic navigation and deep links. - Modules β
AzeooSDK.modules.nutritionandAzeooSDK.modules.training(on Flutter:AzeooSDK.nutritionandAzeooSDK.training) for embedding views and opening screens (e.g. showDiary, showPlans, getFragment, getViewController).
Under the hood, the Dart side uses AzeooClient, AzeooUI, and AzeooUser; these are not part of the public init sequence you implement.
Module structureβ
Nutrition moduleβ
- Embedding: Get a view/fragment/controller (e.g.
modules.nutrition.getFragment(),getViewController(), or FlutterAzeooSDKContent). - Navigation: showDiary, showPlans, showPlan, showRecipes, showScanner, showSearch, showCart, showAddSelection, etc.
- Data: getDiary, searchFoods, getPlansData, getShoppingList, and related APIs where exposed.
Training moduleβ
- Embedding: Same pattern as nutrition (getFragment, getView, getViewController).
- Navigation: showWorkouts, showPlans, showExercises, showProgress, showSchedule, etc.
- Data: getWorkouts, getExercises, getPlansData, getProgress, and related APIs where exposed.
Service layer (internal)β
The Dart core uses dependency injection, routing, and services for analytics, storage, auth, theming, localization, deep linking, and permissions. These support the public APIs above; you configure behavior through the options passed at initialize and connect.
Next stepsβ
- Android SDK API β Android init, connect, and modules
- iOS SDK API β iOS init, connect, and modules
- Flutter SDK API β Flutter initialize, connect, and modules
- React Native SDK API β React Native init, connect, and modules