How aot-technologies/forms-flow-ai-micro-front-ends works
1. This repository is a micro-frontend suite for formsflow.ai, not a single app. Each top-level package under forms-flow-* is a separately built and deployed frontend module, and the whole system is composed at runtime by a single-spa shell that lives in the separate formsflow.ai repo.
2. The composition boundary is the navbar and router shell. forms-flow-nav is the global chrome: it owns top-level navigation, route selection, language switching, and login/logout entry points. It also contains shared access helpers and user/tenant/permission services that shape what the user can see.
3. forms-flow-service is the shared runtime library used by the other MFEs. It centralizes authentication plumbing, Keycloak integration, request/storage helpers, router utilities, and shared i18n/resource bundles. In architecture terms, this is the common infrastructure layer rather than a user-facing app.
4. forms-flow-theme is the shared styling layer. It is a SCSS-based design system with variables, mixins, and component-specific style partials. All other frontends depend on it for consistent look-and-feel and theme customization via CSS variables.
5. forms-flow-components is the reusable UI toolkit. It contains a large catalog of generic controls, modals, tables, filters, uploaders, and utility hooks, plus Storybook and component tests. Other MFEs import from here instead of duplicating UI logic, so it sits between the theme/service layers and the app-specific screens.
6. forms-flow-admin is the administration workspace. Its feature boundary is role/user/dashboard management, with screens for organizations, plans, roles, users, and billing-related flows. It has its own service layer for dashboard/roles/users and is intended to be visible only to users with the formsflow-admin role.
7. forms-flow-review is the reviewer/work-queue application. It handles task listing, task details, filtering, assignment, history, and task-related modals. Its architecture is more stateful than the admin app: it includes Redux reducers, action creators, socket-based updates, and task-specific API services for BPM task interaction and filtering.
8. forms-flow-submissions is the submissions analysis workspace. It focuses on submission lists, submission views, bundle/analyze flows, filter management, and submission history. Like the review app, it uses reducers, actions, and query/service layers, but its domain is submission analytics rather than task execution.
9. forms-flow-integration is the integrations marketplace/admin area. Its screens are organized around connected apps, recipes, library, and premium subscription messaging, indicating a feature boundary for configuring and browsing third-party integrations rather than core workflow tasks.
10. forms-flow-service underpins the main data flow to external systems. From the file tree it explicitly integrates with Keycloak, Form.io role services, storage services, request handling, and router helpers. The other apps call into this shared module to authenticate, fetch data, persist artifacts, and localize UI strings.
11. The request/data path is generally: user interaction in a module-specific screen -> app-local service/action layer -> shared service helpers or direct API endpoint config -> external backend systems such as auth, storage, task, submission, or integration APIs. Review also has a realtime path via SocketIOService, which suggests push-based updates for task state.
12. Each app is independently packaged and containerized. The presence of per-module package.json, webpack.config.js, Dockerfile, nginx.conf, and docker-compose.yaml files shows that every micro frontend can be built, tested, and served separately, with CI/CD workflows per module in .github/workflows.
13. Tooling is consistent across the suite: React 17, TypeScript/JavaScript mixed by module, webpack bundling, Jest-based tests, ESLint/Prettier, and Storybook for the component library. The architecture diagram should reflect shared libraries at the center, domain MFEs around them, and the external shell/backend services at the edges.
Main entry points: index.scss Theme · formsflow-services.ts Service layer · index.ts Components · formsflow-admin.tsx Admin
Components 18
Shared layers
Common runtime, UI, and styling libraries used across MFEs
- Navbar · Global navigation, route selection, language switching, and login/logout entry points
forms-flow-nav/src/Navbar.jsx - Service layer · Common authentication, Keycloak, request/storage, router, and i18n helpers
forms-flow-service/src/formsflow-services.ts - Theme · Shared styling layer with variables, mixins, and component/theme partials
forms-flow-theme/scss/index.scss - Components · Reusable controls, modals, tables, filters, uploaders, hooks, and Storybook catalog
forms-flow-components/src/components/index.ts
Domain apps
Independently built micro-frontends for specific formflow workspaces
- Admin · Administration screens for organizations, plans, roles, users, and billing flows
forms-flow-admin/src/formsflow-admin.tsx - Admin services · Admin-specific dashboard, roles, and users service layer
forms-flow-admin/src/services/dashboard/index.ts - Review · Reviewer work-queue app for task listing, details, filtering, assignment, and history
forms-flow-review/src/formsflow-review.tsx - Review state · Task reducers, actions, store services, and realtime SocketIO updates
forms-flow-review/src/reducers/index.ts - Review services · BPM task, filter, formatter, and user service adapters
forms-flow-review/src/api/services/bpmTaskServices.ts - Submissions · Submission analysis app for lists, views, bundle/analyze flows, filters, and history
forms-flow-submissions/src/formsflow-submissions.tsx - Submissions state · Reducers, actions, and React Query client for submission workflows
forms-flow-submissions/src/react-query-client.ts - Submission services · Application, process, and submission query/service adapters
forms-flow-submissions/src/services/applicationServices.ts - Integration · Marketplace/admin area for connected apps, recipes, library, and premium messaging
forms-flow-integration/src/formsflow-integration.tsx - Integration services · Connected apps, recipes, library, and integration service adapters
forms-flow-integration/src/services/integration/index.ts
External systems
Runtime shell and backend services outside this repository
- single-spa shell · Runtime composition boundary that mounts the MFEs in the separate formsflow.ai repo
- Keycloak · Identity provider used for authentication and session plumbing
- Workflow APIs · Task, submission, integration, Form.io, tenant, and role backends consumed by the MFEs
- Storage · Persisted file and asset storage used by shared services and upload flows
Connections 30
- single-spa shell → Navbar: mounts · Shell composes the global navigation chrome
- single-spa shell → Admin: mounts · Shell loads the admin MFE at runtime
- single-spa shell → Review: mounts · Shell loads the reviewer MFE at runtime
- single-spa shell → Submissions: mounts · Shell loads the submissions MFE at runtime
- single-spa shell → Integration: mounts · Shell loads the integrations MFE at runtime
- Navbar → Service layer: uses · Navigation reuses shared auth, routing, and localization helpers
- Navbar → Keycloak: auth · Login and session handling are mediated through shared identity plumbing
- Navbar → Workflow APIs: profile/perm · Navigation fetches user, tenant, permission, and integration state
- Admin → Admin services: calls · Admin screens delegate to domain service adapters
- Admin → Components: renders · Admin UI reuses shared controls and modal patterns
- Admin → Theme: styles · Admin consumes shared SCSS theme and variables
- Review → Review state: coordinates · Review screens are driven by reducers, actions, and realtime state
- Review → Review services: calls · Task listing and task detail flows use BPM/filter services
- Review → Components: renders · Review uses reusable table, modal, and selection components
- Review state → Workflow APIs: task data · Review state syncs with task and tenant backend APIs
- Review state → Service layer: uses · State layer depends on shared request and router utilities
- Submissions → Submissions state: coordinates · Submission screens are driven by reducers, actions, and query client
- Submissions → Submission services: calls · Submission analysis flows use application and process services
- Submissions → Components: renders · Submission UI reuses shared table, modal, and filter components
- Integration → Integration services: calls · Integration screens delegate to domain service adapters
- Integration → Components: renders · Integration UI reuses shared controls and layouts
- Service layer → Keycloak: integrates · Shared service layer centralizes authentication with Keycloak
- Service layer → Storage: persists · Shared helpers abstract artifact storage and download/upload flows
- Service layer → Workflow APIs: requests · Shared request and API helpers speak to core backend services
- Components → Service layer: depends on · Reusable components import shared runtime helpers and API mocks
- Theme → Components: skins · Theme provides styling primitives for the UI toolkit
- Theme → Admin: skins · Admin screens inherit the shared design system
- Theme → Review: skins · Review screens inherit the shared design system
- Theme → Submissions: skins · Submission screens inherit the shared design system
- Theme → Integration: skins · Integration screens inherit the shared design system