You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the living contributor guide for running the canonical full-stack Instagram example. Spock owns data, policy, identity seams, RPC, and media storage; Uhura owns the Editor and interactive Play experience. The combined framework host serves both through one spock process on one origin.
Important
Spock is pre-1.0. If this guide is stale or a command fails, please leave a comment with the command and output so the guide can be corrected.
There are two supported contributor paths below. Use the published CLI to verify the released product. Use the local source build to test the current checkout without waiting for an npm release; after the initial build, Cargo reuses its incremental cache.
Prerequisites and checkout
Both paths require Git, Node.js 24, and Corepack. The local source commands target macOS, Linux, or WSL and also require rustup; the checkout pins Rust 1.92 and the WebAssembly target.
For a fresh checkout:
git clone --recurse-submodules https://github.com/gridaco/spock.git
cd spock
The Instagram provider is application-owned generated output and is intentionally not committed. Build it after cloning and after changing its TypeScript source:
This path uses the Editor/Play and WebAssembly sidecar shipped in the npm package. It does not require Rust, a local Spock build, or a manual Uhura WebAssembly build.
Path B: run the current checkout
Use this path when changing Spock or Uhura itself. Build the source-owned Studio, Editor/Play, provider, and WebAssembly assets once:
If build-wasm.sh reports a missing or mismatched wasm-bindgen-cli, run the lockfile-exact install command it prints and then run the script again.
Check and start the project with the CLI compiled from this checkout:
cargo run --locked -p spock-cli -- check uhura/examples/instagram
SPOCK_UHURA_WEB_DIST="$PWD/uhura/web/dist" \
SPOCK_UHURA_WASM_DIST="$PWD/uhura/crates/uhura-wasm/pkg/web" \
cargo run --locked -p spock-cli -- start uhura/examples/instagram
For the incremental client-development loop, replace start with dev:
SPOCK_UHURA_WEB_DIST="$PWD/uhura/web/dist" \
SPOCK_UHURA_WASM_DIST="$PWD/uhura/crates/uhura-wasm/pkg/web" \
cargo run --locked -p spock-cli -- dev uhura/examples/instagram
The two SPOCK_UHURA_* overrides are a required pair for a source host. They prevent a local binary from silently mixing incompatible Editor/Play and WebAssembly generations.
Reload and data behavior
spock start checks once and serves one fixed generation. It has no watcher.
spock dev publishes valid Uhura client saves live.
An invalid client save keeps the last good Play generation while Editor shows diagnostics.
An initially invalid client is reported as cold_invalid until it becomes valid.
A .spock source, seed input, or topology-affecting spock.toml save is detected and reported as restart_required. It never migrates, reseeds, reopens, or replaces the active database in place.
Stopping and starting the command reconstructs backend state from seed. Restarting the Play shell only resets its UI session; it does not roll back Spock data.
This asymmetric policy is deliberate while the development-state model remains unresolved. Inspect /~project/status for the current generation and reload state.
Provider TypeScript is not compiled by spock dev. After changing client/providers/spock.ts, rerun build:provider, or keep this watcher in another terminal:
corepack pnpm@10.11.0 -C uhura/web dev:provider
Things to try in Play
switch between Mobile and Desktop frames
switch the active seeded actor
open profiles, Followers, and Following
view posts, multi-frame Stories, Search/Explore, and playable Reels
like, save, follow, and comment
choose an image in Create and publish a new post through Spock storage
Everything shown in Play, including counts and media, comes from the running Spock authority. Actor switching is a prototype impersonation seam, not production authentication.
Troubleshooting
Missing project or Uhura files: run git submodule update --init --recursive.
Published command behaves differently: run spock --version; use the pinned npx --yes spock@0.5.0 ... form to distinguish an installation/PATH problem.
Source host reports missing assets: complete every source-build command above and set both SPOCK_UHURA_* overrides.
A backend edit does not reload: this is expected; stop and rerun the command, which reconstructs the database from seed.
Port 4000 is busy: add --port 4001 to spock start or spock dev, then use that single port for Editor, Play, Studio, and APIs. Same-origin discovery handles the selected port; do not rewrite the fallback in client/uhura.toml.
application-owned provider adapter code remains unchecked: this is the current expected warning, not a failed check.
Health is ready but degraded: inspect /~project/status; an invalid client or a backend change awaiting restart intentionally produces this state.
Alpine/musl: the npm package currently targets GNU-libc Linux; use a supported platform or the Cargo workflow.
Press Ctrl-C once to stop the combined framework process.
The repository README remains the canonical command and reload reference; this issue stays open as the contributor-oriented walkthrough.
This is the living contributor guide for running the canonical full-stack Instagram example. Spock owns data, policy, identity seams, RPC, and media storage; Uhura owns the Editor and interactive Play experience. The combined framework host serves both through one
spockprocess on one origin.Important
Spock is pre-1.0. If this guide is stale or a command fails, please leave a comment with the command and output so the guide can be corrected.
What runs
The project is
uhura/examples/instagram. One framework process serves, by default:There are two supported contributor paths below. Use the published CLI to verify the released product. Use the local source build to test the current checkout without waiting for an npm release; after the initial build, Cargo reuses its incremental cache.
Prerequisites and checkout
Both paths require Git, Node.js 24, and Corepack. The local source commands target macOS, Linux, or WSL and also require rustup; the checkout pins Rust 1.92 and the WebAssembly target.
For a fresh checkout:
git clone --recurse-submodules https://github.com/gridaco/spock.git cd spockFor an existing checkout:
The Instagram provider is application-owned generated output and is intentionally not committed. Build it after cloning and after changing its TypeScript source:
Path A: run the published CLI
Install the current framework release and run the normal
spockcommand:Use
spock dev uhura/examples/instagraminstead when testing watched client development with the released CLI.To avoid a global installation, the equivalent pinned smoke command is:
This path uses the Editor/Play and WebAssembly sidecar shipped in the npm package. It does not require Rust, a local Spock build, or a manual Uhura WebAssembly build.
Path B: run the current checkout
Use this path when changing Spock or Uhura itself. Build the source-owned Studio, Editor/Play, provider, and WebAssembly assets once:
If
build-wasm.shreports a missing or mismatchedwasm-bindgen-cli, run the lockfile-exact install command it prints and then run the script again.Check and start the project with the CLI compiled from this checkout:
For the incremental client-development loop, replace
startwithdev:The two
SPOCK_UHURA_*overrides are a required pair for a source host. They prevent a local binary from silently mixing incompatible Editor/Play and WebAssembly generations.Reload and data behavior
spock startchecks once and serves one fixed generation. It has no watcher.spock devpublishes valid Uhura client saves live.cold_invaliduntil it becomes valid..spocksource, seed input, or topology-affectingspock.tomlsave is detected and reported asrestart_required. It never migrates, reseeds, reopens, or replaces the active database in place.This asymmetric policy is deliberate while the development-state model remains unresolved. Inspect
/~project/statusfor the current generation and reload state.Provider TypeScript is not compiled by
spock dev. After changingclient/providers/spock.ts, rerunbuild:provider, or keep this watcher in another terminal:Things to try in Play
Everything shown in Play, including counts and media, comes from the running Spock authority. Actor switching is a prototype impersonation seam, not production authentication.
Troubleshooting
git submodule update --init --recursive.client/providers/dist/spock.js: reruncorepack pnpm@10.11.0 -C uhura/web build:provider.spock --version; use the pinnednpx --yes spock@0.5.0 ...form to distinguish an installation/PATH problem.SPOCK_UHURA_*overrides.--port 4001tospock startorspock dev, then use that single port for Editor, Play, Studio, and APIs. Same-origin discovery handles the selected port; do not rewrite the fallback inclient/uhura.toml.application-owned provider adapter code remains unchecked: this is the current expected warning, not a failed check./~project/status; an invalid client or a backend change awaiting restart intentionally produces this state.The repository README remains the canonical command and reload reference; this issue stays open as the contributor-oriented walkthrough.