Skip to content

Commit

Permalink
chore: update electric-next to electric (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews authored Aug 7, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent f413a68 commit 3a412bf
Showing 14 changed files with 25 additions and 25 deletions.
4 changes: 2 additions & 2 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -307,10 +307,10 @@ If you have any questions or need support, ask on the `#help-and-support` channe

### Get involved in development

`electric-next` is open source (Apache 2.0) and developed on GitHub at [electric-sql/electric-next](https://github.com/electric-sql/electric-next).
`electric` is open source (Apache 2.0) and developed on GitHub at [electric-sql/electric](https://github.com/electric-sql/electric).

See:

- the [open issues](https://github.com/electric-sql/electric-next/issues) on the repo
- the [open issues](https://github.com/electric-sql/electric/issues) on the repo
- the public RFCs at [electric-sql/rfcs](https://github.com/electric-sql/rfcs)
- the [contributing guide](https://github.com/electric-sql/electric/blob/main/CONTRIBUTING.md) here
4 changes: 2 additions & 2 deletions docs/api/clients/typescript.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ outline: deep

# TypeScript client

The client is defined in [packages/typescript-client](https://github.com/electric-sql/electric-next/tree/main/packages/typescript-client). It provides [ShapeStream](#shapestream) and [Shape](#shape) primitives to stream and materialize shapes.
The client is defined in [packages/typescript-client](https://github.com/electric-sql/electric/tree/main/packages/typescript-client). It provides [ShapeStream](#shapestream) and [Shape](#shape) primitives to stream and materialize shapes.

## Use cases

@@ -51,7 +51,7 @@ By default, `ShapeStream` parses the following Postgres types into native JavaSc
All other types aren't parsed and are left in the string format as they were served by the HTTP endpoint.

The `ShapeStream` can be configured with a custom parser that is an object mapping Postgres types to parsing functions for those types.
For example, we can extend the [default parser](https://github.com/electric-sql/electric-next/blob/main/packages/typescript-client/src/parser.ts#L14-L22) to parse booleans into `1` or `0` instead of `true` or `false`:
For example, we can extend the [default parser](https://github.com/electric-sql/electric/blob/main/packages/typescript-client/src/parser.ts#L14-L22) to parse booleans into `1` or `0` instead of `true` or `false`:

```ts
const stream = new ShapeStream({
2 changes: 1 addition & 1 deletion docs/api/http.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ The HTTP API is the primary, low level API for syncing data with Electric Next.

Normative API documentation is published as an [OpenAPI](https://www.openapis.org/what-is-openapi) specification:

- [download the specification file](https://github.com/electric-sql/electric-next/blob/main/docs/electric-api.yaml) to view or use with other OpenAPI [tooling](https://tools.openapis.org/)
- [download the specification file](https://github.com/electric-sql/electric/blob/main/docs/electric-api.yaml) to view or use with other OpenAPI [tooling](https://tools.openapis.org/)
- <a href="/openapi.html" target="_blank">view the HTML documentation</a> generated using [Redocly](https://redocly.com)

The rest of this page will describe the features of the API.
2 changes: 1 addition & 1 deletion docs/electric-api.yaml
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ paths:
a schema prefix, then the table is assumed to be in the `public.` schema.
Note that tablenames with special characters may not be parsed correctly
pending https://github.com/electric-sql/electric-next/issues/185
pending https://github.com/electric-sql/electric/issues/185
# Query parameters
- name: offset
in: query
8 changes: 4 additions & 4 deletions docs/guides/quickstart.md
Original file line number Diff line number Diff line change
@@ -4,15 +4,15 @@ outline: 2

# Quickstart

This guide will get you up and running with `electric-next` and real-time sync of your Postgres data. First using the [HTTP API](/api/http) directly. Then using our [TypeScript client](/api/clients/typescript) with a [React hook](/api/integrations/react) to sync data into a simple application.
This guide will get you up and running with `electric` and real-time sync of your Postgres data. First using the [HTTP API](/api/http) directly. Then using our [TypeScript client](/api/clients/typescript) with a [React hook](/api/integrations/react) to sync data into a simple application.

## Setup

You need to have a Postgres database and to run Electric in front of it.

You can use any Postgres (new or existing) that has logical replication enabled. You also need to connect as a database user that has the [`REPLICATION` privilege](https://www.postgresql.org/docs/current/logical-replication-security.html).

Electric is an [Elixir](https://elixir-lang.org) web application published as a Docker image at [electricsql/electric-next](https://hub.docker.com/r/electricsql/electric-next). It connects to Postgres via a `DATABASE_URL`.
Electric is an [Elixir](https://elixir-lang.org) web application published as a Docker image at [electricsql/electric](https://hub.docker.com/r/electricsql/electric). It connects to Postgres via a `DATABASE_URL`.

Make sure you have Docker running with [Docker Compose](https://docs.docker.com/compose). Then create a new folder to work in:

@@ -21,7 +21,7 @@ mkdir my-first-electric
cd my-first-electric
```

Run a fresh Postgres and Electric using this [docker-compose.yaml](https://github.com/electric-sql/electric-next/blob/main/docs/public/docker-compose.yaml) file:
Run a fresh Postgres and Electric using this [docker-compose.yaml](https://github.com/electric-sql/electric/blob/main/docs/public/docker-compose.yaml) file:

```sh
curl -O https://next.electric-sql.com/docker-compose.yaml
@@ -229,4 +229,4 @@ Note that the row with id `2` has the name `"Bob"`. Go back to your Postgres cli
UPDATE foo SET name = 'James' WHERE id = 2;
```
Congratulations! You've built your first real-time, reactive `electric-next` app!
Congratulations! You've built your first real-time, reactive `electric` app!
4 changes: 2 additions & 2 deletions docs/product/ddn.md
Original file line number Diff line number Diff line change
@@ -17,12 +17,12 @@ This allows you to scale out real-time data to millions of concurrent users from

## How does it work?

`electric-next` has been designed from the ground up to deliver fast initial data loads and low latency ongoing sync. It exposes this through an [HTTP API](/api/http) that provides standard caching headers that work out-of-the-box with CDNs like Cloudflare and Fastly.
`electric` has been designed from the ground up to deliver fast initial data loads and low latency ongoing sync. It exposes this through an [HTTP API](/api/http) that provides standard caching headers that work out-of-the-box with CDNs like Cloudflare and Fastly.

## How do I use it?

<!-- FIXME: add CDN integration guide -->

Run Electric and put it behind a CDN.

We will add more detailed guide and example content. For now, see the [sync-service/dev/nginx.conf](https://github.com/electric-sql/electric-next/blob/main/packages/sync-service/dev/nginx.conf) and [typescript-client/test/cache.test.ts](https://github.com/electric-sql/electric-next/blob/main/packages/typescript-client/test/cache.test.ts) for example usage.
We will add more detailed guide and example content. For now, see the [sync-service/dev/nginx.conf](https://github.com/electric-sql/electric/blob/main/packages/sync-service/dev/nginx.conf) and [typescript-client/test/cache.test.ts](https://github.com/electric-sql/electric/blob/main/packages/typescript-client/test/cache.test.ts) for example usage.
2 changes: 1 addition & 1 deletion docs/product/electric.md
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ You can sync data into:

## How does it work?

The Electric sync engine is an [Elixir](https://elixir-lang.org) application, developed at [electric-sql/electric-next/tree/main/packages/sync-service](https://github.com/electric-sql/electric-next/tree/main/packages/sync-service).
The Electric sync engine is an [Elixir](https://elixir-lang.org) application, developed at [electric-sql/electric/tree/main/packages/sync-service](https://github.com/electric-sql/electric/tree/main/packages/sync-service).

It connects to your Postgres using a `DATABASE_URL`, consumes the logical replication stream and provides [an HTTP API](/api/http) for replicating [Shapes](/guides/shapes).

2 changes: 1 addition & 1 deletion docs/public/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ services:
- wal_level=logical

electric:
image: electricsql/electric-next
image: electricsql/electric
environment:
DATABASE_URL: postgresql://postgres:password@postgres:5432/electric
ports:
6 changes: 3 additions & 3 deletions examples/redis-client/package.json
Original file line number Diff line number Diff line change
@@ -16,14 +16,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/electric-sql/electric-next.git"
"url": "git+https://github.com/electric-sql/electric.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/electric-sql/electric-next/issues"
"url": "https://github.com/electric-sql/electric/issues"
},
"homepage": "https://github.com/electric-sql/electric-next#readme",
"homepage": "https://github.com/electric-sql/electric#readme",
"dependencies": {
"@electric-sql/client": "workspace:*",
"redis": "^4.6.14"
2 changes: 1 addition & 1 deletion examples/todo-app/package.json
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
"author": "Kyle Mathews <[email protected]>",
"private": true,
"bugs": {
"url": "https://github.com/electric-sql/electric-next/issues"
"url": "https://github.com/electric-sql/electric/issues"
},
"dependencies": {
"@electric-sql/react": "workspace:*",
4 changes: 2 additions & 2 deletions packages/react-hooks/package.json
Original file line number Diff line number Diff line change
@@ -21,12 +21,12 @@
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+https://github.com/electric-sql/electric-next.git"
"url": "git+https://github.com/electric-sql/electric.git"
},
"author": "ElectricSQL team and contributors.",
"license": "Apache-2",
"bugs": {
"url": "https://github.com/electric-sql/electric-next/issues"
"url": "https://github.com/electric-sql/electric/issues"
},
"homepage": "https://next.electric-sql.com",
"dependencies": {
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ defmodule Electric.Postgres.ReplicationClient.Collector do
# `REPLICA IDENTITY FULL`. Thanks to that we can replace the `:unchanged_toast`
# placeholder with actual values before returning the decoded record update.
#
# For more info, see https://github.com/electric-sql/electric-next/issues/171.
# For more info, see https://github.com/electric-sql/electric/issues/171.
column_name, :unchanged_toast -> Map.fetch!(old_data, column_name)
_, value -> value
end)
4 changes: 2 additions & 2 deletions packages/typescript-client/README.md
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@
</p>

<p align="center">
<a href="https://github.com/electric-sql/electric-next/actions"><img src="https://github.com/electric-sql/electric-next/workflows/CI/badge.svg" alt="CI"></a>
<a href="https://github.com/electric-sql/electric-next/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache_2.0-green" alt="License - Apache 2.0"></a>
<a href="https://github.com/electric-sql/electric/actions"><img src="https://github.com/electric-sql/electric/workflows/CI/badge.svg" alt="CI"></a>
<a href="https://github.com/electric-sql/electric/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache_2.0-green" alt="License - Apache 2.0"></a>
<a href="https://github.com/electric-sql/electric-n
ext/milestones"><img src="https://img.shields.io/badge/status-alpha-orange" alt="Status - Alpha"></a>
<a href="https://discord.electric-sql.com"><img src="https://img.shields.io/discord/933657521581858818?color=5969EA&label=discord" alt="Chat - Discord"></a>
4 changes: 2 additions & 2 deletions packages/typescript-client/package.json
Original file line number Diff line number Diff line change
@@ -21,12 +21,12 @@
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+https://github.com/electric-sql/electric-next.git"
"url": "git+https://github.com/electric-sql/electric.git"
},
"author": "ElectricSQL team and contributors.",
"license": "Apache-2",
"bugs": {
"url": "https://github.com/electric-sql/electric-next/issues"
"url": "https://github.com/electric-sql/electric/issues"
},
"homepage": "https://next.electric-sql.com",
"dependencies": {},

0 comments on commit 3a412bf

Please sign in to comment.