mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-10 15:36:53 +02:00
6d01ee33ef4091bd956d4d62859bb8a37af52b40
Core Architecture: - Protocol adapter pattern for chat implementations - Base adapter interface with protocol-specific implementations - Auto-detection of protocol from identifier format - Reactive message loading via EventStore observables Protocol Implementations: - NIP-C7 adapter: Simple chat (kind 9) with npub/nprofile support - NIP-29 adapter: Relay-based groups with member roles and moderation - Protocol-aware reply message loading with relay hints - Proper NIP-29 members/admins fetching using #d tags UI Components: - ChatViewer: Main chat interface with virtualized message timeline - ChatMessage: Message rendering with reply preview - ReplyPreview: Auto-loading replied-to messages from relays - MembersDropdown: Virtualized member list with role labels - RelaysDropdown: Connection status for chat relays - ChatComposer: Message input with send functionality Command System: - chat command with identifier parsing and auto-detection - Support for npub, nprofile, NIP-05, and relay'group-id formats - Integration with window system and dynamic titles NIP-29 Specific: - Fetch kind:39000 (metadata), kind:39001 (admins), kind:39002 (members) - Extract roles from p tags: ["p", "<pubkey>", "<role1>", "<role2>"] - Role normalization (admin, moderator, host, member) - Single group relay connection management Testing: - Comprehensive chat parser tests - Protocol adapter test structure - All tests passing (704 tests) 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%