Example: Research Archive
A real-world decentralized academic publishing platform built on Cascade.
Overview
The Lumera Research Archive is an open-source decentralized academic publishing platform that demonstrates a production-grade integration with Cascade. It supports:
- Public paper publishing — permanently archived on Cascade
- Encrypted private drafts — wallet-based encryption with XChaCha20-Poly1305
- Secure collaboration — share draft access via wallet-derived key exchange
- Discovery — papers indexed via Lumescope, the Cascade action indexer
Tech Stack
| Component | Technology |
|---|---|
| Runtime | Vite (vanilla TypeScript SPA) |
| Blockchain SDK | @lumera-protocol/sdk-js v0.2.7 |
| Cosmos | @cosmjs/proto-signing, @cosmjs/stargate |
| Encryption | libsodium-wrappers-sumo (XChaCha20-Poly1305) |
| Wallet | Keplr browser extension |
| Indexer | Lumescope API |
| Chain | lumera-testnet-2 |
Architecture
Key design decision: no backend server. The entire application runs in the browser, communicating directly with the Lumera blockchain via RPC and with the SN-API for file storage.
Three Types of Cascade Files
The app stores three distinct file types on Cascade, distinguished by filename conventions:
1. Published Papers
Public, unencrypted academic papers permanently archived on Cascade:
2. Encrypted Drafts
Private drafts encrypted with a per-document key:
3. Collaboration Invitations
Key-exchange files that grant draft access to collaborators:
Discovery with Lumescope
The app uses Lumescope, a Cascade action indexer, to discover files without scanning the entire blockchain:
Collaboration Flow
The URL hash fragment (#key=...) is never sent to servers — it stays in the browser, making it safe for key transmission via any messaging channel.
Expiration Time
Cascade actions have an expiration time set at upload. The Research Archive uses:
For permanent papers, set this to a far-future value. For drafts, a shorter expiration is acceptable since they are working documents.
Local State Management
The app uses localStorage for:
- Draft metadata (IDs, titles, versions)
- Encrypted document keys (wrapped with the wallet-derived key)
- Collaboration invitations
Cascade is the source of truth for file content; localStorage is a cache for keys and metadata.
Lessons Learned
- Browser-first is the right call: The SDK works flawlessly in the browser with Keplr. No Node.js workarounds needed.
- Client-side encryption over access control: Upload everything as
isPublic: trueand handle confidentiality with encryption. This simplifies the architecture. - Filename conventions for discovery: Use predictable filename patterns (
draft_*,invitation_*) so Lumescope queries can filter actions efficiently. - Wallet-derived keys eliminate password management: Users only need their Keplr wallet — no separate passwords to remember or store.
- Stream downloads for large files: Always use the
ReadableStreamAPI to avoid loading entire files into memory.
Source Code
Browse the full implementation: github.com/kaleababayneh/Lumera-Research-Archive