Documentation
Understand the framework, paths, exports, and schema recorded by the Fireclass CLI.
fireclass init writes fireclass.json at the project root. The CLI uses it
for model generation, diagnostics, listing, and future reconfiguration.
Every generated file starts with the published schema URL:
{
"$schema": "https://fireclass.ayushdhar.com/schema.json"
}Editors that support JSON Schema use this URL for completion and validation. The schema is framework-aware, so it rejects mismatched runtime packages and invalid Firebase configuration.
{
"$schema": "https://fireclass.ayushdhar.com/schema.json",
"version": "2.1.17",
"framework": "next",
"packageManager": "pnpm",
"package": "@dharayush7/fireclass-ssr",
"firebase": null,
"fireclass": {
"path": "lib/fireclass.ts"
},
"models": {
"dir": "models"
}
}Next.js uses firebase: null because fireclass-ssr owns Firebase Admin
initialization.
{
"$schema": "https://fireclass.ayushdhar.com/schema.json",
"version": "2.1.17",
"framework": "react",
"packageManager": "pnpm",
"package": "@dharayush7/fireclass-react",
"firebase": {
"path": "src/lib/firebase.ts",
"export": "db"
},
"fireclass": {
"path": "src/lib/fireclass.ts"
},
"models": {
"dir": "src/models"
}
}{
"$schema": "https://fireclass.ayushdhar.com/schema.json",
"version": "2.1.17",
"framework": "express",
"packageManager": "npm",
"package": "@dharayush7/fireclass-js",
"firebase": {
"path": "src/lib/firebase.ts",
"export": "getDb",
"factory": true
},
"fireclass": {
"path": "src/lib/fireclass.ts"
},
"models": {
"dir": "src/models"
}
}factory: true tells generated code to call getDb() instead of passing the
function itself to createFireclass.
| Field | Meaning |
|---|---|
$schema | Enables editor validation against the public Fireclass schema. |
version | CLI version that last wrote the configuration. |
framework | Runtime preset: next, react, or express. |
packageManager | Command runner used for dependency installation. |
package | Framework SDK selected by the CLI. |
firebase | Firebase file, exported value or factory; null for Next.js. |
fireclass.path | App entry that exports initialized Fireclass values. |
models.dir | Default output directory for generated model files. |
All paths are project-relative and may be changed after moving files. Run
fireclass doctor after a manual edit so missing files or exports are caught.
Do not put credentials here
fireclass.json contains project structure and export names only. Firebase
private keys belong in gitignored environment files or a managed secret store.
npx fireclass config
npx fireclass doctorconfig prints the resolved file. doctor checks the selected package,
Firebase export, Fireclass entry, models directory, and TypeScript decorator
flags.