A lightweight, modular Dungeons & Dragons companion app built with Tauri v2, Svelte, TypeScript, and Rust.
The app is a black workspace where sub apps open as draggable internal windows. Sub apps communicate through a JSON event bus.
┌─────────────────────────────────────────┐
│ Toolbar [Dice Roller] [Spell List] │
├─────────────────────────────────────────┤
│ │
│ ┌─ Dice Roller ──┐ ┌─ Spell List ─┐ │
│ │ │ │ │ │
│ │ [D20] → 17 │ │ Fire Bolt │ │
│ │ │ │ 🎲 1D10 ──────── eventBus ──→ Dice Roller
│ │ History... │ │ │ │
│ └─────────────────┘ └──────────────┘ │
│ │
└─────────────────────────────────────────┘
Sub apps send JSON messages to each other:
{ "target": "diceRoller", "source": "spellList", "action": "roll", "dice": "1D10" }
Response:
{ "target": "spellList", "source": "diceRoller", "action": "rollResult", "dice": "1D10", "result": 7 }
src/apps/yourApp/YourApp.svelteconfigs/registry.jsononMountApp.svelte# Install JS dependencies
npm install
# Run in development mode (opens desktop window)
npm run tauri dev
# Build for production
npm run tauri build
npm run dev
# Open http://localhost:1420
src/
main.ts # Entry point
App.svelte # Workspace manager
lib/
types.ts # Shared TypeScript types
eventBus.ts # JSON message bus
appRegistry.ts # Sub app registry
dice.ts # Dice parsing & rolling engine
apps/
diceRoller/
DiceRoller.svelte # Dice Roller UI
spellList/
SpellList.svelte # Spell List UI
spellSlots/
SpellSlots.svelte # Spell Slot tracker
spellcasting/
Spellcasting.svelte # Spellcasting stats
magicItems/
MagicItems.svelte # Magic item inventory
goldPurse/
GoldPurse.svelte # Currency tracker
inventory/
Inventory.svelte # Equipment & items
weaponsCantrips/
WeaponsCantrips.svelte # Weapons & cantrips
hpTracker/
HpTracker.svelte # Hit point tracker
skills/
Skills.svelte # Skill proficiencies
traits/
Traits.svelte # Character traits
proficiencies/
Proficiencies.svelte # Proficiency list
notes/
Notes.svelte # Session notes
characterProfile/
CharacterProfile.svelte # Character overview
components/
WindowFrame.svelte # Draggable window wrapper
Toolbar.svelte # Top toolbar
MobileNav.svelte # Mobile navigation
SettingsPanel.svelte # App settings
src-tauri/
src/
lib.rs # Rust commands (dice, config I/O)
main.rs # Desktop entry point
tauri.conf.json # Tauri config
configs/
registry.json # Sub app registry
diceRoller.json # Dice Roller saved state
spellList.json # Spell data
2D8+3, 1D20-1