# leboncoin/spark-android architecture

> Architecture diagram of the GitHub repository leboncoin/spark-android, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/leboncoin/spark-android
- Repository: https://github.com/leboncoin/spark-android

## Overview

##### Project Type and Purpose
- This is a multi-module Android Compose design system library with:
- `spark`: the core design system (UI components & tokens)
- `spark-screenshot-testing`: Paparazzi-based screenshot testing tooling
- `catalog`: a demo/configurator app showcasing and testing components

##### Main Components (to include
- Catalog App (`catalog`): Android Compose application—frontend entry point.
- Core Library (`spark`): publishes Composable UI components, tokens, themes.
- Screenshot-Testing Tool (`spark-screenshot-testing`): provides JUnit rules & utilities for visual regression.

##### Relationships and Data Flows
- `catalog` → depends on → `spark` (uses UI components & theme)
- `spark-screenshot-testing` → depends on → `spark` (tests snapshots of core components)

##### Architectural Patterns & Principles
- Gradle Multi-Module: clearly separated, independently versioned modules.
- Layered:
- Core layer (`spark`)
- Consumer layer (`catalog`)
- Testing layer (`spark-screenshot-testing`)
- Compose-First: all UI delivered as Jetpack Compose components.
- CI/CD: each module publishes to MavenCentral and is verified via GitHub Actions.

##### Technologies & Frameworks
- Kotlin Multiplatform (Android)
- Jetpack Compose (Material3 override)
- Gradle Kotlin DSL for builds
- Paparazzi for screenshot tests

## Diagram (Mermaid)

```mermaid
flowchart TD
    Gradle["Gradle Multi-Module Structure"]:::note

    Spark["spark"]:::core
    Icons["spark-icons"]:::asset
    Catalog((catalog)):::app
    Testing[/spark-screenshot-testing/]:::testing

    Gradle --> Spark
    Gradle --> Icons
    Gradle --> Catalog
    Gradle --> Testing

    Catalog -->|"depends on"| Spark
    Catalog -->|"depends on"| Icons
    Icons -->|"depends on"| Spark
    Testing -->|"tests snapshots of"| Spark
    Testing -->|"tests in"| Catalog
    Testing -->|"tests in"| Icons

    click Catalog "https://github.com/leboncoin/spark-android/tree/main/catalog/"
    click Spark "https://github.com/leboncoin/spark-android/tree/main/spark/"
    click Icons "https://github.com/leboncoin/spark-android/tree/main/spark-icons/"
    click Testing "https://github.com/leboncoin/spark-android/tree/main/spark-screenshot-testing/"

    classDef core fill:#cce5ff,stroke:#004085;
    classDef asset fill:#d4edda,stroke:#155724;
    classDef app fill:#fff3cd,stroke:#856404;
    classDef testing fill:#f5c6cb,stroke:#721c24;
    classDef note fill:#e2e3e5,stroke:#6c757d,stroke-dasharray:5 5;
```
