A simple realtime database for Cloudflare Workers.
- POC backend + frontend lib (state)
- Add example
- Open source it
- Auth
- Explore other DO features (D1, KV, Storage, Queues)
- Add docs
- Make a hosted version
- Add tests
Blaze is a proof-of-concept (POC) for a real-time, Firestore-like document store built on Cloudflare Workers and Durable Objects. It’s lightweight, scalable, and designed for experimentation.
- Firestore Alternative: Firebase doesn’t work on Workers. Blaze fills the gap with Durable Objects.
- Real-Time Updates: WebSocket support for instant updates.
- Scalability: Built for high read/write workloads.
- Fun Experiment: A playground for exploring Cloudflare’s capabilities.
- Purpose: Backend logic for Workers and Durable Objects.
- Features:
- Manages JSON document state.
- Handles WebSocket connections.
- Exposes HTTP endpoints for CRUD operations.
- Purpose: Client-side library.
- Features:
- Firestore-like API (
collection
,doc
,get
,onUpdate
,update
). - Real-time updates via WebSocket.
- Basic client-side querying (
.where()
).
- Firestore-like API (
- Purpose: Demo UI.
- Features:
- Real-time document updates.
- Clean, modern UI with Tailwind CSS.
- Real-time updates via WebSocket.
- CRUD operations (HTTP + WebSocket).
- Firestore-like client API.
- Demo UI.
- Querying is client-side (not scalable).
- No authentication.
- Basic error handling.
- Firestore-like API: Familiar and easy to use.
- WebSocket for Real-Time Updates: Instant updates for connected clients.
- Durable Objects as Documents: Scalable state management.
- Tailwind CSS: Clean, modern UI.
- Querying: Add server-side filtering/indexing.
- Auth: Integrate API keys or OAuth.
- Error Handling: Improve robustness and logging.
- Testing: Simulate high traffic for optimization.
- Advanced Querying: Use D1 or KV for server-side queries.
- Persistence: Backup state with R2 or D1.
- Nested Documents: Support nested data structures.
- Transactions: Add batch updates or transactions.
- Hosted Version: Offer a managed, hosted solution.
- Documentation: Write comprehensive docs for open-source adoption.
server.ts
: Worker + Durable Object logic.blaze.ts
: Client-side library.
App.svelte
: Demo UI.
Blaze is a minimal, scalable, and real-time document store for Cloudflare Workers. It’s perfect for developers who need Firestore-like functionality without the overhead of Firebase.
Note: This is a proof-of-concept (POC). It’s not production-ready, but it’s a great starting point for experimentation.