# marcosrosso2021-stack/cas- architecture

> Architecture diagram of the GitHub repository marcosrosso2021-stack/cas-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/marcosrosso2021-stack/cas-
- Repository: https://github.com/marcosrosso2021-stack/cas-

## Overview

casô is a construction-business app and local server for artisans, covering business records and synchronization alongside pricing, authentication, attendance, chat, 3D, and regulatory monitoring. The server is the clearest sampled runtime entry point: it serves the app and coordinates authentication, pricing, regulatory-watch routes, and push notifications. The tree also shows mobile geofencing and pointage features, but no sampled wiring from those features into the server. Edges are limited to relationships shown in excerpts, source-index references, or explicit source comments; several substantial features therefore remain unconnected.

Main entry points: [`serveur/server.js`](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/server.js) (App server), [`serveur/veille/index.js`](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/index.js) (Watch coordinator), [`android-app/native/CasoGeofencePlugin.java`](https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/native/CasoGeofencePlugin.java) (Android geofence plugin), [`serveur/auth.js`](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/auth.js) (Account auth)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server["Server services"]
  node_server["App server<br/>[server.js]"]
  node_records[("Synced records<br/>[server.js]")]
  node_auth["Account auth<br/>[auth.js]"]
  node_pricing["Material pricing<br/>[prix.js]"]
  node_push["Web push<br/>[webpush.js]"]
end

subgraph group_veille["Regulatory watch"]
  node_watch["Watch coordinator<br/>[index.js]"]
  node_sources["Source collector<br/>[sources.js]"]
  node_watchdb[("Watch store<br/>[base.js]")]
  node_verification["Text verification<br/>[verif.js]"]
  node_watchcontrol["Review controls<br/>[controle.js]"]
  node_analysis["Regulatory analysis<br/>[analyse.js]"]
end

subgraph group_assistant["Chat and intelligence"]
  node_chatbrain["Chat reasoning<br/>[brain.js]"]
  node_chatengine["Chat engine<br/>[engine.js]"]
  node_constructionchat["Construction chat<br/>[chantier.js]"]
  node_mini["Mini assistant<br/>[caso-mini.js]"]
  node_trainingdata["Mini training data<br/>[gen-data.js]"]
end

subgraph group_mobile["Mobile and field"]
  node_attendance["Pointage features<br/>[pointage-auto.js]"]
  node_androidapp["Android activity<br/>[MainActivity.java]"]
  node_androidplugin["Android geofence plugin"]
  node_geofencehelper["Geofence helper"]
  node_geofencereceiver["Geofence receiver"]
  node_iosplugin["iOS geofence plugin"]
  node_geocore["iOS geofence core<br/>[CasoGeoCore.swift]"]
end

node_artisan(("Artisan user"))
node_identity["Identity providers"]
node_shopping["Shopping search"]

node_artisan -->|"uses app"| node_server
node_server -->|"syncs records"| node_records
node_server -->|"routes auth"| node_auth
node_auth -->|"federates login"| node_identity
node_server -->|"routes pricing"| node_pricing
node_pricing -->|"searches offers"| node_shopping
node_server -->|"uses push"| node_push
node_server -->|"routes watch"| node_watch
node_watch -->|"collects from"| node_sources
node_watch -->|"stores results"| node_watchdb
node_watch -->|"verifies texts"| node_verification
node_watch -->|"classifies texts"| node_watchcontrol
node_watch -->|"analyzes texts"| node_analysis
node_trainingdata -->|"reuses features"| node_mini
node_androidapp -->|"registers plugin"| node_androidplugin
node_androidplugin -->|"registers zones"| node_geofencehelper
node_androidplugin -->|"dispatches events"| node_geofencereceiver
node_iosplugin -->|"delegates methods"| node_geocore

