Skip to content

Global admin dashboard component

Description

This component offers controllers to display data in the admin dashboard that are "country agnostic".

It allows us to build common interfaces for all countries (🇫🇷/🇧🇪/🇪🇸)

Architecture

Full description in the tech framing ⧉ document.

  • controllers:
  • blueprint is added to each app's flask init
  • authentication/authorization is handled by GlobalAuthorizationStrategies in backend/shared/iam/global_authorization.py that links to the country specific auth strategy
  • IDs are strings because they can be either ints (🇫🇷) or UUIDs (🇪🇸/🇧🇪)
  • retrieve parameters and then call logic in external
  • external business logics:
  • use a match / case pattern to call the right country specific logic
  • return entities from public/entities
  • there should be no internal business logic nor models in this component
  • tests are performed for each country so they use their respective app and client:
  • 🇫🇷 backend/components/fr/internal/tests/test_global_customer_dashboard/tests
  • 🇧🇪 backend/components/be/internal/controllers/global_customer_dashboard/tests
  • 🇪🇸 backend/components/es/internal/controllers/global_customer_dashboard/tests