Skip to content

Consume the flow/meta endpoint of Thunder to reolve theme, i18n, etc. #369

@brionmario

Description

@brionmario

Current Limitation

Currently, in Thunder mode (AsgardeoV2), the runtime does not consume the flow/meta endpoint exposed by Thunder.

Even though Thunder provides rich metadata such as:

  • Application details (name, logo)
  • Organization Unit (OU) branding & policy links
  • Theme (light/dark color schemes, typography, shape)
  • Layout configuration (screen templates, slots, spacing)
  • i18n translations and active language
  • Registration enablement flag

These configurations are not reflected in the actual rendered experience.

This leads to:

  • Theme mismatches between Thunder config and runtime UI
  • Missing localization despite translations being defined
  • Ignored layout templates (e.g., centered layout, slot configs)
  • Branding inconsistencies (logos, policy links)
  • Drift between control plane (Thunder) and presentation layer

Suggested Improvement

1️⃣ Fetch flow/meta During Initialization

In Thunder mode (AsgardeoV2):

  • Call flow/meta before rendering.
  • Resolve metadata based on Flow ID and context.
  • Store metadata in a runtime configuration store.

2️⃣ Resolve Theme (design.theme)

Map Thunder theme configuration into the design system:

  • direction → RTL/LTR support
  • defaultColorScheme → initial mode (light/dark)
  • colorSchemes → map to theme tokens
  • shape.borderRadius → component shape
  • typography.fontFamily → global font

3️⃣ Resolve i18n (i18n)

  • Set active language from i18n.language.
  • Load translations dynamically from:
    • i18n.translations
  • Merge:
    • Flow-level overrides
    • Default system translations
  • Implement fallback strategy if keys are missing.
  • Ensure lazy loading and performance optimization.

Please select the package issue is related to

other

Version

current

Reporter Checklist

  • I have searched the existing issues and this is not a duplicate.
  • I have provided all the necessary information.
  • I have verified the improvement is not available in the latest version of the package.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions