apps/flutter_appThin Flutter runner and bootstrap.
Featured engineering project · 2026
Personal Engineering / Platform Architecture Project
Architected a Flutter super-app platform for sandboxed H5 mini-apps, combining a capability-based native bridge, secure WebView boundaries, signed manifests, generated SDK/contracts and a NestJS backend.
Case study index
A mini-app model can increase feature delivery speed, but only if the host remains the policy enforcement point. This project explores how independently delivered H5 experiences can reuse identity, payments, device services and navigation without inheriting unrestricted native access.
The host owns policy. Mini-apps request narrowly scoped capabilities.
The platform separates the thin runner, product host, runtime policy models, Flutter WebView hosting, SDKs, generated clients and backend services. Each boundary has a clear responsibility and contract.
Clean Architecture · BLoC · go_router · get_it / injectable · modular feature boundaries · Android/iOS native glue
Networking · local storage · secure storage · domain · analytics
apps/flutter_appThin Flutter runner and bootstrap.
packages/superapp_hostMain application code and product features.
packages/miniapp_runtimeDescriptors, sessions, policies, registry, lifecycle and authorization scopes.
packages/miniapp_flutterFlutter WebView hosting layer.
packages/superapp_sdkDart-facing bridge SDK.
packages/superapp_api_clientGenerated OpenAPI client.
backend/NestJS platform services and domain modules.
mini_apps_store/ + contracts/H5 hosting, JavaScript SDK, registry and contract workflow.
The runtime models descriptors, sessions, policies, capability registration, lifecycle, authorization scopes, bundle versions, cache and revocation. Launch is a gated decision, not a direct URL open.
H5 code is treated as untrusted input. It can request capabilities, but it cannot directly reach payment credentials, platform secrets or unrestricted device APIs. The Flutter host authenticates the session, evaluates policy and routes approved work to native services or the backend.
Every bridge message crosses an explicit validation and authorization pipeline before a host capability is invoked.
CAPABILITIESUser · Payment · Device · Storage · Share · Navigation
Security controls are placed at the boundaries where untrusted H5 content meets privileged mobile and backend capabilities.
Restrict bridge origins and enforce main-frame/origin boundaries before dispatch.
Verify Ed25519/JWKS signatures; the mobile host never holds the signing private key.
Sensitive authentication material uses platform Keychain/Keystore-backed storage.
WebView → native host → backend → provider. Provider credentials stay outside H5; server-to-server calls use a service-token boundary.
superapp://miniapp/<id> deep links and QR launches pass through registry, policy and version gates.
Client kill-switch support complements backend revocation mechanisms.
OpenAPI is the shared source of truth for generated Dart and TypeScript clients. Contract CI checks breaking changes so the mobile host, mini-app developers and backend evolve against explicit interfaces instead of informal API assumptions.
The NestJS platform covers auth, OAuth, identity, organizations, mini-apps, payments, analytics, revocation and users. The artifact path adds digest verification, quarantine, fail-closed scanning, an append-only release ledger, rollback and ZIP/bundle defenses.
The latest Gate 3 integration checkpoint passes 1,166 / 1,166 tests across Flutter/Dart and backend coverage, with five workflows green. Integration maturity is verified; production readiness remains gated behind the remaining reviews.
The platform remains deliberately gated before production. The remaining items are visible release conditions rather than hidden uncertainty.
Independent security review is not fully closed.
Baseline reconciliation has an external pending dependency.
Production flags remain disabled.
Final production GO has not been given.
The architecture makes its costs visible instead of presenting every control as free.
H5 enables independent delivery; capability mediation deliberately limits what a mini-app can do.
Generated clients and breaking-change checks add process, but reduce drift between host, mini-app and backend.
A blocked launch is preferable to bypassing an unverifiable manifest, policy or artifact state.
The bridge adds lifecycle and observability work, but keeps privileged actions inside the mobile trust boundary.