mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-12 08:27:27 +02:00
024be8d7eae94bba5005ed3f8b44c6db79b6d3c0
Replaced action-based self-chat with direct implementation using publishEventToRelays. This eliminates the dependency on patched node_modules and provides a more robust solution. **Why This Change:** The previous approach relied on patching applesauce-actions in node_modules to fix the relay hint bug. This patch would be lost on every npm install, making it fragile and non-reproducible. **New Self-Chat Flow:** 1. Create rumor using WrappedMessageBlueprint (kind 14) 2. Wrap rumor using GiftWrapBlueprint (kind 1059) 3. Persist encrypted content to Dexie BEFORE publishing 4. Publish directly to inbox relays using publishEventToRelays 5. Add to EventStore for immediate local availability **Benefits:** - ✅ No dependency on node_modules patches - ✅ Guaranteed to work across npm installs - ✅ Direct control over relay selection - ✅ Encrypted content persisted before publish (no race conditions) - ✅ Clean separation: self-chat vs group chat logic **Non-Self-Chat:** Still uses SendWrappedMessage action (with patched applesauce for now). Future work: Extend custom implementation to all message types. **Testing:** Self-chat messages should now: - Appear live within 500ms (no manual sync) - Persist across page reloads - Match subscribed relay URLs exactly - Include proper console logging at each step Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Grimoire
A Nostr protocol explorer and developer tool with a tiling window manager interface.
Features
- Tiling Windows - Each window is a Nostr "app" (profile viewer, event feed, NIP docs, etc.)
- Command Palette - Unix-style commands via
Cmd+Kto open apps and navigate - Multi-workspace - Virtual desktops with independent layouts
- Real-time - Reactive event subscriptions with automatic updates
Stack
React 19, TypeScript, Vite, TailwindCSS, Jotai, Dexie, Applesauce
Getting Started
npm install
npm run dev
Scripts
| Command | Description |
|---|---|
npm run dev |
Start dev server |
npm run build |
Build for production |
npm test |
Run tests in watch mode |
npm run lint |
Lint code |
npm run format |
Format code |
License
MIT
Languages
TypeScript
98.9%
CSS
0.8%
JavaScript
0.3%