Skip to content

Commit

Permalink
Update README: It's like GraphQL, but for Postgres. (#2120)
Browse files Browse the repository at this point in the history
1. Minor NITs & formatting fixes
2. Add Table of Contents
3. Add a new tagline

---------

Co-authored-by: Kyle Mathews <[email protected]>
  • Loading branch information
Olshansk and KyleAMathews authored Dec 9, 2024
1 parent 1a7106f commit abad10e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,21 @@
<a href="https://x.com/ElectricSQL" target="_blank"><img src="https://img.shields.io/twitter/follow/ElectricSQL.svg?style=social&label=Follow @ElectricSQL"></a>
</p>

# Electric
# Electric <!-- omit in toc -->

Your Postgres data, in sync, wherever you need it.

**Table of Contents:**

- [Quick links](#quick-links)
- [What is Electric?](#what-is-electric)
- [Getting Started](#getting-started)
- [HTTP API Docs](#http-api-docs)
- [Developing Electric](#developing-electric)
- [Mac setup](#mac-setup)
- [Contributing](#contributing)
- [Support](#support)

## Quick links

- [Quickstart](https://electric-sql.com/docs/quickstart)
Expand All @@ -38,7 +49,7 @@ Your Postgres data, in sync, wherever you need it.

Electric provides an [HTTP API](https://electric-sql.com/docs/api/http) for syncing [Shapes](https://electric-sql.com/docs/guides/shapes) of data from Postgres. This can be used directly or via [client libraries](https://electric-sql.com/docs/api/clients/typescript) and [integrations](https://electric-sql.com/docs/api/integrations/react).

### This looks a bit different than the last time I visited?
### This looks a bit different than the last time I visited? <!-- omit in toc -->

We started a clean rebuild of the sync engine in July 2024. One that's informed by the lessons learned building the [previous system](https://github.com/electric-sql/electric-old). See
[James' blog post for background on the change](https://electric-sql.com/blog/2024/07/17/electric-next).
Expand All @@ -65,15 +76,15 @@ curl -i 'http://localhost:3000/v1/shape?table=foo&offset=-1'
Or use one of the clients or integrations, such as the [`useShape`](https://electric-sql.com/docs/api/integrations/react) React hook:

```jsx
import { useShape } from '@electric-sql/react'
import { useShape } from "@electric-sql/react"

function Component() {
const { data } = useShape({
url: `http://localhost:3000/v1/shape`,
params: {
table: `foo`,
where: `title LIKE 'foo%'`
}
where: `title LIKE 'foo%'`,
},
})

return JSON.stringify(data)
Expand Down

0 comments on commit abad10e

Please sign in to comment.