Verificando autenticación…

Skip to main content

Golden Path: Frontend React

Official frontend template React 19 + TypeScript + Vite 6 for LATAM web applications (DEX platform). It includes Azure AD authentication, the Hangar design system, i18n, and observability, ready to deploy on Cloud Run.

Stack

ComponentValue
LanguageTypeScript
FrameworkReact 19
BuildVite 6 (HMR)
RuntimeNode 22 (>=22.0.0 <23)
DeploymentCorporate nginx image → Cloud Run / K8s

Features

  • MSAL authentication — login with Microsoft Entra ID (Azure AD), token renewal, and role-protected routes.
  • Hangar Design System — components, icons, and the eBusiness theme from @hangar/*.
  • Internationalization — Spanish and English with automatic language detection.
  • Per-environment configurationconfiguration.json loaded at runtime (MSAL, API, Faro).
  • Observability — Grafana Faro (RUM, traces, and navigation with React Router 7).
  • Global state — Zustand for authentication and session persistence.

Included routes

RouteAccess
/Public (Home or Dashboard if signed in)
/loginPublic (MSAL sign-in)
/dashboardAuthenticated
/demo-userRole demo.user
/demo-adminRole demo.admin
/themeHangar components demo

Local development requirements

  • Node.js 22.x
  • LATAM Artifactory token to install the @hangar/* packages
  • Azure AD app registration (for real MSAL login)
# Install and run (http://localhost:4200)
npm ci
cp public/assets/config/configuration.example.json public/assets/config/configuration.json
npm run dev
Configuration

The app loads assets/config/configuration.json at runtime (not versioned). In containers, entrypoint.sh generates it from the service's environment variables (ENVIRONMENT, API_ENDPOINT, MSAL_CLIENT_ID, MSAL_AUTHORITY).