A simple real-time chat application built with Ankurah, demonstrating distributed reactive updates across React frontend and Rust backend.
- Real-time message synchronization
- Persistent storage (Sled on server, IndexedDB in browser)
- Automatic user creation with localStorage persistence
- WebSocket-based peer communication
- Reactive UI updates
- model/ - Shared data models (User, Room, Message)
- server/ - Rust server with Sled storage and WebSocket connector
- wasm-bindings/ - WASM bindings exposing Ankurah to JavaScript
- react-app/ - React frontend application
cargo run -p {{project-name}}-serverThe server will:
- Initialize Sled storage at
~/.{{project-name}}/ - Create a "General" chat room
- Listen for WebSocket connections on
127.0.0.1:9898
cd wasm-bindings
wasm-pack build --target web --dev
cd ..cd react-app
bun install
bun run devThe app will be available at http://localhost:5173
display_name: String (YrsString) - User's display name
name: String (YrsString) - Room name
user: String (LWW) - User ID who sent the messageroom: String (LWW) - Room ID where message was senttext: String (YrsString) - Message contenttimestamp: i64 (LWW) - Unix timestamp in milliseconds
# Server
cargo build --release -p {{project-name}}-server
# WASM
cd wasm-bindings && wasm-pack build --target web --release
# React app
cd react-app && bun run buildMIT or Apache-2.0