https://github.com/simonkarman/krmx-best-practices
Best practices of a system setup for Krmx
https://github.com/simonkarman/krmx-best-practices
Last synced: about 2 months ago
JSON representation
Best practices of a system setup for Krmx
- Host: GitHub
- URL: https://github.com/simonkarman/krmx-best-practices
- Owner: simonkarman
- Created: 2023-11-16T01:03:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-11T14:43:21.000Z (about 1 year ago)
- Last Synced: 2025-02-09T14:52:32.910Z (3 months ago)
- Language: TypeScript
- Size: 876 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎟️ Krmx Best Practices
If you've used Krmx before you know it can be tedious to manually sync state on server and client-side. To circumvent these issues, this mono repo sets up a [Krmx](https://simonkarman.github.io/krmx) server and client using a **System** architecture.A **System** is a shared state store with predefined actions that uniformly alter that state on the server and clients. The clients use optimistic updates to give immediate feedback to the user.

## Features
If you've used Krmx before you know it can be tedious to manually sync state on server and client-side.
- Uniform state management
- Optimistic updates at the Client-Side
- Utilize React ContextAPI to get the state
- Keep track of history to seamlessly let new clients join
- Use batches of events to stream history to clients
- Restore server state on restart by replaying history## Getting started
First run `npm install` in the root of this repository.Then, run `npm run dev` to start the system, server and client in development mode.