Honest comparison

TmpState vs json-server

json-server is a beloved npm tool: point it at a db.json file and it serves a full fake REST API locally, with routes, filters, and relationships. It is free, offline, and your fixtures live in git.

All comparisons

The honest verdict

json-server is local and file-backed; TmpState is hosted and shareable. If one developer needs a fake API on their own machine, json-server is perfect and nothing hosted beats a file in your repo. TmpState earns its place the moment state must outlive a process or be shared: a teammate, a deployed preview, a phone, or an AI agent working across sessions and machines.

Side by side

DimensionTmpStatejson-server
Where it runsHosted; reachable from browsers, phones, deployed previews, teammates, agents.Your machine (or you deploy and babysit it yourself).
Setupcurl tmpstate.dev; no process to keep running.npm install, create db.json, keep the process alive.
Fixtures and gitData lives in the cloud; seed via curl or the API; export as JSON.db.json lives in the repo; resetting state is a git checkout. Genuinely great for tests.
Query featuresCollections, cursor pagination, PATCH merge; no filter grammar.Rich fake-REST filters, sorting, relationships, custom routes.
Sharing a demoSend the URL (or keep it server-side and deploy the app anywhere).Tunnel or deploy it yourself; state diverges per machine.
Persistence across sessions/machinesYes while alive: same URL from any machine; agents reconnect across chats.Only where the file is; every clone has its own state.
CostFree 24h; paid only to keep it alive longer.Free forever; it is your CPU and your file.

Choose json-server when

  • Offline development or CI tests with fixtures that must be deterministic and git-versioned.
  • You want fancy fake-REST query behavior (filters, relationships) with zero network.
  • The state should reset with the repo, not persist.

Choose TmpState when

  • The prototype is deployed (Vercel preview, CodeSandbox, a phone) and needs a backend that is not on your laptop.
  • Two or more people (or an agent and a human) need the same live state.
  • An AI agent needs state that survives across its own sessions and machines.

When NOT to use TmpState here

An honest comparison argues against us too. Skip TmpState if any of these apply:

  • Do not use TmpState for deterministic test fixtures; a file in git is strictly better.
  • Do not rely on TmpState offline; it is a network service by definition.
  • json-server's filter grammar does not exist here; complex fake queries stay local.

Common questions

Can TmpState be a hosted json-server?

For the core CRUD shape, yes: collections, list, get, create, patch, delete over plain REST with open CORS. The fake-REST extras (filters, relationships, custom routes) are not there; put that logic in your app's API route instead.

Which should I use for tests?

json-server (or plain fixtures). TmpState is for shared, live, disposable state, not for deterministic test suites.

Try the ten-second version

The fastest way to compare is to create a database right now. No signup; it expires on its own.