Napcraft WebRTC & Dynamic CVM Backends

Napcraft WebRTC & Dynamic CVM Backends

Meet Napcraft: a little voxel world you can build with friends—and return to after everyone leaves. 🧱

It demonstrates something bigger we’ve shipped in napplet.soy: dynamic, persistent backends, developed and deployed through soyLI.

Our new soy.backends.v1 service contract builds on NAP-CVM. Developers supply a TypeScript handler and JSON schemas describing stored data, operation inputs/outputs and access requirements. The schemas define the structure; the handler enforces the game’s rules.

The flow:

Write rules + schemas → publish source through Git/GRASP → request a provider build → activate the backend → players create and interact with persistent worlds.

The provider compiles the source and executes it inside an isolated QuickJS/WebAssembly sandbox. Signed build receipts connect each backend release to its source commit. Players use their Nostr identity; validated changes are committed atomically, and worlds stay pinned to their backend version.

Different traffic takes different paths:

  • Backend operations: encrypted MCP requests over Nostr through ContextVM.
  • Live movement and presence: NAP-WEBRTC data channels, connecting directly where possible, with TURN as a relay fallback.
  • Source and history: Git/GRASP.
  • Playable builds and presentation assets: Blossom.

CVM handles durable state and rules; WebRTC handles the fast, transient multiplayer traffic.

https://napplet.soy/n/naddr1qvzqqqyf8ypzqw49s9e88sajl985jxzquprj7pyapugqp83rme3sqctxhj5mxm4rqythwumn8ghj7un9d3shjtnwv9c8qmr9wsh8xmmeqyxhwumn8ghj7mn0wvhxcmmvqyt8wumn8ghj7un9d3shjtnswf5k6ctv9ehx2aqppamhxue69uhkummnw3ezumt0d5q3jamnwvaz7tmjv4kxz7fwwphkx6m9w3ehgu3wvdhk6qqddckn2vnx89jnyvnxx43k2z8kenr/play

This opens the door to collaborative worlds, shared simulations and turn-based games without every creator having to operate a server. Hosted backend slots currently require creator approval.

How it works and how to build one

#nappletsoy #nostr #gamedev


Write a comment