Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justinline/replimix
Example of Remix, Replicache + Drizzle ORM for local-first multiplayer fun!
https://github.com/justinline/replimix
drizzle-orm local-first remix replicache typescript
Last synced: about 4 hours ago
JSON representation
Example of Remix, Replicache + Drizzle ORM for local-first multiplayer fun!
- Host: GitHub
- URL: https://github.com/justinline/replimix
- Owner: justinline
- License: mit
- Created: 2024-06-04T11:32:39.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-04T11:58:46.000Z (5 months ago)
- Last Synced: 2024-06-04T12:55:45.002Z (5 months ago)
- Topics: drizzle-orm, local-first, remix, replicache, typescript
- Language: TypeScript
- Homepage:
- Size: 125 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome to Replimix!
A small boilerplate app to get prototyping building local-first/multiplayer apps with Replicache and Remix.
This is built following the steps from: https://doc.replicache.dev/byob/intro but adapted for Remix/Drizzle. You can follow along there and reference this code to understand the steps to building it.
## Local-first
We're jumping on the next availble local-first train to funsville! Read more about local first applications here: https://localfirstweb.dev/
This boiler plate is a local-first chat application where you can have low-latency chat with automatic syncing in the background. Data is primarily stored in the browser and synced using things called CRDT's (via replicache) to a postgres database.
## Tech
- [Remix docs](https://remix.run/docs)
- [Remix Vite docs](https://remix.run/docs/en/main/guides/vite)
- [Replicache docs](https://doc.replicache.dev/)
- [Drizzle ORM docs](https://orm.drizzle.team/docs/overview)
- [Tailwind CSS docs](https://tailwindcss.com/docs)## Postgres db
- You'll need docker installed on your system
- Pull the docker postgres image `docker pull postgres`
- Run the postgres db in a container `docker run --name replimix-db -e POSTGRES_USER=docker -e POSTGRES_PASSWORD=docker -e POSTGRES_DB=postgres -p 5432:5432 -d postgres`
- Update your .env DATABASE_URL to point to your running db, see the example.
- Apply the db migrations to your postgres db `npx drizzle-kit migrate`## Development
After your db is set up, you can run the Vite dev server:
```shellscript
npm run dev
```## Party!
You can access your `localhost:5173` instance in multiple browsers/tabs/computers and watch changes get push/pulled in realtime 🥳