# Fileverse + rNotes Integration Research and proof-of-concept repo for integrating [Fileverse](https://github.com/fileverse) decentralization primitives into the rStack ecosystem (rNotes, rSpace). ## Goal Evaluate and prototype how Fileverse's AGPL-licensed components can enhance rNotes/rSpace with: - **E2E encryption** via `@fileverse/crypto` (or MIT equivalents) - **IPFS storage** for files/images (eliminating centralized storage) - **WebRTC P2P sync** for real-time collaboration - **Decentralized spreadsheets** via `@fileverse-dev/dsheet` ## Current rStack Architecture | Component | rnotes-online | rspace-online (rNotes module) | |-----------|--------------|-------------------------------| | CRDT | None | Automerge 2.2.8 | | Sync | REST only | WebSocket Automerge sync | | Offline | No | Full offline-first (IndexedDB) | | Encryption | TLS only | E2E (AES-256-GCM + HKDF) | | Real-time Collab | No | Yes (Automerge + Y.js) | | Editor | TipTap 3.19 | TipTap 3.20 + Y.js | | Auth | EncryptID | EncryptID + MCP | | Import | Markdown | 6 formats (Notion, Obsidian, Logseq, Google Docs, Evernote, Roam) | ## Fileverse Ecosystem | Package | Purpose | License | |---------|---------|---------| | [`@fileverse-dev/ddoc`](https://github.com/fileverse/fileverse-ddoc) | TipTap editor + Y.js CRDTs + WebRTC + E2E + IPFS | AGPL-3.0 | | [`@fileverse/crypto`](https://github.com/fileverse/fileverse-cryptography) | ECIES, NaCl SecretBox, Argon2id, HKDF | AGPL-3.0 | | [`collaboration-server`](https://github.com/fileverse/collaboration-server) | Y.js WebSocket relay, UCAN auth, ephemeral → IPFS | AGPL-3.0 | | [`fileverse-storage`](https://github.com/fileverse/fileverse-storage) | UCAN-authorized file uploads to IPFS | AGPL-3.0 | | [`@fileverse-dev/dsheet`](https://github.com/fileverse/fileverse-dsheet) | Decentralized spreadsheet (Y.js + WebRTC + IndexedDB) | AGPL-3.0 | ## Integration Priorities See [`docs/integration-plan.md`](docs/integration-plan.md) for the detailed plan. 1. **Crypto primitives evaluation** — Compare `@fileverse/crypto` vs rSpace's existing DocCrypto 2. **IPFS file storage** — POC for encrypted file uploads (resolves rNotes TASK-4) 3. **Collaboration server** — Self-host on Netcup for WebSocket relay 4. **dSheet module** — Prototype as `rsheet-online` in rStack ## Repo Structure ``` fileverse/ ├── docs/ # Research and architecture docs │ ├── integration-plan.md # Detailed integration roadmap │ ├── crypto-comparison.md # @fileverse/crypto vs DocCrypto analysis │ └── yjs-vs-automerge.md # CRDT framework decision ├── poc/ # Proof-of-concept implementations │ ├── crypto-eval/ # Encryption primitive benchmarks │ ├── ipfs-storage/ # IPFS file upload POC │ ├── collab-server/ # Self-hosted collaboration server │ └── dsheet-embed/ # dSheet React component POC └── README.md ``` ## License Considerations Fileverse repos are AGPL-3.0. Using their npm packages triggers copyleft for the combined work. Since rStack is open source on Gitea/GitHub, this is acceptable. For maximum flexibility, the crypto POC also evaluates MIT-licensed alternatives (Noble, StableLib, TweetNaCl) that provide equivalent primitives without AGPL obligations.