SPB Git

Repository Public

README.md 14.2 KB 225 lines markdown

1# MacLustr SMS Gateway23<!-- spb-readme-showcase:begin -->4<p align="center">5<a href="https://sms.spboucher.ai"><img alt="sms.spboucher.ai" src="https://img.shields.io/website?url=https%3A%2F%2Fsms.spboucher.ai&label=sms.spboucher.ai&style=for-the-badge&up_message=online&down_message=offline"></a>6<img alt="platform" src="https://img.shields.io/badge/platform-Web%20%C2%B7%20iOS%20%C2%B7%20Android-111827?style=for-the-badge">7<a href="https://spboucher.ai"><img alt="author" src="https://img.shields.io/badge/author-Simon--Pierre%20Boucher-0A66C2?style=for-the-badge"></a>8</p>910<p align="center">11<img alt="Node.js" src="https://img.shields.io/badge/Node.js-%E2%89%A5%2022-339933?style=flat-square&logo=nodedotjs&logoColor=white">12<img alt="React" src="https://img.shields.io/badge/React-19.3.1-149ECA?style=flat-square&logo=react&logoColor=white">13<img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-7.0.2-3178C6?style=flat-square&logo=typescript&logoColor=white">14<img alt="Vite" src="https://img.shields.io/badge/Vite-8.3.8-646CFF?style=flat-square&logo=vite&logoColor=white">15<img alt="Fastify" src="https://img.shields.io/badge/Fastify-5.12.8-000000?style=flat-square&logo=fastify&logoColor=white">16<img alt="Playwright" src="https://img.shields.io/badge/Playwright-1.65.1-2EAD33?style=flat-square&logo=playwright&logoColor=white">17<img alt="WebSocket" src="https://img.shields.io/badge/WebSocket-8.23.0-555555?style=flat-square">18<img alt="Zod" src="https://img.shields.io/badge/Zod-4.6.7-3E67B1?style=flat-square&logo=zod&logoColor=white">19<img alt="Python" src="https://img.shields.io/badge/Python-%E2%89%A5%203.9-3776AB?style=flat-square&logo=python&logoColor=white">20<img alt="Swift" src="https://img.shields.io/badge/Swift-5.9-F05138?style=flat-square&logo=swift&logoColor=white">21<img alt="iOS" src="https://img.shields.io/badge/iOS-18.0%2B-000000?style=flat-square&logo=apple&logoColor=white">22<img alt="XcodeGen" src="https://img.shields.io/badge/XcodeGen-project.yml-8A2BE2?style=flat-square">23<img alt="Kotlin" src="https://img.shields.io/badge/Kotlin-2.4.21-7F52FF?style=flat-square&logo=kotlin&logoColor=white">24<img alt="Android" src="https://img.shields.io/badge/Android-SDK%2037-34A853?style=flat-square&logo=android&logoColor=white">25<img alt="minSdk" src="https://img.shields.io/badge/minSdk-31-34A853?style=flat-square">26<img alt="Jetpack Compose" src="https://img.shields.io/badge/Jetpack%20Compose-4285F4?style=flat-square&logo=jetpackcompose&logoColor=white">27<img alt="Gradle" src="https://img.shields.io/badge/Gradle-02303A?style=flat-square&logo=gradle&logoColor=white">28<img alt="SQL" src="https://img.shields.io/badge/SQL-4%20files-336791?style=flat-square">29</p>3031<p align="center">32<a href="https://git.spboucher.ai/maclustr-sms"><img alt="commits" src="https://git.spboucher.ai/badge/maclustr-sms/commits.svg?style=flat-square&color=2563eb"></a>33<a href="https://git.spboucher.ai/maclustr-sms"><img alt="last-commit" src="https://git.spboucher.ai/badge/maclustr-sms/last-commit.svg?style=flat-square&color=16a34a"></a>34<a href="https://git.spboucher.ai/maclustr-sms"><img alt="activity" src="https://git.spboucher.ai/badge/maclustr-sms/activity.svg?style=flat-square"></a>35<a href="https://git.spboucher.ai/maclustr-sms"><img alt="language" src="https://git.spboucher.ai/badge/maclustr-sms/language.svg?style=flat-square"></a>36<a href="https://git.spboucher.ai/maclustr-sms"><img alt="languages" src="https://git.spboucher.ai/badge/maclustr-sms/languages.svg?style=flat-square"></a>37<a href="https://git.spboucher.ai/maclustr-sms"><img alt="size" src="https://git.spboucher.ai/badge/maclustr-sms/size.svg?style=flat-square&color=0891b2"></a>38<a href="https://git.spboucher.ai/maclustr-sms"><img alt="branches" src="https://git.spboucher.ai/badge/maclustr-sms/branches.svg?style=flat-square&color=ca8a04"></a>39<a href="https://git.spboucher.ai/maclustr-sms"><img alt="tags" src="https://git.spboucher.ai/badge/maclustr-sms/tags.svg?style=flat-square&color=db2777"></a>40<a href="https://git.spboucher.ai/maclustr-sms"><img alt="license" src="https://git.spboucher.ai/badge/maclustr-sms/license.svg?style=flat-square&color=475569"></a>41<a href="https://git.spboucher.ai/maclustr-sms"><img alt="clones" src="https://git.spboucher.ai/badge/maclustr-sms/clones.svg?style=flat-square&color=7c3aed"></a>42</p>4344<p align="center">45<img alt="Fichiers suivis" src="https://img.shields.io/badge/Fichiers%20suivis-264-0f766e?style=flat-square">46<img alt="lignes de code" src="https://img.shields.io/badge/lignes%20de%20code-20%20461-b45309?style=flat-square">47<img alt="langages" src="https://img.shields.io/badge/langages-9-6d28d9?style=flat-square">48<img alt="fichiers de test" src="https://img.shields.io/badge/fichiers%20de%20test-13-15803d?style=flat-square">49<img alt="docs" src="https://img.shields.io/badge/docs-19%20pages-1d4ed8?style=flat-square">50<img alt="captures" src="https://img.shields.io/badge/captures-69-be185d?style=flat-square">51</p>5253### Aperçu5455<table>56<tr>57<td align="center" valign="top"><a href="docs/captures/android/01-presentation.png"><img src="docs/captures/android/01-presentation.png" width="190" alt="01 presentation"></a><br><sub>01 presentation</sub></td>58<td align="center" valign="top"><a href="docs/captures/android/10-dashboard-clair.png"><img src="docs/captures/android/10-dashboard-clair.png" width="190" alt="10 dashboard clair"></a><br><sub>10 dashboard clair</sub></td>59<td align="center" valign="top"><a href="docs/captures/android/10-dashboard-controle.png"><img src="docs/captures/android/10-dashboard-controle.png" width="190" alt="10 dashboard controle"></a><br><sub>10 dashboard controle</sub></td>60</tr>61<tr>62<td align="center" valign="top"><a href="docs/captures/dashboard/01-messages.png"><img src="docs/captures/dashboard/01-messages.png" width="290" alt="01 messages"></a><br><sub>01 messages</sub></td>63<td align="center" valign="top"><a href="docs/captures/dashboard/17-overview-sombre.png"><img src="docs/captures/dashboard/17-overview-sombre.png" width="290" alt="17 overview sombre"></a><br><sub>17 overview sombre</sub></td>64<td align="center" valign="top"><a href="docs/captures/dashboard/18-overview-clair.png"><img src="docs/captures/dashboard/18-overview-clair.png" width="290" alt="18 overview clair"></a><br><sub>18 overview clair</sub></td>65</tr>66</table>67<!-- spb-readme-showcase:end -->6869Passerelle SMS privée du cluster MacLustr : vos applications, scripts et agents envoient et reçoivent de **vrais SMS** par un téléphone70Android dédié et sa carte SIM ou eSIM, à travers une API maison. Aucun fournisseur SMS externe.7172**https://sms.spboucher.ai** — API `/v1`, tableau de bord, téléchargement de l'application Android (`/apps`).7374```bash75curl -X POST https://sms.spboucher.ai/v1/messages \76  -H "Authorization: Bearer $MACLUSTR_SMS_API_KEY" -H "Content-Type: application/json" \77  -H "Idempotency-Key: $(uuidgen)" \78  -d '{ "to": "+14185550123", "text": "Message envoyé depuis MacLustr." }'79```8081## État (2026-11-30)8283| Composant | État |84|---|---|85| Backend, API, file, webhooks | en production sur M2U64, testé (48 tests d'intégration) |86| Tableau de bord | en production, testé dans un vrai navigateur (9 parcours) |87| Application Android 1.0.0 | APK signé publié ; vérifiée sur **émulateur** |88| SDK Python, TypeScript, Swift ; CLI | livrés, testés de bout en bout contre un vrai serveur |89| **Envoi réel sur le réseau cellulaire** | **non validé** : aucun téléphone physique n'a encore été associé |9091La V1 n'est déclarée opérationnelle qu'après la validation physique décrite dans [docs/PRODUCTION_READINESS.md](docs/PRODUCTION_READINESS.md).9293## Démarrer94951. **Administrateur** : ouvrir le lien d'enrôlement émis sur le nœud (`admin-cli enroll`), créer sa clé d'accès.962. **Téléphone** : installer l'APK depuis `/apps`, accorder les permissions, **Devices → Associer un appareil**. → [ANDROID_SETUP](docs/ANDROID_SETUP.md), [DEVICE_PAIRING](docs/DEVICE_PAIRING.md), [SIM_ESIM_GUIDE](docs/SIM_ESIM_GUIDE.md)973. **SIM** : dans **SIM Cards**, autoriser l'envoi ; dans **Settings**, ajouter son propre numéro aux destinataires autorisés.984. **Application cliente** : **API Keys → Nouvelle application → Nouvelle clé**, puis l'API, un SDK ou la CLI. → [API_REFERENCE](docs/API_REFERENCE.md), [SDK_GUIDE](docs/SDK_GUIDE.md), [WEBHOOKS](docs/WEBHOOKS.md)99100## Ce que fait la passerelle101102- File d'attente persistante, statuts explicites, idempotence, annulation avant transmission.103- Distinction stricte entre « remis au réseau » et « livré » ; une issue ambiguë devient `unknown` et n'est **jamais** renvoyée automatiquement.104- Réception des SMS, conversations, webhooks signés HMAC-SHA256.105- Codes de vérification par SMS pour l'authentification des applications (préparé, branché sur aucune application).106- Plusieurs téléphones et plusieurs SIM, sans jamais changer de numéro expéditeur en silence.107- Garde-fous : arrêt d'urgence, liste de destinataires autorisés (par défaut), désinscription par STOP, consentements, quotas par application108  et par SIM, approbation humaine pour les agents IA.109- Contenus chiffrés au repos, absents des journaux ; sauvegardes chiffrées avec test de restauration quotidien et copie hors nœud.110111## Ce qu'elle ne fait pas112113Pas de MMS ni de RCS, pas d'expéditeur alphanumérique, pas d'envoi en masse : le débit est celui d'un téléphone (un SMS toutes les1143 secondes par défaut) et d'un forfait grand public, dont les conditions d'usage s'appliquent. La livraison n'est confirmée que si115l'opérateur renvoie un rapport. Elle ne crée ni n'installe d'eSIM. Respecter la loi canadienne antipourriel reste à la charge de celui qui envoie.116117## Dépôt118119```text120backend/      serveur (Fastify, PostgreSQL, WebSocket)      backend/tests/   tests d'intégration121dashboard/    tableau de bord (React)                        dashboard/e2e/   tests navigateur122android/      application MacLustr SMS (Kotlin, Compose)     android/tests/   passerelle factice d'essai123sdk/          python · typescript · swift                    cli/             maclustr-sms124deployment/   manifeste mld, mise à jour, copie hors nœud    scripts/         build, sauvegarde, restauration, APK125docs/         documentation                                  releases/        manifeste de version de l'APK126```127128## Développer129130```bash131pnpm install132createdb maclustr_sms_dev maclustr_sms_test maclustr_sms_ui_test133SMS_DATA_KEY=$(openssl rand -base64 32) pnpm dev:server        # http://localhost:8751134pnpm dev:dashboard                                              # http://localhost:5193135pnpm typecheck && pnpm test                                     # tests d'intégration (vrai serveur, vraie base, téléphone simulé)136pnpm build && npx playwright test -c dashboard/e2e/playwright.config.ts137cd android && ./gradlew test lint assembleDebug138```139140## Documentation141142[Architecture](docs/ARCHITECTURE.md) · [Protocole appareil](docs/PROTOCOL.md) · [API](docs/API_REFERENCE.md) · [Webhooks](docs/WEBHOOKS.md) ·143[Authentification par SMS](docs/VERIFY.md) · [SDK et CLI](docs/SDK_GUIDE.md) · [Android](docs/ANDROID_SETUP.md) · [Association](docs/DEVICE_PAIRING.md) · [SIM et eSIM](docs/SIM_ESIM_GUIDE.md) ·144[Sécurité](docs/SECURITY.md) · [Déploiement](docs/DEPLOYMENT.md) · [Dépannage](docs/TROUBLESHOOTING.md) · [Audit d'infrastructure](docs/INFRASTRUCTURE_AUDIT.md) ·145[Rapport de tests](docs/TEST_REPORT.md) · [Préparation à la production](docs/PRODUCTION_READINESS.md) · [Journal des versions](CHANGELOG.md) · [Avancement](PROGRESS.md)146147*MacLustr SMS — Your infrastructure. Your network. Your messages.*148149150<!-- spb-readme-overview:begin -->151## Arborescence du dépôt152153```text154maclustr-sms/155├── android/                    46 fichiers  app Android156│   ├── app/                    35157│   ├── gradle/                  2158│   └── tests/                   4159├── backend/                    32 fichiers  serveur applicatif160│   ├── migrations/              4161│   ├── src/                    26162│   └── tests/                   2163├── cli/                         3 fichiers164│   └── tests/                   1165├── dashboard/                  13 fichiers166│   ├── e2e/                     2167│   ├── public/                  1168│   └── src/                     9169├── deployment/                  4 fichiers170├── docs/                       85 fichiers  documentation171│   └── captures/               69172├── ios/                        51 fichiers  app iOS173│   ├── MacLustrSMS/            39174│   └── Scripts/                10175├── releases/                    1 fichier176├── scripts/                     6 fichiers  scripts177├── sdk/                        13 fichiers  SDK178│   ├── python/                  4179│   ├── swift/                   4180│   ├── tests-e2e/               1181│   └── typescript/              4182├── CHANGELOG.md183├── CLAUDE.md184├── package.json185├── PROGRESS.md186├── README.md187├── tsconfig.json188└── vite.config.ts189```190191## Langages192193| Langage | Fichiers | Lignes | Part |194|---|---:|---:|---|195| TypeScript | 41 | 6 363 | `██████              ` 31.1 % |196| Swift | 27 | 6 131 | `██████              ` 30.0 % |197| Kotlin | 24 | 4 343 | `████                ` 21.2 % |198| JavaScript | 7 | 1 328 | `█                   ` 6.5 % |199| Python | 5 | 1 003 | `█                   ` 4.9 % |200| Shell | 12 | 749 | `█                   ` 3.7 % |201| SQL | 4 | 421 | `█                   ` 2.1 % |202| CSS | 1 | 108 | `█                   ` 0.5 % |203| … 1 autres | | 15 | 0.1 % |204205<sub>Compté sur les fichiers suivis par git, hors dépendances et fichiers générés.</sub>206207## Fiche du dépôt208209| | |210|---|---|211| Premier commit | 2026-11-30 |212| Contributeurs | 1 |213| Branche par défaut | `main` |214| Fichiers suivis | 264 |215| Site | https://sms.spboucher.ai |216| Sujets | `sms` `sms-gateway` `android` `kotlin` `typescript` `api` `webhooks` `ios` `swift` `maclustr` |217| Cloner | `git clone https://git.spboucher.ai/maclustr-sms.git` |218<!-- spb-readme-overview:end -->219220<!-- spb-readme-author:begin -->221## Author222223**Simon-Pierre Boucher** · [spboucher.ai](https://spboucher.ai) · [contact@spboucher.ai](mailto:contact@spboucher.ai)224<!-- spb-readme-author:end -->225
Files main
Menu

Theme