Repository Public
1<!--2MacLustr Storage Node3File: README.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# MacLustr Storage Node89<!-- spb-readme-showcase:begin -->10<p align="center">11<a href="https://storage.spboucher.ai"><img alt="storage.spboucher.ai" src="https://img.shields.io/website?url=https%3A%2F%2Fstorage.spboucher.ai&label=storage.spboucher.ai&style=for-the-badge&up_message=online&down_message=offline"></a>12<img alt="platform" src="https://img.shields.io/badge/platform-Node.js%20%C2%B7%20iOS-111827?style=for-the-badge">13<a href="https://spboucher.ai"><img alt="author" src="https://img.shields.io/badge/author-Simon--Pierre%20Boucher-0A66C2?style=for-the-badge"></a>14</p>1516<p align="center">17<img alt="Node.js" src="https://img.shields.io/badge/Node.js-339933?style=flat-square&logo=nodedotjs&logoColor=white">18<img alt="Python" src="https://img.shields.io/badge/Python-3776AB?style=flat-square&logo=python&logoColor=white">19<img alt="Swift" src="https://img.shields.io/badge/Swift-F05138?style=flat-square&logo=swift&logoColor=white">20<img alt="iOS" src="https://img.shields.io/badge/iOS-16.0%2B-000000?style=flat-square&logo=apple&logoColor=white">21<img alt="XcodeGen" src="https://img.shields.io/badge/XcodeGen-project.yml-8A2BE2?style=flat-square">22<img alt="Shell" src="https://img.shields.io/badge/Shell-5%20scripts-4EAA25?style=flat-square&logo=gnubash&logoColor=white">23</p>2425<p align="center">26<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="commits" src="https://git.spboucher.ai/badge/maclustr-storage-ios/commits.svg?style=flat-square&color=2563eb"></a>27<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="last-commit" src="https://git.spboucher.ai/badge/maclustr-storage-ios/last-commit.svg?style=flat-square&color=16a34a"></a>28<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="activity" src="https://git.spboucher.ai/badge/maclustr-storage-ios/activity.svg?style=flat-square"></a>29<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="language" src="https://git.spboucher.ai/badge/maclustr-storage-ios/language.svg?style=flat-square"></a>30<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="languages" src="https://git.spboucher.ai/badge/maclustr-storage-ios/languages.svg?style=flat-square"></a>31<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="size" src="https://git.spboucher.ai/badge/maclustr-storage-ios/size.svg?style=flat-square&color=0891b2"></a>32<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="branches" src="https://git.spboucher.ai/badge/maclustr-storage-ios/branches.svg?style=flat-square&color=ca8a04"></a>33<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="tags" src="https://git.spboucher.ai/badge/maclustr-storage-ios/tags.svg?style=flat-square&color=db2777"></a>34<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="license" src="https://git.spboucher.ai/badge/maclustr-storage-ios/license.svg?style=flat-square&color=475569"></a>35<a href="https://git.spboucher.ai/maclustr-storage-ios"><img alt="clones" src="https://git.spboucher.ai/badge/maclustr-storage-ios/clones.svg?style=flat-square&color=7c3aed"></a>36</p>3738<p align="center">39<img alt="Tracked files" src="https://img.shields.io/badge/Tracked%20files-88-0f766e?style=flat-square">40<img alt="lines of code" src="https://img.shields.io/badge/lines%20of%20code-8%20225-b45309?style=flat-square">41<img alt="languages" src="https://img.shields.io/badge/languages-5-6d28d9?style=flat-square">42<img alt="test files" src="https://img.shields.io/badge/test%20files-3-15803d?style=flat-square">43<img alt="docs" src="https://img.shields.io/badge/docs-10%20pages-1d4ed8?style=flat-square">44<img alt="screenshots" src="https://img.shields.io/badge/screenshots-8-be185d?style=flat-square">45</p>4647### Screenshots4849<table>50<tr>51<td align="center" valign="top"><a href="docs/screenshots/ios/ipad-dashboard.png"><img src="docs/screenshots/ios/ipad-dashboard.png" width="190" alt="ipad dashboard"></a><br><sub>ipad dashboard</sub></td>52<td align="center" valign="top"><a href="docs/screenshots/ios/iphone-dashboard.png"><img src="docs/screenshots/ios/iphone-dashboard.png" width="190" alt="iphone dashboard"></a><br><sub>iphone dashboard</sub></td>53<td align="center" valign="top"><a href="docs/screenshots/ios/ipad-onboarding.png"><img src="docs/screenshots/ios/ipad-onboarding.png" width="190" alt="ipad onboarding"></a><br><sub>ipad onboarding</sub></td>54</tr>55<tr>56<td align="center" valign="top"><a href="docs/screenshots/dashboard/20-mobile-storage-real-coordinator-local-stack.png"><img src="docs/screenshots/dashboard/20-mobile-storage-real-coordinator-local-stack.png" width="190" alt="20 mobile storage real coordinator local"></a><br><sub>20 mobile storage real coordinator local</sub></td>57<td align="center" valign="top"><a href="docs/screenshots/ios/iphone-activity.png"><img src="docs/screenshots/ios/iphone-activity.png" width="190" alt="iphone activity"></a><br><sub>iphone activity</sub></td>58<td align="center" valign="top"><a href="docs/screenshots/ios/iphone-allocation.png"><img src="docs/screenshots/ios/iphone-allocation.png" width="190" alt="iphone allocation"></a><br><sub>iphone allocation</sub></td>59</tr>60</table>61<!-- spb-readme-showcase:end -->6263**Every device becomes storage.** A native iOS / iPadOS app with one function: lend part of an iPhone's or iPad's free64storage to the MacLustr cluster. The device receives encrypted fragments of cluster data, keeps them in its private65container, proves it still has them, and returns them on request. It cannot read them.6667This repository holds the app, the storage coordinator it talks to, the protocol between them and the documentation.6869| | |70|---|---|71| App | `MacLustrStorageNode/` — Swift, SwiftUI, iOS 16+, iPhone and iPad, no third-party code. Bundle `ai.spboucher.maclustr.storage` |72| Coordinator | `server/` — storage coordinator and mobile gateway, `https://storage.spboucher.ai`. Node ≥ 24, no dependency |73| Protocol | MSP/1 — [docs/MSP-1.md](docs/MSP-1.md) |74| Dashboard | "Mobile Storage Nodes" in MacLustr Command Center (`clustr.spboucher.ai`, repository `maclustr-command-center`) |7576## State on 2026-12-017778Working, verified with the real app in the iOS simulator against the production coordinator: pairing, capacity reporting,79storing and returning fragments with matching SHA-256, recovery of a lost stable copy from a device, detection of80corruption, drain, emergency release, revocation, coordinator restarts. Build 1.0.0 (1) is on TestFlight (internal).8182**Not yet done: any test on a physical iPhone or iPad.** Behaviour under real iOS suspension, screen lock, reboot,83cellular, heat and the local-network path is implemented and untested. See [docs/TEST-REPORT.md](docs/TEST-REPORT.md),84which lists every case and its real status, and [docs/IOS-LIMITS.md](docs/IOS-LIMITS.md) for what iOS allows.8586## How it works, in short8788- The cluster encrypts (AES-256-GCM) and cuts objects into fragments named by their SHA-256, and **always keeps its own89 stable copy**. Phones hold additional copies (`mobile_opportunistic` class). A phone may disappear at any time without loss.90- The phone opens every connection (works behind NAT and on cellular). Requests are signed by a device key generated in91 the Secure Enclave. On the cluster's Wi-Fi the app talks to the coordinator directly (Bonjour + pinned certificate).92- The user chooses a quota; a reserve (larger of 20 GB and 10 % of the device) is never touched; nothing is pre-allocated.93- The coordinator can ask four things only: store, prove, return, delete.9495## Documents9697| | |98|---|---|99| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | audit of MacLustr, components, storage classes, engine, erasure-coding study, known limits |100| [docs/MSP-1.md](docs/MSP-1.md) | the protocol |101| [docs/API.md](docs/API.md) | coordinator admin API |102| [docs/INTEGRATION.md](docs/INTEGRATION.md) | deployment, operations, `mlstore`, Apple release |103| [docs/IOS-LIMITS.md](docs/IOS-LIMITS.md) | iOS constraints and the app's modes |104| [docs/TEST-REPORT.md](docs/TEST-REPORT.md) · [docs/BENCHMARKS.md](docs/BENCHMARKS.md) | what was tested and measured, and what was not |105| [SECURITY.md](SECURITY.md) · [CHANGELOG.md](CHANGELOG.md) · [CLAUDE.md](CLAUDE.md) | |106107Screenshots: `docs/screenshots/ios/` (simulator, real data from the production coordinator) and108`docs/screenshots/dashboard/` (fixtures, labelled).109110## Build and test111112```bash113xcodegen generate114xcodebuild -project MacLustrStorageNode.xcodeproj -scheme MacLustrStorageNode -destination 'platform=iOS Simulator,name=iPhone 17 Pro' test115node server/test/e2e.ts # coordinator, 54 checks116Scripts/release.sh all && python3 Scripts/testflight.py --apply117```118119Debug builds accept launch arguments for scripted runs on the simulator: `-PairingCode <code> -QuotaGB <n> -Tab <0-3>120-Station YES`.121122Author: Simon-Pierre Boucher — contact@spboucher.ai123124125<!-- spb-readme-overview:begin -->126## Repository layout127128```text129maclustr-storage-ios/130├── docs/ 20 files documentation131│ └── screenshots/ 13132├── MacLustrStorageNode/ 33 files133│ ├── App/ 3134│ ├── Core/ 12135│ ├── Features/ 8136│ ├── Models/ 1137│ ├── Resources/ 8138│ └── Services/ 1139├── MacLustrStorageNode.xcodeproj/ 3 files140│ ├── project.xcworkspace/ 1141│ └── xcshareddata/ 1142├── MacLustrStorageNodeTests/ 1 file143├── Scripts/ 10 files scripts144│ ├── __pycache__/ 1145│ └── portal/ 4146├── server/ 14 files server147│ ├── bin/ 1148│ ├── scripts/ 2149│ ├── src/ 8150│ └── test/ 2151├── CHANGELOG.md152├── CLAUDE.md153├── project.yml154├── README.md155└── SECURITY.md156```157158## Languages159160| Language | Files | Lines | Share |161|---|---:|---:|---|162| Swift | 27 | 5 471 | `█████████████ ` 66.5 % |163| TypeScript | 11 | 2 138 | `█████ ` 26.0 % |164| Shell | 5 | 320 | `█ ` 3.9 % |165| Python | 2 | 175 | `█ ` 2.1 % |166| JavaScript | 2 | 121 | `█ ` 1.5 % |167168<sub>Counted on git-tracked files, excluding dependencies and generated files.</sub>169170## Repository facts171172| | |173|---|---|174| First commit | 2026-12-01 |175| Contributors | 1 |176| Default branch | `main` |177| Tracked files | 88 |178| Website | https://storage.spboucher.ai |179| Topics | `ios` `swift` `swiftui` `distributed-storage` `maclustr` `storage-node` `typescript` `protocol` |180| Clone | `git clone https://git.spboucher.ai/maclustr-storage-ios.git` |181<!-- spb-readme-overview:end -->182183<!-- spb-readme-author:begin -->184## Author185186**Simon-Pierre Boucher** · [spboucher.ai](https://spboucher.ai) · [contact@spboucher.ai](mailto:contact@spboucher.ai)187<!-- spb-readme-author:end -->188