https://github.com/electric-sql/lofi-todo
Electric To-Do app for the LoFi Discord Build Day
https://github.com/electric-sql/lofi-todo
Last synced: 3 months ago
JSON representation
Electric To-Do app for the LoFi Discord Build Day
- Host: GitHub
- URL: https://github.com/electric-sql/lofi-todo
- Owner: electric-sql
- Created: 2024-05-17T14:19:42.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-21T12:00:28.000Z (over 1 year ago)
- Last Synced: 2025-10-08T10:47:07.762Z (3 months ago)
- Language: TypeScript
- Size: 202 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Welcome to your ElectricSQL app!
This is an example web application using ElectricSQL in the browser with [wa-sqlite](https://github.com/rhashimoto/wa-sqlite).
## Pre-reqs
You need [NodeJS >= 16.11 and Docker Compose v2](https://electric-sql.com/docs/usage/installation/prereqs).
## Install
Install the dependencies:
```sh
npm install
```
## Setup
Start Postgres and Electric using Docker (see [running the examples](https://electric-sql.com/docs/examples/notes/running) for more options):
```shell
npm run backend:up
# Or `npm run backend:start` to foreground
```
Note that, if useful, you can connect to Postgres using:
```shell
npm run db:psql
```
Setup your [database schema](https://electric-sql.com/docs/usage/data-modelling):
```shell
npm run db:migrate
```
Generate your [type-safe client](https://electric-sql.com/docs/usage/data-access/client):
```shell
npm run client:generate
# or `yarn client:watch`` to re-generate whenever the DB schema changes
```
## Run
Start your app:
```sh
npm run dev
```
Open [localhost:5173](http://localhost:5173) in your web browser.
## Develop
`./src/Example.tsx` has the main example code. For more information see the:
- [Documentation](https://electric-sql.com/docs)
- [Quickstart](https://electric-sql.com/docs/quickstart)
- [Usage guide](https://electric-sql.com/docs/usage)
If you need help [let us know on Discord](https://discord.electric-sql.com).