Skip to content

Commit

Permalink
Merge pull request #2 from cindywu/update-README
Browse files Browse the repository at this point in the history
update README
  • Loading branch information
cindywu authored Oct 18, 2022
2 parents 57f99e7 + 9352d92 commit 5e85616
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Jammy

Multiplayer local-first native macOS app for indexing your stuff. Works offline.

Built with [Tauri](https://tauri.app/), [Next.js](https://nextjs.org/), [Replicache](https://replicache.dev), [DBngin](https://dbngin.com/), [Postgres](https://www.postgresql.org/), [TailwindCSS](https://tailwindcss.com/).

## Getting Started

Install Tauri CLI:
Expand All @@ -6,6 +12,27 @@ Install Tauri CLI:
npm install --save-dev @tauri-apps/cli
```

Install Postgres on MacOS

```bash
brew update
brew install postgresql
```

Download and install [DBngin](https://dbngin.com/).

Using DBngin create a new PostgreSQL database server.

Using DBngin start your PostgreSQL database server.

Download and install [TablePlus](https://tableplus.com/).

Using DBngin open your PostgreSQL database in TablePlus.

Your Postgres URI is: postgres://postgres:[name]@localhost:[port]/postgres

Example: postgres://postgres:jammy-one@localhost:1234/postgres

Run the development server:

```bash
Expand All @@ -14,4 +41,28 @@ npm run tauri dev

A little desktop app will appear.

![screenshot](./public/screenshot.png)
![screenshot](./public/screenshot-full.png)

In a new browser tab visit `localhost:3000/api/init` to create the `message` and `replicache-client` tables in your PostgreSQL database. This is successful if you recieve an `ok` in the browser.

You can now start submitting messages in the little desktop app.

Note: When clicking the Submit button, Replicache implements a mutation on the client-side (IndexedDB) and a mutation on the server (local Postgres). On the next pull, the client-side (IndexedDB) is updated with the authoritative changes of the server (local Postgres).

In this toy app, the local Postgres is the authoritative server.

## Coming soon
The idealistic goal is to change the responsibility of the server. The native client is not reliant on the cloud server. This is achieved with the native client reading and writing to copy of the database held in a local Postgres server. The cloud servers' purpose is enabling an instant-ui multiplayer experience for clients syncing data between native clients and web clients.

- listen for changes to the local Postgres server notifying clients to pull
- push local Postgres mutations to cloud server (Supabase Postgres or Reflect Cloudflare Durable Objects) enabling multiplayer across devices
- listen for changes to cloud server and pull changes to local Postgres









Binary file added public/screenshot-full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5e85616

Please sign in to comment.