Getting started
Requirements, sibling checkout, dependencies, composition root and the Super App checklist.
Docs version: supercore main · packages 1.0.0
RequirementsLink to this section: Requirements
Every package targets Dart SDK ^3.12.2 and Flutter >=3.27.0. Packages are not published to pub.dev; products depend on them by path.
Sibling checkoutLink to this section: Sibling checkout
Clone supercore next to your product repository so path dependencies resolve.
HANTURAI/
supercore/
supergarage/ # consumer reference
superhospital/ # enterprise reference
superhealth/ superfinance/ superhome/ supertravel/ supersports/ …Add dependenciesLink to this section: Add dependencies
Consumer product
dependencies:
after_core:
path: ../supercore/packages/after_core
after_consumer:
path: ../supercore/packages/after_consumer
after_design_system:
path: ../supercore/packages/after_design_systemEnterprise product
dependencies:
after_core:
path: ../supercore/packages/after_core
after_enterprise:
path: ../supercore/packages/after_enterprise
after_design_system:
path: ../supercore/packages/after_design_systemComposition rootLink to this section: Composition root
Each product registers its manifest and returns the standard overrides from one composition root, then layers product adapters on top.
class SuperAppConsumerFramework {
SuperAppConsumerFramework._();
static Future<List<Override>> ensureConfigured() async {
PlatformConfig.current = superAppConsumerManifest;
final prefs = await SharedPreferences.getInstance();
return AfterStandardOverrides.create(
preferences: prefs,
userAgent:
'${superAppConsumerManifest.appName}/${superAppConsumerManifest.appId}',
);
}
}Source supercore/templates/super_app_consumer/after_framework.dart (opens in a new tab)
static Future<List<Override>> ensureConfigured({
EnterpriseRepository? enterpriseRepository,
}) async {
PlatformConfig.current = superAppEnterpriseManifest;
final prefs = await SharedPreferences.getInstance();
return [
...AfterStandardOverrides.create(
preferences: prefs,
userAgent: '${superAppEnterpriseManifest.appName}/'
'${superAppEnterpriseManifest.appId}',
),
enterpriseRepositoryProvider.overrideWithValue(
enterpriseRepository ?? MockEnterpriseRepository(),
),
];
}Source supercore/templates/super_app_enterprise/after_framework.dart (opens in a new tab)
Super App checklistLink to this section: Super App checklist
Must
- Depend on after_core and after_design_system from supercore
- Unique AppPlatformManifest: appId, packageName, widget provider, iOS app group
- Composition root at lib/app/platform/after_framework.dart
- Set PlatformConfig.current before runApp
- Auth, analytics, push and entitlements behind After ports
- HTTPS Dio policy with requireHttps: true
- Theme from AfterThemeData
- Vertical features only under lib/features/
- Smoke test: manifest and overrides are non-empty
- CI: format, analyze, test
Should
- Store flavors: play, dev, huawei
- assets/l10n and a string catalog
- Entitlement matrix mapped to AfterUserPlan and AfterPlanFeature
- Privacy and terms URLs on the Overstein legal hub