Aller au contenu

Architecture

Ce contenu n’est pas encore disponible dans votre langue.

  • Status: accepted (milestone M1). The deployment view will be added after the decision on question Q6.
  • Date: 2026-11-23

This page describes Pulse with the C4 model: level 1 (system context) and level 2 (containers). Each important choice is explained in an Architecture Decision Record (ADR).

Who uses Pulse, and which external systems does Pulse depend on?

flowchart TB
    visitor["<b>Visitor</b><br/>[Person]<br/>Recruiter, hiring manager or tech lead"]
    pulse["<b>Pulse</b><br/>[Software system]<br/>Customizable dashboard with widgets"]
    gitlab["<b>GitLab API</b><br/>[External system]<br/>Pipelines and milestones of my projects"]
    velo["<b>Bordeaux Métropole open data</b><br/>[External system]<br/>Le Vélo stations, GBFS format"]
    iss["<b>Where the ISS at? API</b><br/>[External system]<br/>Position of the ISS"]
    ofm["<b>OpenFreeMap</b><br/>[External system]<br/>Vector map tiles"]

    visitor -- "Builds and shares dashboards<br/>[HTTPS]" --> pulse
    pulse -- "Reads pipeline and milestone data<br/>[REST, HTTPS]" --> gitlab
    pulse -- "Reads bike station status<br/>[GBFS JSON, HTTPS]" --> velo
    pulse -- "Reads ISS position<br/>[REST, HTTPS]" --> iss
    pulse -- "Loads map tiles<br/>[HTTPS]" --> ofm

    classDef person fill:#08427b,stroke:#052e56,color:#ffffff
    classDef system fill:#1168bd,stroke:#0b4884,color:#ffffff
    classDef external fill:#8a8a8a,stroke:#6b6b6b,color:#ffffff
    class visitor person
    class pulse system
    class gitlab,velo,iss,ofm external

What are the applications inside Pulse, and how do they talk to each other?

flowchart LR
    visitor["<b>Visitor</b><br/>[Person]"]

    subgraph pulse["Pulse [Software system]"]
        web["<b>web</b><br/>[Container: Angular 22]<br/>Dashboard in the browser.<br/>Layout saved in localStorage,<br/>shared in the URL fragment."]
        bff["<b>bff</b><br/>[Container: Spring Boot 4, Java 25]<br/>Stateless Backend For Frontend.<br/>Proxy and cache for the widget data."]
    end

    docs["<b>Documentation website</b><br/>[Container: Starlight on GitLab Pages]<br/>Charter, ADRs, architecture,<br/>test strategy, operations guide"]

    gitlab["<b>GitLab API</b><br/>[External system]"]
    velo["<b>Bordeaux Métropole open data</b><br/>[External system]"]
    iss["<b>Where the ISS at? API</b><br/>[External system]"]
    ofm["<b>OpenFreeMap</b><br/>[External system]"]

    visitor -- "Uses the dashboard<br/>[HTTPS]" --> web
    visitor -. "Reads the documentation<br/>[HTTPS]" .-> docs
    web -- "Gets widget data<br/>[JSON, HTTPS, /api/*]" --> bff
    web -- "Loads map tiles<br/>[HTTPS]" --> ofm
    bff -- "Pipelines, milestones<br/>[REST]" --> gitlab
    bff -- "Station status<br/>[GBFS]" --> velo
    bff -- "ISS position<br/>[REST]" --> iss

    classDef person fill:#08427b,stroke:#052e56,color:#ffffff
    classDef container fill:#438dd5,stroke:#2e6295,color:#ffffff
    classDef external fill:#8a8a8a,stroke:#6b6b6b,color:#ffffff
    class visitor person
    class web,bff,docs container
    class gitlab,velo,iss,ofm external
    style pulse fill:none,stroke:#0b4884,stroke-dasharray:5 5
Container Technology Responsibility Repository
web Angular 22, angular-gridster2, MapLibre GL JS Dashboard grid, widgets, keyboard layer, layout storage and sharing pulse/web
bff Java 25, Spring Boot 4, Caffeine cache Calls the external APIs, caches the answers, hides their differences from web pulse/bff
Documentation website Starlight, GitLab Pages Project documentation in English and French pulse/docs

The map tiles are the only external data loaded directly by the browser. All other external data goes through the bff.

Example with the ISS widget. The other widgets follow the same flow, with a cache duration adapted to each source.

sequenceDiagram
    participant W as web (browser)
    participant B as bff
    participant C as Cache (5 s)
    participant I as Where the ISS at? API

    W->>B: GET /api/iss/position
    B->>C: Is there a recent position?
    alt Position less than 5 seconds old
        C-->>B: Cached position
    else No recent position
        B->>I: GET /v1/satellites/25544
        I-->>B: Latitude, longitude, altitude, speed
        B->>C: Keep for 5 seconds
    end
    B-->>W: 200 OK (JSON)
sequenceDiagram
    actor A as Author
    participant WA as web (author's browser)
    actor R as Reader
    participant WR as web (reader's browser)

    A->>WA: Clicks "Share"
    WA->>WA: Layout to JSON, compress, encode
    WA-->>A: Link copied: https://pulse.antoine-duquenne.fr/#35;v1.#lt;data#gt;
    A->>R: Sends the link
    R->>WR: Opens the link
    WR->>WR: Decode, validate, show the layout
    Note over WA,WR: The fragment (after #35;) is never sent to the server
Concern How it is handled
Security No user data stored. GitLab endpoints accept only projects of heimdall-groupe (no open proxy). Shared links are validated as untrusted input. Secrets only in protected CI variables.
Accessibility Keyboard layer for the grid, aria-live announcements, text alternatives for the map. Lighthouse CI blocks merge requests under 90.
Performance External data cached by the bff. MapLibre loaded only when an ISS widget is shown.
Reliability Timeouts on external calls. Each widget has loading, error and empty states; one failing widget does not affect the others.
Observability Health endpoint /actuator/health on the bff.

To be completed when the hosting is decided (question Q6 of the charter, by 2026-11-28). Planned principle: web and bff are served from the same domain (pulse.antoine-duquenne.fr), with /api/* routed to the bff, so the browser makes no cross-origin calls to our own back end.

ADR Decision
0001 Use Starlight for project documentation
0002 One repository per part, in a GitLab sub-group
0003 Share layouts in the URL and keep the BFF stateless
0004 Use angular-gridster2 with our own keyboard layer
0005 ISS widget: Where the ISS at? API and MapLibre with OpenFreeMap
0006 Check accessibility with Lighthouse CI on every merge request