Introduction
Project Name:
S5 Gateway & TypeScript Client – a Skynet-style API for modern Sia storage
Name of the organisation or individual submitting the proposal:
Jules Lai (sole developer, founder of Fabstir)
Describe your project
This project builds upon my previous grants for developing the Fabstir Media Player and work on s5client-js. It revives the ease-of-use once offered by Skynet portals, but on the modern S5 + Sia stack.
-
@fabstir/s5-gateway
– a lightweight Node/TypeScript service that fronts any S5 portal.
It provides simple REST routes for uploading files, downloading via/<CID>/<path>
, updating mutable registry entries and subscribing to changes over WebSocket.
An optional DNSLink resolver lets site owners map a normal domain to an S5 CID by publishingdnslink=/s5/<cid>
in their DNS. -
@s5-client/core
– a browser/Node SDK mirroring the original Skynet Client (uploadFile
,uploadDirectory
,getJSON
,setRegistryEntry
,subscribeRegistry
).
Developers can integrate decentralised storage in minutes without touching renterd or contract logic.
Both components will be MIT-licensed, fully open-source and ship with a Docker-compose demo stack for local testing.
Who benefits from your project?
- Web-3 developers – regain the “one-call” upload workflow that disappeared with Skynet.
- Existing Sia users – obtain a thin, language-agnostic gateway that can be deployed in front of any portal.
- End Users: Faster access to content through intelligent caching
- dApp communities – can serve static sites or app bundles from Sia using ordinary HTTPS links or DNSLink hostnames.
- The Sia ecosystem – gains a public OpenAPI specification, shared test vectors and an interoperable manifest format, making it easier for others to build compatible gateways.
- S5 Portal Operators: Enhanced functionality without additional complexity
How does the project serve the Foundation’s mission of user-owned data?
By reducing the barrier to entry for S5, the gateway and SDK allow users to self-host their files and web-apps on Sia while retaining cryptographic ownership (CIDs and Ed25519-signed registry entries).
No central account system or pay-walled portal is required; any user can run the gateway locally or point the SDK at a community instance, keeping data control firmly in the user’s hands. Open-source codebase and standardised interfaces allow users to verify how their data is handled.
Are you a resident of any jurisdiction on that list? No
Will your payment bank account be located in any jurisdiction on that list? No
Development Information
Will all of your project’s code be open-source?
Yes. All new code will be released under the MIT licence. The project may depend on existing open-source components (e.g. s5client-js
, S5
) but will not develop or embed closed-source code.
Links where code will be accessible for review
- GitHub repo for gateway → https://github.com/Fabstir/s5-gateway (to be created)
- GitHub repo for SDK → https://github.com/Fabstir/s5-client-core (to be created)
- Existing libraries: https://github.com/parajbs-dev/s5client-js, https://github.com/parajbs-dev/s5-encryptWasm
Do you agree to submit monthly progress reports?
Yes.
Grant Specifics
Motivation & Goals
Goal | Outcome |
---|---|
Developer ergonomics | One SDK call or REST request to upload & fetch content. |
DNS-friendly naming | Resolve any hostname publishing dnslink=/s5/<cid> TXT records. |
Open specification | Single OpenAPI 3.1 spec, Mermaid/C4 diagrams, copy-paste docs. |
Interoperability | Public test vectors & JSON schema so other gateways can match behaviour. |
Separation of concerns | Gateway is generic; Fabstir back-end merely uses it. |
Sustainability | MIT licence, automated CI tests, monthly progress updates. |
Technical Approach
Components
Component | Tasks |
---|---|
Low-level tools | Existing s5client-js , s5-encryptWasm . |
Gateway – @fabstir/s5-gateway |
• Express server. • Routes: /upload , /download/:cid/* , /metadata , /registry , /subscribe , /resolve/:hostname .• Internally uses s5client-js (upload, path-resolution, encryption, dedup).• Configurable LRU + on-disk cache; relies on the S5 portal’s own pinning mechanism—no extra cron jobs. |
SDK – @s5-client/core |
• Upload helpers (uploadFile , uploadDirectory ).• Manifest cache & resolvePath .• Registry CAS helpers; WebSocket push. • No dependency on Fabstir login—callers inject an Ed25519 key if needed. |
Documentation | OpenAPI 3.1 → Redoc; Mermaid C4 diagrams; Quick-start guide. |
Interoperability tests | s5-interop-tests repo (blob & directory CIDs) – gateway must serve byte-identical data. |
Demo stack | Docker compose (local only): S5 portal, s5-gateway, sample uploader. Requires S5_AUTH_TOKEN ; a review token will be supplied to the Foundation. |
Load testing & tuning | k6 scripts establish baseline; later sprint meets or beats baseline. |
DNSLink resolution
/resolve/:hostname
fetches the _dnslink
TXT record and returns the referenced CID. The feature can be disabled; raw CID paths always work.
Deliverables, Milestones & Budget
(eight-month schedule — ≈ 32 weeks)
Month | Milestone (end-of-month deliverable) | Budget (USD) | Key checkpoint |
---|---|---|---|
1 | Project set-up & design • GitHub repos created • OpenAPI skeleton & issue board • Initial Docker-compose scaffold • One-off business-overhead allowance |
3 500 | Spec repo visible; empty gateway container starts |
2 | SDK core v0.1 • @s5-client/core with uploadFile , uploadDirectory , manifest cache & path resolver |
4 500 | SDK demo uploads a file & fetches it by CID |
3 | Mutable data & push • Gateway /registry , /subscribe routes• SDK v0.2 with CAS + WebSocket |
4 500 | Registry update & push demo |
4 | Core gateway REST routes • /upload , /download/:cid/* , /metadata fully functional• Interop test CIDs served identically |
4 000 | File upload & path fetch via gateway |
5 | DNSLink resolver integration • /resolve/:hostname route, caching, tests |
3 000 | Domain with dnslink=/s5/<cid> resolves & loads |
6 | Cache & dedup optimisation • k6 baseline captured • LRU cache + content dedup added • Report shows measurable improvement |
4 500 | Improved k6 report published |
7 | Docs & demo stack • MkDocs + Redoc site • Docker compose: S5 portal, gateway, sample uploader • Tuning sprint meets or beats baseline |
4 500 | Docker Compose setup verified, and “Quick-start guide” successfully followed during internal testing. |
8 | Packaging, outreach & feedback buffer • v1.0 tags, screencast, blog post • Forum feedback addressed; minor doc updates |
3 500 | Final artefacts & forum announcement |
Total | 32 000 USD |
Monthly disbursement of 4 000 USD; continuing payments are contingent on timely submission of the standard progress report.
Success Indicators
- End-to-end upload → path fetch demo in the Docker stack.
- Registry CAS conflict tests pass with automatic retries.
- DNSLink resolution; demonstrate that resolving and fetching a domain via DNSLink adds only minimal overhead compared with a direct CID fetch, and document the observed latency in the performance report.
- Gateway serves byte-identical data on public test vectors.
- Successfully tested the Quick-start guide internally to ensure it is easy to follow and can be completed quickly without external assistance.
Performance data and k6 scripts will be published.
Community Engagement & Maintenance
Area | Commitment |
---|---|
Progress updates | Written update monthly in Sia Forum “Grants”. |
Interoperability | Maintain s5-interop-tests repo; accept PRs. |
Issue handling | Repos are active Fabstir projects; issues addressed as part of ongoing work. |
Licensing & CI | MIT licence; GitHub Actions build, test and publish Docker images. |
Identity & Billing
The gateway accepts any Ed25519 key supplied by the caller; derivation from Fabstir’s SEA credentials is documented but optional. Storage payments remain the responsibility of the portal operator; the gateway does not add a second billing layer.
Risks & Mitigation
Risk | Mitigation |
---|---|
July 2025 Sia protocol upgrade | Track S5 portal release notes and upgrade guidance; timeline includes buffer for any required API changes. |
S5 spec changes | Adjust gateway during the optimisation sprint if required. |
DNS outages | Resolver caches TXT records; users can fall back to raw CIDs. |
References
- S5 documentation – https://docs.sfive.net/
- DNSLink specification – https://docs.ipfs.tech/concepts/dnslink/
- s5client-js (existing low-level library) – https://github.com/parajbs-dev/s5client-js
- s5-encryptWasm (XChaCha20-Poly1305 engine) – https://github.com/parajbs-dev/s5-encryptWasm
- fabstirdb-backend (Fabstir social-graph back-end) – https://github.com/Fabstir/fabstirdb-backend
Contact info
- Email: [email protected]
- Preferred chat: Telegram (
@JulesL78
)