# axafrance/design-system architecture

> Architecture diagram of the GitHub repository axafrance/design-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/axafrance/design-system
- Repository: https://github.com/axafrance/design-system

## Overview

##### Project type and purpose
- This is a monorepo for AXA France’s Design System. It hosts multiple design-system packages (Slash, Apollo, Look-and-Feel) in both CSS and React flavors. It also provides Storybook “apps” to preview components, sample Vite project, documentation, linting configs, and CI/CD workflows.
##### File structure
- Top-level:
- .github/ – CI/CD workflows, issue templates, custom GitHub Actions
- apps/ – Storybook applications for each design system
- client/ – “published” design-system packages for Apollo & Look-and-Feel (CSS & React)
- slash/ – CSS & React implementations for Slash design system
- packages/ – sharable config packages (eslint, prettier, stylelint, postcss)
- samples/ – Vite sample consuming the design system
- docs/ – ADRs, guidelines, images
- scripts/ – build/publish helpers
- root configs: turbo.json, package.json, README.md, migration guides, CI configs
- Each design system has:
- css/ – SCSS sources, tokens, common styles, postcss config, turbo config
- react/ – component implementations, tests, utilities, tsconfigs, Vite/Storybook configs
- “apps” directory hosts Storybook containers that import the published packages to render component previews.
##### README for additional insights
- Purpose: single entry point for AXA France design system.
- Three flavors: Apollo (B2C public), Look & Feel (B2C client), Slash (B2B internal).
- Commands to start all or individual parts (dev & build), Storybook for React, CSS build.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Monorepo Root
    subgraph "Monorepo Root"
        direction TB
        %% Shared Config Packages
        subgraph "Shared Config Packages"
            direction TB
            ESLint["eslint-config"]:::config
            Prettier["prettier-config"]:::config
            Stylelint["stylelint-config"]:::config
            PostCSS["postcss-config"]:::config
        end

        %% Slash Design System
        subgraph "Slash Design System"
            direction TB
            SlashCSS["slash-css"]:::library
            SlashReact["slash-react"]:::library
        end

        %% Apollo Design System
        subgraph "Apollo Design System"
            direction TB
            ApolloCSS["apollo-css"]:::library
            ApolloReact["apollo-react"]:::library
        end

        %% Look & Feel Design System
        subgraph "Look & Feel Design System"
            direction TB
            LFCSS["look-and-feel-css"]:::library
            LFReact["look-and-feel-react"]:::library
        end

        %% Storybook Applications
        subgraph "Storybook Apps"
            direction TB
            ApolloStories["apollo-stories"]:::app
            LFStories["look-and-feel-stories"]:::app
            SlashStories["slash-stories"]:::app
        end

        %% Sample App
        SampleApp["vite-sample"]:::app

        %% Documentation
        Docs["docs"]:::docs
    end

    %% CI/CD and External
    CI["CI/CD Pipeline"]:::ci
    Registry[(npm Registry)]:::external
    Chromatic[(Chromatic)]:::external
    Sonar[(SonarCloud)]:::external

    %% Dependencies
    ESLint --> SlashCSS
    ESLint --> SlashReact
    ESLint --> ApolloCSS
    ESLint --> ApolloReact
    ESLint --> LFCSS
    ESLint --> LFReact

    Prettier --> SlashCSS
    Prettier --> SlashReact
    Prettier --> ApolloCSS
    Prettier --> ApolloReact
    Prettier --> LFCSS
    Prettier --> LFReact

    Stylelint --> SlashCSS
    Stylelint --> SlashReact
    Stylelint --> ApolloCSS
    Stylelint --> ApolloReact
    Stylelint --> LFCSS
    Stylelint --> LFReact

    PostCSS --> SlashCSS
    PostCSS --> ApolloCSS
    PostCSS --> LFCSS

    %% Build to Registry
    SlashCSS -->|"build & publish"| Registry
    SlashReact -->|"build & publish"| Registry
    ApolloCSS -->|"build & publish"| Registry
    ApolloReact -->|"build & publish"| Registry
    LFCSS -->|"build & publish"| Registry
    LFReact -->|"build & publish"| Registry

    %% Apps consume artifacts
    Registry --> ApolloStories
    Registry --> LFStories
    Registry --> SlashStories
    Registry --> SampleApp

    %% CI/CD triggers builds & deployments
    CI --> SlashCSS
    CI --> SlashReact
    CI --> ApolloCSS
    CI --> ApolloReact
    CI --> LFCSS
    CI --> LFReact
    CI --> ApolloStories
    CI --> LFStories
    CI --> SlashStories
    CI --> SampleApp
    CI --> Docs
    CI --> Registry
    CI --> Chromatic
    CI --> Sonar

    %% Click events
    click ESLint "https://github.com/axafrance/design-system/tree/main/packages/eslint-config"
    click Prettier "https://github.com/axafrance/design-system/tree/main/packages/prettier-config"
    click Stylelint "https://github.com/axafrance/design-system/tree/main/packages/stylelint-config"
    click PostCSS "https://github.com/axafrance/design-system/tree/main/packages/postcss-config"
    click SlashCSS "https://github.com/axafrance/design-system/tree/main/slash/css"
    click SlashReact "https://github.com/axafrance/design-system/tree/main/slash/react"
    click ApolloCSS "https://github.com/axafrance/design-system/tree/main/client/apollo/css"
    click ApolloReact "https://github.com/axafrance/design-system/tree/main/client/apollo/react"
    click LFCSS "https://github.com/axafrance/design-system/tree/main/client/look-and-feel/css"
    click LFReact "https://github.com/axafrance/design-system/tree/main/client/look-and-feel/react"
    click ApolloStories "https://github.com/axafrance/design-system/tree/main/apps/apollo-stories"
    click LFStories "https://github.com/axafrance/design-system/tree/main/apps/look-and-feel-stories"
    click SlashStories "https://github.com/axafrance/design-system/tree/main/apps/slash-stories"
    click SampleApp "https://github.com/axafrance/design-system/tree/main/samples/vite"
    click Docs "https://github.com/axafrance/design-system/tree/main/docs/"
    click CI "https://github.com/axafrance/design-system/tree/main/.github/workflows"
    click CI "https://github.com/axafrance/design-system/blob/main/.husky"
    click CI "https://github.com/axafrance/design-system/blob/main/scripts/pre-publish.js"
    click CI "https://github.com/axafrance/design-system/blob/main/turbo.json"
    click CI "https://github.com/axafrance/design-system/blob/main/package.json"

    %% Styles
    classDef library fill:#e0f7fa,stroke:#006064,stroke-width:1px;
    classDef config fill:#e8f5e9,stroke:#1b5e20,stroke-width:1px;
    classDef app fill:#fff8e1,stroke:#ff8f00,stroke-width:1px,stroke-dasharray: 5 5;
    classDef docs fill:#f3e5f5,stroke:#6a1b9a,stroke-width:1px;
    classDef ci fill:#ffebee,stroke:#b71c1c,stroke-width:2px,stroke-dasharray: 2 2;
    classDef external fill:#eceff1,stroke:#607d8b,stroke-width:1px,stroke-dasharray: 2 2;
```
