Create a DB right in React
Skip API development and start building with React and Homebase. It all starts in your browser. Setup is a few lines of code. Add schema, relationships and validations incrementally.
Don’t write real-time APIs. Move your database to the browser. Homebase keeps local data in sync so you can build fast and collaborative React apps.
Changes are pushed to clients in real-time. Read and write local data instantly, cache it forever.
Develop with a local database that's as capable as cloud DBs. Cut out your API and let homebase sync state and help you manage data flows.
Our system resolves conflicts automatically so you don't have to worry about realtime collaboration or offline support.
"Homebase is executing on the vision of data usage, portability, and management we had when building Firebase. We never got there. I'm excited!"
1const [currentUser] = useCurrentUser()
2const [project] = useQuery({
3 project: { name: 'Build the thing' }
4})
5const [transact, errors, syncing] = useTransact()
6const [ids, dbAfter, dbBefore] = transact([{
7 todo: {
8 title: 'Write more code',
9 assignedTo: currentUser,
10 project
11 }
12}])
Your DB is like Git now. Share it directly with the client. Replicate, fork, and join data from multiple Homebase databases. This is possible because of the automatic conflict resolution and built-in versioning of data. As a side effect of this data portability, you can eliminate many APIs and ETLs.
Attribute-level authorization simplified. Publishing of public APIs, end-to-end encryption, easy GDPR. It all comes by default when using Homebase + Datahike.
Skip API development and start building with React and Homebase. It all starts in your browser. Setup is a few lines of code. Add schema, relationships and validations incrementally.
Make your app feel native. Make it faster and work offline. Our consistency mechanisms make offline transactions as easy as transacting to a central cloud database.
Don't wait on the network. We'll cache everything and automatically subscribe clients to changes.
Homebase keeps your local and cloud data in sync so everything just works. No API needed. We'll back it up, sync it, and even help you authenticate and authorize users.
When it's time to ship we make it easy. Homebase automatically builds dev and staging environments. In prod we've got you covered with telemetry and the first set of administration tools for local-first data. We love to sleep too.
Because it lives in multiple places it has to encode extra metadata that enable many features you'd normally have to build from scratch.
Don't wait on the network. We'll cache everything and automatically subscribe clients to changes.
1import { useCurrentUser, useQuery } from 'homebase-react'
2
3const Todos = ({ project }) => {
4 const [currentUser] = useCurrentUser()
5 const [todos, errors, syncing] = useQuery({
6 $find: 'todo',
7 $where: {
8 todo: {
9 project,
10 isArchived: false,
11 assignedTo: { $not: currentUser },
12 },
13 },
14 $sort: { todo: { createdAt: 'asc' } },
15 })
16
17 if (errors) return errors.map((e, i) => <Error key={i} error={e} />)
18 return todos.map((todo) => <Todo key={todo.id} todo={todo} />)
19}
Make your app feel native. Make it faster and work offline. Our consistency mechanisms make offline transactions as easy as transacting to a central cloud database.
1import { useCurrentUser, useEntity, useTransact } from 'homebase-react'
2
3// Create
4const [currentUser] = useCurrentUser()
5const [project] = useEntity({ project: { name: 'Build the thing' }})
6const [transact, errors, syncing] = useTransact()
7const [ids, dbAfter, dbBefore] = transact([{
8 todo: {
9 title: 'Write more code',
10 assignedTo: currentUser,
11 project
12 }
13}])
14
15// Update
16transact([{
17 todo: {
18 id: ids[0],
19 isCompleted: true
20 },
21}])
Homebase keeps your local and cloud data in sync. No API needed.
1<HomebaseProvider config={{ namespace: 'yourdomain.com' }}>
2 <YourComponents />
3</HomebaseProvider>
1import { useCurrentUser, useQuery } from 'homebase-react'
2
3const Todos = ({ project }) => {
4 const [currentUser] = useCurrentUser()
5 const [todos, errors, syncing] = useQuery({
6 $find: 'todo',
7 $where: {
8 todo: {
9 project,
10 isArchived: false,
11 assignedTo: { $not: currentUser },
12 },
13 },
14 $sort: { todo: { createdAt: 'asc' } },
15 })
16
17 if (errors) return errors.map((e, i) => <Error key={i} error={e} />)
18 return todos.map((todo) => <Todo key={todo.id} todo={todo} />)
19}