Projects · Lalalab, 2022 – 2026

Multi-brand backend

Lalalab does not serve just one brand: the same platform runs other brands, including Fnac Photo. Bruno was responsible for the backend side of this move to multi-brand (the pure infrastructure work was led by someone else; he worked on the topic in parallel with the CTO).

Making the code "brand-aware"

A large part of the work consisted of paying down technical debt so that the whole stack and all the code know the brand, on every call and anywhere in the application. The goal: pods able to serve several brands at once, as long as they are given the right context.

  • From 2022, the Fnac-specific integrations: Fnac SSO login, member ID, Fnac pickup points, per-brand storage.
  • In 2026, brand context becomes native: the gateway injects the brand (brandId) into the context of every call, it propagates from one microservice to the next, and each node carries its brand's prefix.

Brand-based routing rolled out in two phases

Routing of calls between microservices (a Moleculer strategy) filters nodes by brand. To avoid breaking anything in production, Bruno rolled it out in two phases:

  1. Phase 1: wait until 100% of production nodes carry their brand prefix, without filtering yet.
  2. Phase 2: switch the filter on. If a call arrives without a brand, or no node of that brand is available, it falls back to the full list rather than failing, and this is traced in Datadog so each case can be fixed.

A deliberate trade-off: this fallback is only safe as long as the NATS clusters stay isolated per brand — this is documented in the code, and must be revisited before any merging of the networks.

Projects · Lalalab, 2022 – 2026

Backend multi-marque

Lalalab ne sert pas qu'une marque : la même plateforme fait tourner d'autres marques, dont Fnac Photo. Bruno était responsable de la partie backend de ce passage au multi-marque (l'infrastructure pure était portée par une autre personne ; il avançait en parallèle avec le CTO sur le sujet).

Rendre le code « brand-aware »

Une grande partie du travail a consisté à rattraper la dette technique pour que toute la stack et tout le code connaissent la marque, à chaque appel et à n'importe quel endroit de l'application. Objectif : que des pods puissent servir plusieurs marques à la fois, pourvu qu'on leur donne le bon contexte.

  • Dès 2022, les intégrations propres à Fnac : connexion SSO Fnac, identifiant d'adhérent, points relais Fnac, stockage par marque.
  • En 2026, le contexte de marque devient natif : la gateway injecte la marque (brandId) dans le contexte de chaque appel, il se propage d'un microservice à l'autre, et chaque nœud porte le préfixe de sa marque.

Un routage par marque déployé en deux phases

Le routage des appels entre microservices (stratégie Moleculer) filtre les nœuds selon la marque. Pour ne rien casser en production, Bruno l'a déployé en deux phases :

  1. Phase 1 : on attend que 100 % des nœuds de production portent le préfixe de leur marque, sans encore filtrer.
  2. Phase 2 : on active le filtre. Si un appel arrive sans marque, ou qu'aucun nœud de la marque n'est disponible, on retombe sur la liste complète plutôt que d'échouer, et on le trace dans Datadog pour corriger chaque cas.

Compromis assumé : ce repli n'est sûr que tant que les clusters NATS restent isolés par marque — c'est documenté dans le code, et à revoir avant toute fusion des réseaux.

Projects · Lalalab, 2022 – 2026

Multi-Brand-Backend

Lalalab bedient nicht nur eine Marke: Auf derselben Plattform laufen weitere Marken, darunter Fnac Photo. Bruno war für den Backend-Teil dieser Umstellung auf Multi-Brand verantwortlich (die reine Infrastruktur verantwortete eine andere Person; er arbeitete parallel mit dem CTO an dem Thema).

Den Code „brand-aware“ machen

Ein grosser Teil der Arbeit bestand darin, technische Schulden abzubauen, damit der gesamte Stack und der gesamte Code die Marke kennen, bei jedem Aufruf und an jeder Stelle der Anwendung. Das Ziel: Pods, die mehrere Marken gleichzeitig bedienen können, sofern sie den richtigen Kontext erhalten.

  • Ab 2022 die Fnac-spezifischen Integrationen: Anmeldung über Fnac SSO, Mitgliedsnummer, Fnac-Abholstellen, Speicherung pro Marke.
  • 2026 wird der Markenkontext nativ: Das Gateway fügt die Marke (brandId) in den Kontext jedes Aufrufs ein, sie wird von einem Microservice zum nächsten weitergegeben, und jeder Knoten trägt das Präfix seiner Marke.

Markenbasiertes Routing in zwei Phasen ausgerollt

Das Routing der Aufrufe zwischen Microservices (Moleculer-Strategie) filtert die Knoten nach Marke. Um in der Produktion nichts zu beschädigen, rollte Bruno es in zwei Phasen aus:

  1. Phase 1: Warten, bis 100 % der Produktionsknoten das Präfix ihrer Marke tragen, noch ohne zu filtern.
  2. Phase 2: Den Filter aktivieren. Kommt ein Aufruf ohne Marke an oder ist kein Knoten der Marke verfügbar, fällt das Routing auf die vollständige Liste zurück, statt fehlzuschlagen, und der Fall wird in Datadog getrackt, um ihn einzeln zu beheben.

Bewusster Kompromiss: Dieser Fallback ist nur so lange sicher, wie die NATS-Cluster pro Marke isoliert bleiben — das ist im Code dokumentiert und muss vor jeder Zusammenlegung der Netzwerke überprüft werden.