
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
firestore-schema-viewer
Advanced tools
FireSchema — Interactive schema viewer for Firestore databases. Like SwaggerUI, but for NoSQL.
Interactive schema viewer for Firestore databases. Like SwaggerUI, but for NoSQL.
Document your Firestore database structure using JSON Schema — the official standard for defining object structures — and visualize it with a beautiful dark-themed UI.

Create a schemas/ folder in your project. Each .schema.json file represents one Firestore collection:
schemas/
├── users.schema.json → /users/{userId}
├── users/
│ └── orders.schema.json → /users/{userId}/orders/{orderId}
└── products.schema.json → /products/{productId}
The folder structure mirrors Firestore. Subcollections go inside a folder named after the parent collection. Firestore paths are inferred automatically — you never write them manually.
Example schemas/users.schema.json:
{
"$schema": "https://raw.githubusercontent.com/juanisidoro/firestore-schema-viewer/main/schema/collection.schema.json",
"collection": "users",
"description": "Application users",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"email": { "type": "string", "format": "email" },
"displayName": { "type": "string" },
"role": { "type": "string", "enum": ["admin", "editor", "viewer"] },
"createdAt": { "type": "string", "format": "date-time" }
},
"required": ["email", "displayName", "role"]
}
}
Tip: The
$schemaline at the top gives you autocomplete and validation in VS Code.
Create an index.html next to your schemas/ folder. Pick one of the setup options below:
No dependencies, no node_modules. Just 1 HTML file + your schema files.
Step by step:
Create a folder for your docs (e.g. docs/firestore/):
your-project/
└── docs/firestore/
├── index.html
└── schemas/
├── users.schema.json
└── users/
└── orders.schema.json
Create index.html:
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Project - Firestore Schemas</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/firestore-schema-viewer-dist@0.3/style.css">
</head>
<body>
<div id="schema-viewer"></div>
<script src="https://cdn.jsdelivr.net/npm/firestore-schema-viewer-dist@0.3/fsv.umd.js"></script>
<script>
FirestoreSchemaViewer.render('#schema-viewer', {
title: 'My Project',
schemasDir: './schemas/'
})
</script>
</body>
</html>
Add your .schema.json files to schemas/ and serve:
cd docs/firestore
npx serve .
# Open http://localhost:3000
Custom port: npx serve . -l 8080
That's it. The viewer auto-discovers all .schema.json files in the schemas/ folder (including subdirectories). Add new schemas, refresh the browser — no need to touch index.html.
How it works: When served with
npx serve,python3 -m http.server, or any server with directory listing enabled, the viewer parses the directory listing to find all schema files automatically. If your server doesn't support directory listing (GitHub Pages, Netlify, Vercel), create aschemas/index.jsonmanifest — see Hosting without directory listing below.
Full quicksheet: QUICKSHEET-CDN.md — schema templates, field patterns, checklist.
Install the dist-only package — 1 package, ~335 KB total, zero sub-dependencies:
npm install --save-dev firestore-schema-viewer-dist
Step by step:
Create your docs folder and install:
mkdir -p docs/database/firebase/schemas
cd docs/database/firebase
npm init -y
npm install --save-dev firestore-schema-viewer-dist
echo "node_modules/" > .gitignore
Create index.html:
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Project - Firestore Schemas</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./node_modules/firestore-schema-viewer-dist/style.css">
</head>
<body>
<div id="schema-viewer"></div>
<script src="./node_modules/firestore-schema-viewer-dist/fsv.umd.js"></script>
<script>
FirestoreSchemaViewer.render('#schema-viewer', {
title: 'My Project',
schemasDir: './schemas/'
})
</script>
</body>
</html>
Add your .schema.json files to schemas/ and serve:
npx serve .
# Open http://localhost:3000
Custom port: npx serve . -l 8080
Full quicksheet: QUICKSHEET-NPM-DIST.md — complete setup, schema templates, field patterns, checklist.
If your project uses a bundler (Vite, Webpack, etc.):
npm install firestore-schema-viewer
import { render } from 'firestore-schema-viewer'
import 'firestore-schema-viewer/dist/style.css'
render('#schema-viewer', {
title: 'My App',
schemasDir: './schemas/'
})
Full quicksheet: QUICKSHEET-BUNDLER.md — complete setup for bundler projects, schema templates, field patterns.
If your server doesn't support directory listing (GitHub Pages, Netlify, Vercel), create a schemas/index.json file listing all your schema paths:
[
"users.schema.json",
"users/orders.schema.json",
"products.schema.json"
]
Generate it automatically:
find schemas -name "*.schema.json" | sed 's|^schemas/||' | sort > schemas/index.json
The viewer will automatically look for this file if directory listing is not available.
Each .schema.json file has this structure:
| Field | Required | Description |
|---|---|---|
collection | Yes | Collection name (e.g. "users") |
schema | Yes | Standard JSON Schema object |
description | No | What this collection stores |
documentCount | No | Approximate number of documents (hidden in UI if omitted) |
The schema field is plain JSON Schema draft 2020-12. You can use all standard features: type, properties, required, enum, format, pattern, minimum, maximum, nested object and array types, etc.
You never write Firestore paths manually. They're inferred from the file location:
| File path | Inferred Firestore path |
|---|---|
users.schema.json | /users/{userId} |
users/orders.schema.json | /users/{userId}/orders/{orderId} |
frontend-shops/products.schema.json | /frontend-shops/{frontend_shopId}/products/{productId} |
FirestoreSchemaViewer.render(selector, config)| Parameter | Type | Description |
|---|---|---|
selector | string | CSS selector for the container element |
config.title | string (optional) | Title shown in the sidebar header |
config.schemasDir | string (recommended) | Path to schemas folder — auto-discovers all .schema.json files |
config.schemas | string[] or object[] | Explicit URLs to .schema.json files, or inline collection objects |
Use one of schemasDir or schemas:
// Option 1: Auto-discovery (recommended) — finds all .schema.json files automatically
FirestoreSchemaViewer.render('#viewer', {
schemasDir: './schemas/'
})
// Option 2: Explicit list — useful if you need to control which schemas are loaded
FirestoreSchemaViewer.render('#viewer', {
schemas: [
'./schemas/users.schema.json',
'./schemas/users/orders.schema.json',
'./schemas/products.schema.json'
]
})
| Package | What it includes | Dependencies |
|---|---|---|
firestore-schema-viewer | Full library (UMD + ES + CSS + source) | React, Radix, etc. |
firestore-schema-viewer-dist | Static files only (UMD + CSS) | None |
Use this prompt with Claude Code, ChatGPT, Copilot, or any LLM to auto-generate your schema files. Copy the prompt below and adapt the collection list to your project:
Generate Firestore schema files for the FireSchema viewer (https://github.com/juanisidoro/firestore-schema-viewer).
Rules:
- One .schema.json file per collection
- Folder structure mirrors Firestore hierarchy: subcollections go inside a folder named after the parent collection
- If a subcollection exists, the parent .schema.json MUST also exist
- Every field must have "type" and "description"
- Use standard JSON Schema features: type, enum, format, required, minimum, maximum, etc.
- Use "format": "date-time" for timestamps, "format": "email" for emails, "format": "uri" for URLs
- Do NOT include "path" or "subcollections" fields — they are inferred from folder structure
Each file must follow this format:
{
"$schema": "https://raw.githubusercontent.com/juanisidoro/firestore-schema-viewer/main/schema/collection.schema.json",
"collection": "<collection-name>",
"description": "<what this collection stores>",
"schema": {
"type": "object",
"required": [...],
"properties": { ... }
}
}
Generate the schema files for the following collections:
- users (email, displayName, role: admin/editor/viewer, createdAt)
- users/orders (total, status: pending/paid/shipped, items array, createdAt)
- products (name, price, category, inStock boolean)
Output each file with its path (e.g. schemas/users.schema.json) so I can create them directly.
After generating the files, follow the setup instructions at:
https://github.com/juanisidoro/firestore-schema-viewer#setup-options
Replace the collections list at the bottom with your own. The LLM will generate ready-to-use .schema.json files with the correct format and folder structure.
Want a feature? Open an issue.
MIT
FAQs
FireSchema — Interactive schema viewer for Firestore databases. Like SwaggerUI, but for NoSQL.
The npm package firestore-schema-viewer receives a total of 1 weekly downloads. As such, firestore-schema-viewer popularity was classified as not popular.
We found that firestore-schema-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.