Skip to Content
Engineering11 Documentation πŸ”₯
FrontendArchitecture

Frontend Architecture

A consistent, layered architecture across Flutter, Angular, React, and React Native β€” enabling you to build on top of shared Foundation infrastructure without rebuilding common capabilities.

Layered Composition

Every frontend platform follows the same three-layer model:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Product Applications β”‚ β”‚ Domain-specific screens, business logic, UX β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ Product SDKs (optional) β”‚ β”‚ Domain packages that extend the Foundation β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ β”‚ Foundation Layer β”‚ β”‚ Auth, theming, error handling, UI components, β”‚ β”‚ REST clients, data layer, CI/CD β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Each layer depends only downward. Foundation packages never reference product code. Product SDKs extend Foundation capabilities for a specific domain. Product apps compose both layers into a deployable experience.

PlatformFoundation RepoPackages
Fluttersdks-flutter (Melos)26
Angularsdks-angular (Nx)26
React / RNsdks-react (pnpm + Turborepo)~24

Dependency Injection

Each platform provides an abstraction layer over its DI mechanism, keeping SDK code framework-agnostic:

PlatformAbstractionImplementationConsumption
FlutterAbstract DependencyInjector interface in e11_coreGetDependencyInjector (GetX) in e11_infradi.find<T>(), di.put(), di.lazyPut()
AngularBaseConfigProvider + forRoot() on every SDK moduleAngular’s built-in DI with InjectionToken{ provide: BaseXxxConfigProvider, useClass: ConcreteProvider }
React / RNAwilix-style DI container with hooksuseRegisterProviders + useContaineruseContainer() in any component

The Flutter DI abstraction is the most decoupled β€” the GetX dependency is an implementation detail that product code never touches. Angular uses its native DI but standardizes the pattern. React/RN uses a lightweight container with React hooks.

SDK Composition

Product apps wire Foundation SDKs together at startup. Each platform has a consistent β€œone call per SDK” initialization pattern:

Flutter β€” static initialize() factories that self-register dependencies:

AuthSdk.initialize(config: AuthConfig(di: di, ...)); MessagingSdk.initialize(config: MessagingConfig(di: di, ...)); FilesSdk.initialize(config: FilesConfig(di: di, ...));

Angular β€” forRoot() module imports with config providers:

AuthModule.forRoot({ configProvider: AuthConfigProvider }), FilesModule.forRoot({ configProvider: FilesConfigProvider }), MessagingModule.forRoot({ configProvider: MessagingConfigProvider }),

React / RN β€” nested provider composition:

<FirebaseProvider {...config}> <AuthSdkProvider> <FilesProvider uploadConfig={config}> <MessagingProvider> {children} </MessagingProvider> </FilesProvider> </AuthSdkProvider> </FirebaseProvider>

Feature Organization

All platforms organize code by domain feature, not by file type:

feature/ β”œβ”€β”€ data/ # Services, repositories, state β”œβ”€β”€ ui/ # Screens, components, controllers └── resources/ # Constants, permissions, config
ConceptFlutterAngularReact / RN
Feature entry pointModule facade (mixin with dependencies() + show())NgModule with routing moduleProvider + exported hooks
State managementSafeValueNotifier + stores@ngrx/component-storeTanStack Query + context
RoutingAbstract NavigationService with context.push()Lazy-loaded NgModule routes with guardsNext.js App Router (web), Expo Router (mobile)
Backend integrationDio-based RestClient with interceptorsHttpClient with interceptorsAxios-based RestClient with interceptors
Data layerFirestore wrappers + typed REST clientsFirestore services + REST servicesIRepository abstraction + TanStack Query hooks

Backend Integration

Every platform provides typed clients for the Foundation backend with automatic auth token injection:

  • REST β€” HTTP clients wrap Dio (Flutter), Angular HttpClient, or Axios (React/RN) with interceptors that attach JWT bearer tokens, Firebase AppCheck tokens, and tenant ID headers on every request
  • Firestore β€” Real-time stream wrappers provide streamDocument, streamCollection, query builders, and pagination with graceful permission-denied handling
  • Search β€” Algolia integration with platform-native search UI (InstantSearch for Angular/React, direct client for Flutter)
  • Push Notifications β€” Firebase Cloud Messaging with platform-specific token management and routing

Shared Foundation Capabilities

These capabilities are provided across all platforms:

CapabilityFlutterAngularReact (Web)React Native
Authentication (Firebase Auth)βœ“βœ“βœ“βœ“
White-label tenant themingβœ“βœ“βœ“βœ“
Structured error handlingβœ“βœ“βœ“βœ“
Error monitoring (Rollbar)βœ“βœ“βœ“βœ“
REST client with authβœ“βœ“βœ“βœ“
Firestore data layerβœ“βœ“βœ“βœ“
UI component library140+~65~45~35+
File managementβœ“βœ“βœ“βœ“
Push notificationsβœ“βœ“βœ“βœ“
Messagingβœ“βœ“βœ“β€”
Search (Algolia)βœ“βœ“βœ“β€”
CI/CD pipelinesβœ“βœ“βœ“βœ“
RBAC / Permissionsβœ“βœ“βœ“β€”

Next Steps

  • Platforms β€” Deep-dive into each platform’s capabilities
  • Capabilities β€” Authentication, theming, error handling, state, testing, performance, build/deploy, component libraries, and SDKs
Last updated on