Cross-platform app template: Expo (React Native) UI + a Rust backend (axum). One shared Rust core serves three hosts: a single static binary for Docker/self-hosting, a wasm32 Cloudflare Worker (workers-rs), and a Tauri desktop app.
- Fork — click Use this template on GitHub. Or use it as a Nix flake template.
- Configure — set
nameandversioninpackage.json, and add repo secretsCLOUDFLARE_ACCOUNT_ID+CLOUDFLARE_API_TOKEN. Add login secrets in the Cloudflare dashboard (Worker → Settings → Variables and Secrets, orwrangler secret put):OIDC_ISSUER,OIDC_CLIENT_ID,OIDC_CLIENT_SECRET,SESSION_SECRET(≥ 32 chars,openssl rand -base64 48). Without them the API refuses to serve; setAUTH_DISABLED=trueto skip login. The demo upload/download routes on Workers additionally need a D1 database (seewrangler.jsonc); without one they answer 503. For localnpm run dev, the same vars live encrypted in.env— see Configuration. - Deploy — re-run the workflow under the repo's Actions tab.
The deploy URL is printed in the build's Run source .env step.
Open https://claude.ai/code, select your repo, and work on a branch (each gets
its own preview URL). Merge into master to deploy live.
Run "npm run dev". Launched.
nix build .#docker produces ./result, a script that streams the OCI image
to stdout. Piping it into docker load imports the image as
<name>:<version> taken from package.json (e.g.
simple-project-template:0.1.0), so the run command below derives the same
tag with jq instead of hardcoding it:
nix build .#docker && ./result | docker load
docker run -it \
-e AUTH_DISABLED=true \
-e PORT=8081 -e HOST=0.0.0.0 -p 8081:8081 \
"$(jq -r '.name + ":" + .version' package.json)"