Skip to content

Firestore example apps

Runnable Firestore apps that build on Nimbus with stock firebase/app and firebase/firestore imports. Unary calls go over REST or gRPC-Web, and live queries use Nimbus’s WebSocket Listen bridge. Read the overview first if you have not pointed a Firestore app at Nimbus yet.

The apps live under examples/firebase/ in the source repository. Run them in place from a checkout. Each imports the repository’s workspace packages.

Terminal window
nimbus dev

nimbus dev starts a local server with the Firestore-compatible routes. The Firestore project id is demo, which maps to the same-named Nimbus tenant. These apps are Firestore clients: a browser UI plus a support server. They have no Nimbus function bundle, so there is no nimbus deploy step. Each app also has standalone npm scripts.

The firebase:server:* script runs the support server. The firebase:example:* script runs the Vite dev server. Each README lists the scripts. Run them in place from a checkout.

Browser (html). The Nimbus-provisioned firebase package serves this browser playground. The app covers connectFirestoreEmulator, addDoc, getDocs, onSnapshot, writeBatch, runTransaction, deleteDoc, and the supported FieldValue sentinels. It can switch unary calls between REST and gRPC-Web.

Tasks. This app implements the shared tasks task list. Firestore CRUD calls create, toggle, and delete tasks. An onSnapshot query keeps the newest-first list current without polling. The Listen bridge delivers each update. The app implements the full spec.