1.0 Roadmap
Schema
- Copy over code from Zero Schema so that we can drop that dependency and gain flexibility if needed in the future
- Use minimal internal validators instead of Valibot
Mutators
- Switch over to using mutators instead of the event/projector separation
- Decide on a mutator design
- Build type-safe mutator definitions, with a Standard Schema
datafield - Build cross-tab ordering system
- Connect to IDB for persistence
- Choose an incrementing Mutation ID format per (client|browser)
- Connect mutations rebasing to store
Queries
- Finalise design for query DSL
- Design system for subscriptions
- Make sure updates to queries are batched before revealing to the UI
- Add lazy accessor to queries to track just insert/update/delete (like experimental
watch()API) - Connect query layer with the coverage tracker
Batcher
- Connect batch loader with the store
- Design batch loader that dedupes query satisfactions and validates responses
- Connect the coverage tracker with the batch loader
Bootstrap
- Handle the
bootstrapsBroadcast Channel updates - Build bootstrap lifecycle manager
- Connect bootstrap layer to store
- Persist and load BoostrapStatus(es) from IDB
- Expose BoostrapStatus as an Observable
Store
- Design APIs to write to the store from:
- Mutations
- Syncers
- Batch/bootstrap
- Handle the
store-updatedBroadcast Channel coordinator
Persistence (IDB)
- Handle the
schema-changedBroadcast Channel coordinator - Build an IndexedDB database management system
- Coordinate the startup sequence (check for database, create if needed)
- Design API for storing mutation queue
- Design API for persisting store data
- Provide namespaced KV store
Integrations
- Solid.js wrapper with Stores on the reactive layers
- React wrapper with stable identity
- Figure out how to play well with SSR:
- Surface query interface in a way that allows usage with a Loader function
- Make IDB storage purely pluggable
- Guard
BroadcastChannelmessages to only run on client
Performance
- Make sure store APIs are fast
- Add perf tests for store => query connection
- Ensure that rebasing is fast
QoL
- Add thorough docstrings to all files to drive agents and test creation
- Come up with a minimal set of key/id formats for everything
- Decide on a single format for passing along row changes
- Design error types for library
- Switch to using tagged union Result type for typed error handling
- Flatten all table row vaildation into one shape (across network + persistence)
Future
- Play code golf on largest modules to get things down to <10kb total
- Add https://rxdb.info/key-compression.html
- Go through https://github.com/rocicorp/replicache/releases and implement all useful features.
- Eviction
- Partial migrations
- Give materializers access to the database
- Figure out a syncgroups abstraction (with shared data)
- Add IVM for
wherequeries (store.issues.where(q => q.eq("status", "open"))) to the query language, withsorted-btreefor indexing.- gte
- lte
- eq
- in
Dead ends
Events & Projectors
-
Switch to usingbetter-resultfor typed error handling -
Decide on an event schema format -
Figure out a nice projector API that is easy to use across backend and frontend -
Build type-safe projectors that connect events and schema in a SSSync client