Docs

Collections in the console: tree, documents, fields and rules

See every collection and subcollection as a tree, scan by collection or key prefix, add documents with typed fields or JSON, import JSON, JSON Lines or CSV, and set who may read, write and delete each collection.

Updated Oct 17, 2026
Collections browser: collections, documents and a document’s fieldsCollections browser: collections, documents and a document’s fields
Collections › Data
CollectioncartsDocumentcart_1001Fieldstyped valuesSubcollectioncarts/cart_1001/items

#See the whole tree

The Tree tab draws your documents as a tree, left to right: the store, its collections, each collection’s documents, each document’s subcollections, and so on. Click a node to open the next level — it loads the first time you open it — and to see it on the right: a collection’s document count, or a document’s fields. Open in Collections / Edit in Collections jumps to it in the Data tab.

Tree tab: carts → cart_1000 → items → line_1 → price_history, with the selected document’s fields on the rightTree tab: carts → cart_1000 → items → line_1 → price_history, with the selected document’s fields on the right
Collections › Tree
  • Large collections show 25 documents at a time; Show 25 more adds the next ones.
  • Find a collection or document highlights matching nodes among the ones you have opened.
  • Drag the background to move around; −, + and Fit zoom. Collapse all closes every branch.
  • The same tree opens first on Document Scan.

#Scan by collection or key prefix

Document Scan › Scan reads documents straight from the store. Pick a Collection (nested ones too, like carts/cart_1000/items), or leave it empty and give a Key prefix — keys are collection:documentId, so users/alice/ finds everything under that user’s subcollections. Choose a Limit and Run scan. One collection shows its fields as columns; a scan across collections shows each document’s fields in one column. JSON shows each document in full.

Document Scan: collection, key prefix and limit above a table of scanned documentsDocument Scan: collection, key prefix and limit above a table of scanned documents
Document Scan › Scan

#Add a document

Add documents panel with one row per field: name, type and value, and Add fieldAdd documents panel with one row per field: name, type and value, and Add field
Add document: one row per field

Open a collection and choose Add document. Leave Document ID empty for an automatic one. Under Fields, each row is a name, a type and a value; + Add field adds another. The JSON tab edits the same document as text, and switching keeps your data.

TypeValue you enterStored as
stringAny text"Ada"
numberA number36
booleantrue or falsetrue
null—null
timestampA date and timeA timestamp (sortable, comparable in queries)
mapA JSON object: { "city": "Pune" }A nested object
arrayA JSON array: ["a", "b"]A list
geopointlat, lngA location
referencecollection/docA link to another document
bytesBase64Binary data

The form tells you which row is wrong before saving: a missing name, two fields with the same name, a value that isn’t a number, or JSON that doesn’t match the type. Names can’t start with __ or contain /.

#Import many

Import many takes a JSON array, one object, JSON Lines or CSV with a header row (address.city columns become nested fields), pasted or uploaded. ID field names the field to use as each document’s ID (empty: automatic). Replace documents that already exist overwrites them; otherwise they are kept and reported. Every 500 documents are written together — all of them or none.

#Who can read and write

Rules tab: an access table showing what visitors, signed-in users and each role can read, write and delete, then the rules and starting templatesRules tab: an access table showing what visitors, signed-in users and each role can read, write and delete, then the rules and starting templates
Collections › Rules

The Rules tab answers one question for the collection: who can read, write and delete it. It has three parts.

  • Access at a glance: a table with a row for visitors (not signed in), signed-in users and each app role, and a column for read, write and delete. Every cell is your access policies’ real decision for that kind of user, asked the same way a request is checked: All documents, Their own (row security keeps them to documents they own) or No access. Click a cell to see which rule allowed or refused it. Your team and the service key always have access.
  • Rules: each rule for the collection with what it allows and for whom. Right-click a rule (or use ⋯) to edit it on the Policies page, show its code or delete it. Rules inherited from production are marked and can only be changed there.
  • Database layer: the row policies on the document table, in plain words, with their SQL. Most projects only need the rules above.

With no rules yet, the tab offers starting points: signed-in users read and write, signed-in users can read, anyone can read, or one role can do everything. Each shows exactly what it grants and the rule that will run before you add it. Write your own opens the policy editor. Rules live on the Policies page with your table rules (collections have their own group there) and use three actions:

ActionCovers
doc:readGetting a document, queries and live listeners.
doc:writeAdding and updating documents.
doc:deleteRemoving documents.
ALLOW IF ctx.action == "doc:read" AND ctx.resource.name == "orders" AND ctx.actor.is_anonymous == False
ALLOW IF ctx.action == "doc:write" AND ctx.resource.name == "orders" AND "STAFF" IN ctx.actor.roles

With no rule that allows them, app users are refused; your team and the service key always have access. Row security on the document table is an optional extra layer for app users: it can narrow what a rule allows (to their own documents, for example) but never widens it.

Policies page with a Collections group next to tablesPolicies page with a Collections group next to tables
Policies: collections have their own group

#From code

await sov.doc('carts/cart_1001').set({
  customer_id: user.id,
  items: [{ sku: 'tea-01', qty: 2 }],
})
const mine = await sov.collection('carts').where('customer_id', '==', user.id).limit(20).get()

#Coming from Firebase or Supabase?

PlatformWhat this is called there
FirebaseFirebase console Firestore data viewer
SupabaseSupabase Table Editor
SovariaCollections in the console: tree, documents, fields and rules

Moving an existing app? Migrate from Supabase or Firebase imports users (with their passwords), data, files and rules.