click node_server "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/server.js"
click node_records "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/server.js"
click node_auth "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/auth.js"
click node_pricing "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/prix.js"
click node_push "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/webpush.js"
click node_watch "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/index.js"
click node_sources "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/sources.js"
click node_watchdb "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/base.js"
click node_verification "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/verif.js"
click node_watchcontrol "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/controle.js"
click node_analysis "https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/analyse.js"
click node_chatbrain "https://github.com/marcosrosso2021-stack/cas-/blob/main/chat/brain.js"
click node_chatengine "https://github.com/marcosrosso2021-stack/cas-/blob/main/chat/engine.js"
click node_constructionchat "https://github.com/marcosrosso2021-stack/cas-/blob/main/chat/chantier.js"
click node_mini "https://github.com/marcosrosso2021-stack/cas-/blob/main/chat/caso-mini.js"
click node_trainingdata "https://github.com/marcosrosso2021-stack/cas-/blob/main/outils/mini/gen-data.js"
click node_attendance "https://github.com/marcosrosso2021-stack/cas-/blob/main/pointage/pointage-auto.js"
click node_androidapp "https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/native/MainActivity.java"
click node_androidplugin "https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/native/CasoGeofencePlugin.java"
click node_geofencehelper "https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/native/GeofenceHelper.java"
click node_geofencereceiver "https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/native/GeofenceReceiver.java"
click node_iosplugin "https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/plugins/caso-geofence/ios/Sources/CasoGeofencePlugin/CasoGeofencePlugin.swift"
click node_geocore "https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/plugins/caso-geofence/ios/Sources/CasoGeofencePlugin/CasoGeoCore.swift"

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_server,node_records,node_auth,node_pricing,node_push,node_artisan toneBlue
class node_watch,node_sources,node_watchdb,node_verification,node_watchcontrol,node_analysis toneAmber
class node_chatbrain,node_chatengine,node_constructionchat,node_mini,node_trainingdata toneMint
class node_attendance,node_androidapp,node_androidplugin,node_geofencehelper,node_geofencereceiver,node_iosplugin,node_geocore toneRose
class node_identity,node_shopping toneIndigo
```

## Components

### Server services

- [App server](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/server.js): `serveur/server.js`
- [Synced records](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/server.js): `serveur/server.js`
- [Account auth](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/auth.js): `serveur/auth.js`
- [Material pricing](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/prix.js): `serveur/prix.js`
- [Web push](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/webpush.js): `serveur/webpush.js`

### Regulatory watch

- [Watch coordinator](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/index.js): `serveur/veille/index.js`
- [Source collector](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/sources.js): `serveur/veille/sources.js`
- [Watch store](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/base.js): `serveur/veille/base.js`
- [Text verification](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/verif.js): `serveur/veille/verif.js`
- [Review controls](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/controle.js): `serveur/veille/controle.js`
- [Regulatory analysis](https://github.com/marcosrosso2021-stack/cas-/blob/main/serveur/veille/analyse.js): `serveur/veille/analyse.js`

### Chat and intelligence

- [Chat reasoning](https://github.com/marcosrosso2021-stack/cas-/blob/main/chat/brain.js): `chat/brain.js`
- [Chat engine](https://github.com/marcosrosso2021-stack/cas-/blob/main/chat/engine.js): `chat/engine.js`
- [Construction chat](https://github.com/marcosrosso2021-stack/cas-/blob/main/chat/chantier.js): `chat/chantier.js`
- [Mini assistant](https://github.com/marcosrosso2021-stack/cas-/blob/main/chat/caso-mini.js): `chat/caso-mini.js`
- [Mini training data](https://github.com/marcosrosso2021-stack/cas-/blob/main/outils/mini/gen-data.js): `outils/mini/gen-data.js`

### Mobile and field

- [Pointage features](https://github.com/marcosrosso2021-stack/cas-/blob/main/pointage/pointage-auto.js): `pointage/pointage-auto.js`
- [Android activity](https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/native/MainActivity.java): `android-app/native/MainActivity.java`
- [Android geofence plugin](https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/native/CasoGeofencePlugin.java): `android-app/native/CasoGeofencePlugin.java`
- [Geofence helper](https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/native/GeofenceHelper.java): `android-app/native/GeofenceHelper.java`
- [Geofence receiver](https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/native/GeofenceReceiver.java): `android-app/native/GeofenceReceiver.java`
- [iOS geofence plugin](https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/plugins/caso-geofence/ios/Sources/CasoGeofencePlugin/CasoGeofencePlugin.swift): `android-app/plugins/caso-geofence/ios/Sources/CasoGeofencePlugin/CasoGeofencePlugin.swift`
- [iOS geofence core](https://github.com/marcosrosso2021-stack/cas-/blob/main/android-app/plugins/caso-geofence/ios/Sources/CasoGeofencePlugin/CasoGeoCore.swift): `android-app/plugins/caso-geofence/ios/Sources/CasoGeofencePlugin/CasoGeoCore.swift`

### Other components

- **Artisan user**
- **Identity providers**
- **Shopping search**

## Connections

- Artisan user → App server: uses app (evidence: `serveur/server.js`)
- App server → Synced records: syncs records (evidence: `serveur/server.js`)
- App server → Account auth: routes auth (evidence: `serveur/server.js`)
- Account auth → Identity providers: federates login (evidence: `serveur/auth.js`)
- App server → Material pricing: routes pricing (evidence: `serveur/server.js`)
- Material pricing → Shopping search: searches offers (evidence: `serveur/prix.js`)
- App server → Web push: uses push (evidence: `serveur/server.js`)
- App server → Watch coordinator: routes watch (evidence: `serveur/server.js`)
- Watch coordinator → Source collector: collects from (evidence: `serveur/veille/index.js`)
- Watch coordinator → Watch store: stores results (evidence: `serveur/veille/index.js`)
- Watch coordinator → Text verification: verifies texts (evidence: `serveur/veille/index.js`)
- Watch coordinator → Review controls: classifies texts (evidence: `serveur/veille/index.js`)
- Watch coordinator → Regulatory analysis: analyzes texts (evidence: `serveur/veille/index.js`)
- Mini training data → Mini assistant: reuses features (evidence: `outils/mini/gen-data.js`)
- Android activity → Android geofence plugin: registers plugin (evidence: `android-app/native/MainActivity.java`)
- Android geofence plugin → Geofence helper: registers zones (evidence: `android-app/native/CasoGeofencePlugin.java`)
- Android geofence plugin → Geofence receiver: dispatches events (evidence: `android-app/native/CasoGeofencePlugin.java`)
- iOS geofence plugin → iOS geofence core: delegates methods (evidence: `android-app/plugins/caso-geofence/ios/Sources/CasoGeofencePlugin/CasoGeofencePlugin.swift`)
