Skip to content

Commit 02b3d55

Browse files
authored
docs(readme): refactor readme to be more focused, added logo (#25)
1 parent af6145d commit 02b3d55

File tree

2 files changed

+28
-34
lines changed

2 files changed

+28
-34
lines changed

README.md

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<img src="public/images/logo-blk.png" height="50" align="right">
2+
13
# Homebase React
24

35
[![CI](https://github.com/homebaseio/homebase-react/workflows/CI/badge.svg)](https://github.com/homebaseio/homebase-react/actions?query=workflow%3ACI)
@@ -8,7 +10,10 @@
810

911
*The graph database for delightful React state management*
1012

11-
## Installation
13+
14+
Homebase React makes state management painless by enabling you to plug a relational graph database into your React application with just 3 lines of code. This is the same database that powers Roam Research and many other ClojureScript applications, but with an API that's familiar to React and JS developers.
15+
16+
## Install
1217

1318
```bash
1419
# NPM
@@ -17,22 +22,22 @@ npm install homebase-react --save
1722
# Yarn
1823
yarn add homebase-react
1924
```
25+
## Features
26+
- The simplest and most declarative state management solution
27+
- The power of a backend relational graph database, but without having to wait on the network
28+
- Convenient JSON query syntax
29+
- Powerful Clojure style [Datalog](https://docs.datomic.com/on-prem/query.html) query syntax if you need it
30+
- Traverse your data graph like it's a big JSON object
31+
- Backup your data to the cloud
2032

21-
## Purpose
22-
23-
Data should be a first class citizen on the client. We deserve the ergonomics and power of relational databases not just on the server, but in our React applications.
24-
25-
Homebase React lets you plug a relational database into your React application with just 3 lines of code. In fact, it's the same database that powers Roam Research and many other ClojureScript applications, but with an API that's familiar to React and JS developers.
26-
27-
- Replace Redux with something simpler and more declarative
28-
- Stop spending time wiring up custom datatypes, reducers, caches and other bespoke state mumbo jumbo
29-
- Gain all the benefits of relational data like a single source of truth
30-
- Traverse your data graph like it's one big JSON object
31-
- Query your database with a convenient JSON query syntax
32-
- Query your database with Clojure style [Datalog](https://docs.datomic.com/on-prem/query.html) if you need more power
33-
- It's just data
33+
## Roadmap
3434

35-
The goal of Homebase React is to be immediately more intuitive than any denormalized JSON store and over time we will eliminate all the tedious aspects of manipulating data on clients. Homebase React makes it easier to work with complex data on client by making our applications [local-first](https://news.ycombinator.com/item?id=21581444).
35+
1. Document integration with more backends
36+
1. Swap [Datascript](https://github.com/tonsky/datascript) out for [Datahike](https://github.com/replikativ/datahike)
37+
1. Immutability
38+
1. History / Change Tracking
39+
2. Persist to IndexedDB
40+
3. [Local-first](https://www.inkandswitch.com/local-first.html) conflict resolution for offline caching and sync between multiple devices
3641

3742
## Examples
3843
### Live Demos
@@ -41,7 +46,6 @@ You can see our hosted live demos [here](https://homebaseio.github.io/homebase-r
4146
### Code Examples
4247
You can clone and run our React code examples [here](https://github.com/homebaseio/homebase-react-examples).
4348

44-
4549
## API Overview
4650

4751
### `HomebaseProvider`
@@ -52,13 +56,12 @@ The HomebaseProvider wraps your React app and makes a relational database access
5256
import { HomebaseProvider, useEntity, useTransact, useQuery } from 'homebase-react'
5357

5458
const config = {
55-
// Schema is not a type system like in most DBs.
56-
// That is something we're considering, but for now it is
57-
// mainly applied at query time to simplify relational queries.
58-
// The only schema currently supported is:
59+
// Schema is not a type system,
60+
// it's a way to simplify relational queries at query time.
61+
// The schema currently supported is:
5962
// `type: 'ref'` which is a relationship and
6063
// `unique: 'identity` which enforces a uniqueness constraint
61-
// and let's you lookup entities by their unique attributes.
64+
// and lets you lookup entities by their unique attributes.
6265
schema: {
6366
todo: {
6467
project: { type: 'ref' },
@@ -132,9 +135,9 @@ transact([['retractEntity', 1]])
132135

133136
### `useQuery`
134137

135-
Use queries to return an array of entities that meet a given criteria. Our query API is powered by datalog, but exposed as JSON similar to a JS SQL driver or Mongo DB. Datalog is similar to SQL and is incredibly powerful. However only a subset of features are currently available in JSON.
138+
Use queries to return an array of entities that meet a given criteria. Our query API is powered by Datalog, but exposed as JSON similar to a JS SQL driver or MongoDB. Datalog is similar to SQL and is incredibly powerful. However, only a subset of features are currently available in JSON.
136139

137-
We are very interested in what features the community wants, and will prioritize based on feedback. In the meantime you can further filter results with JS `filter()` and `sort()`.
140+
We will prioritize features based on community feedback so please open an issue if there's something you need. In the meantime you can further filter results with JS `filter()` and `sort()`.
138141

139142
```js
140143
// Finds all todos with a name
@@ -167,6 +170,8 @@ This hook returns the current database client with some helpful functions for sy
167170

168171
Check out the [Firebase example](https://homebaseio.github.io/homebase-react/#!/example.todo_firebase) for a demonstration of how you might integrate a backend.
169172

173+
174+
170175
## Performance
171176

172177
Homebase React tracks the attributes consumed in each component via the `entity.get` function and scopes those attributes to their respective `useEntity` or `useQuery` hook. Re-renders are only triggered when an attribute changes.
@@ -201,17 +206,6 @@ const Todo = React.memo(({ todo }) => {
201206

202207
## Docs
203208
https://www.notion.so/Homebase-Alpha-Docs-0f0e22f3adcd4e9d87a13440ab0c7a0b
204-
205-
## Roadmap
206-
207-
1. Improve performance
208-
1. Document integration with backends
209-
1. Swap [Datascript](https://github.com/tonsky/datascript) out for [Datahike](https://github.com/replikativ/datahike)
210-
1. Immutability
211-
1. History / Change Tracking
212-
1. Persist to IndexDB
213-
1. Local-first conflict resolution for offline caching and sync between multiple devices
214-
215209
## Development
216210

217211
```bash

public/images/logo-blk.png

47.6 KB
Loading

0 commit comments

Comments
 (0)