Skip to content

Latest commit

 

History

History

README.md

layout default
title Fireproof Tutorial
nav_order 112
has_children true
format_version v2

Fireproof Tutorial: Local-First Document Database for AI-Native Apps

Learn how to use fireproof-storage/fireproof to build local-first, encrypted, sync-capable applications with a unified browser/Node/Deno API and React hooks.

GitHub Repo License Docs

Why This Track Matters

For AI-generated and collaborative apps, teams need data systems that run locally, sync later, and still preserve integrity. Fireproof is designed for that model with document APIs, live queries, and cryptographic causal consistency.

This track focuses on:

  • document lifecycle and query model
  • React hook workflows for live local-first UX
  • gateway and sync architecture across runtimes
  • production governance for encryption, debugging, and operations

Current Snapshot (auto-updated)

Mental Model

flowchart LR
    A[App Writes Document] --> B[Fireproof Database API]
    B --> C[CRDT and Ledger Clock]
    C --> D[Content-Addressed Storage]
    D --> E[Gateway Sync]
    E --> F[Live Query Updates]
Loading

Chapter Guide

Chapter Key Question Outcome
01 - Getting Started How do I run Fireproof quickly in app code? Working local baseline
02 - Core Document API and Query Lifecycle How do put/get/query/changes behave? Strong data model mental model
03 - React Hooks and Live Local-First UX How do useFireproof, useLiveQuery, and useDocument fit together? Real-time UX baseline
04 - Ledger, CRDT, and Causal Consistency How does Fireproof maintain integrity in multi-writer scenarios? Better correctness model
05 - Storage Gateways and Sync Topology How is data persisted and synchronized across environments? Deployment architecture clarity
06 - Files, Attachments, and Rich Data Flows How do image/file flows work with Fireproof docs? Rich content implementation pattern
07 - Runtime Coverage: Browser, Node, Deno, and Edge Where and how can Fireproof run? Cross-runtime strategy
08 - Production Operations, Security, and Debugging How do teams operate Fireproof safely at scale? Ops and security baseline

What You Will Learn

  • how to structure local-first document workflows for AI-native apps
  • how live query/reactive patterns map to Fireproof APIs
  • how sync and storage gateways support multi-environment deployments
  • how to debug and secure Fireproof usage in production workflows

Source References

Related Tutorials


Start with Chapter 1: Getting Started.

Navigation & Backlinks

Full Chapter Map

  1. Chapter 1: Getting Started
  2. Chapter 2: Core Document API and Query Lifecycle
  3. Chapter 3: React Hooks and Live Local-First UX
  4. Chapter 4: Ledger, CRDT, and Causal Consistency
  5. Chapter 5: Storage Gateways and Sync Topology
  6. Chapter 6: Files, Attachments, and Rich Data Flows
  7. Chapter 7: Runtime Coverage: Browser, Node, Deno, and Edge
  8. Chapter 8: Production Operations, Security, and Debugging

Generated by AI Codebase Knowledge Builder