# supoz9/boutique-solidaire-chappe architecture

> Architecture diagram of the GitHub repository supoz9/boutique-solidaire-chappe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/supoz9/boutique-solidaire-chappe
- Repository: https://github.com/supoz9/boutique-solidaire-chappe

## Overview

Boutique Solidaire is a QR-based stock-management web app for a school charity shop. Staff scan items to record donations or returns, add and label stock, review inventory and movement-based reports, and export or restore backups. Data can stay in the device’s browser or be shared through Firebase, with team sign-in in online mode and a PIN in local mode. The README documents the page structure and major capabilities; the sampled app.js excerpts confirm selected transaction and scanning behavior, but not every internal call between its features.

Main entry points: [`app.js`](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js) (Application logic), [`index.html`](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/index.html) (Tabbed interface), [`firebase-config.js`](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/firebase-config.js) (Firebase settings), [`firestore.rules`](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/firestore.rules) (Firestore rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Staff interface"]
  node_page["Tabbed interface<br/>[index.html]"]
  node_styling["Mobile styling<br/>[style.css]"]
end

subgraph group_stock["Stock operations"]
  node_app["Application logic<br/>[app.js]"]
  node_scan["QR scanning<br/>[app.js]"]
  node_inventory["Stock and movements<br/>[app.js]"]
  node_labels["QR labels<br/>[app.js]"]
  node_stockview["Stock view<br/>[app.js]"]
end

subgraph group_records["Reports and backup"]
  node_reports["Reports and CSV<br/>[app.js]"]
  node_backup["Backup and import<br/>[app.js]"]
end

subgraph group_persistence["Data and access"]
  node_access["PIN and sign-in<br/>[app.js]"]
  node_localdata[("Browser storage<br/>[app.js]")]
  node_config["Firebase settings<br/>[firebase-config.js]"]
  node_rules["Firestore rules<br/>[firestore.rules]"]
end

node_staff(("Shop staff"))
node_firebase[("Firebase services")]

node_staff -->|"uses"| node_page
node_page -->|"provides interface"| node_app
node_page -->|"styled by"| node_styling
node_staff -->|"scans items"| node_scan
node_app -->|"runs scanner"| node_scan
node_app -->|"records changes"| node_inventory
node_staff -->|"prints labels"| node_labels
node_staff -->|"views stock"| node_stockview
node_staff -->|"views and exports"| node_reports
node_staff -->|"exports or imports"| node_backup
node_app -->|"stores locally"| node_localdata
node_app -.->|"reads and writes"| node_firebase
node_app -->|"checks access"| node_access
node_config -->|"configures"| node_firebase
node_rules -->|"secures database"| node_firebase

click node_page "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/index.html"
click node_styling "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/style.css"
click node_app "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js"
click node_scan "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js"
click node_inventory "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js"
click node_labels "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js"
click node_stockview "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js"
click node_reports "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js"
click node_backup "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js"
click node_access "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js"
click node_localdata "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js"
click node_config "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/firebase-config.js"
click node_rules "https://github.com/supoz9/boutique-solidaire-chappe/blob/main/firestore.rules"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_page,node_styling toneBlue
class node_app,node_scan,node_inventory,node_labels,node_stockview,node_firebase toneAmber
class node_reports,node_backup toneMint
class node_access,node_localdata,node_config,node_rules toneRose
class node_staff toneIndigo
```

## Components

### Staff interface

- [Tabbed interface](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/index.html): `index.html`
- [Mobile styling](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/style.css): `style.css`

### Stock operations

- [Application logic](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js): `app.js`
- [QR scanning](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js): `app.js`
- [Stock and movements](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js): `app.js`
- [QR labels](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js): `app.js`
- [Stock view](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js): `app.js`

### Reports and backup

- [Reports and CSV](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js): `app.js`
- [Backup and import](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js): `app.js`

### Data and access

- [PIN and sign-in](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js): `app.js`
- [Browser storage](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/app.js): `app.js`
- [Firebase settings](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/firebase-config.js): `firebase-config.js`
- [Firestore rules](https://github.com/supoz9/boutique-solidaire-chappe/blob/main/firestore.rules): `firestore.rules`

### Other components

- **Shop staff**
- **Firebase services**

## Connections

- Shop staff → Tabbed interface: uses (evidence: `README.md`)
- Tabbed interface → Application logic: provides interface (evidence: `README.md`)
- Tabbed interface → Mobile styling: styled by (evidence: `README.md`)
- Shop staff → QR scanning: scans items (evidence: `README.md`)
- Application logic → QR scanning: runs scanner (evidence: `app.js`)
- Application logic → Stock and movements: records changes (evidence: `app.js`)
- Shop staff → QR labels: prints labels (evidence: `README.md`)
- Shop staff → Stock view: views stock (evidence: `README.md`)
- Shop staff → Reports and CSV: views and exports (evidence: `README.md`)
- Shop staff → Backup and import: exports or imports (evidence: `README.md`)
- Application logic → Browser storage: stores locally (evidence: `README.md`)
- Application logic → Firebase services: reads and writes (evidence: `README.md`)
- Application logic → PIN and sign-in: checks access (evidence: `README.md`)
- Firebase settings → Firebase services: configures (evidence: `README.md`)
- Firestore rules → Firebase services: secures database (evidence: `README.md`)
