Skip to content

phortx/mithril-forge

Repository files navigation

Mithril Forge

D&D Encounter Tracker — Right in Your Browser

Track initiative, HP, and more across two screens.
One for the DM. One for the players. No install. No account. No cost.

Open Mithril Forge · Report a Bug


Why Mithril Forge?

Managing initiative with paper cards gets unwieldy fast — especially in larger fights where you want to track HP, conditions, and stats properly. Mithril Forge replaces that with a browser-based tracker designed for the tabletop.

Just open it and go. There is nothing to install, no account to create, and no subscription to pay for. All data stays in your browser's local storage — private, instant, and entirely yours.

How It Works

Open two browser windows on the same machine:

  • DM view on your laptop — full stat blocks, HP, all controls
  • Player view on the TV — initiative order, names, active turn

State syncs between the windows automatically via localStorage. No backend, no server, no cloud.


Features

Creature Management

  • Add creatures manually (name, initiative modifier, max HP, AC)
  • Add multiple creatures of the same type at once (e.g. 4 goblins)
  • Inline creature type toggle (switch between Party/Enemy per creature)
  • Kill and revive creatures

Initiative & Turns

  • Roll initiative individually or all at once
  • Set initiative manually via inline editing
  • Sorted initiative order with the active turn highlighted
  • Floating Next Turn button, round counter, and in-game elapsed time (6s per round)
  • Start / Reset / End encounter controls

HP & Combat Tracking

  • Current / Max HP with AC display
  • Color-coded health bars (green → gold → red)
  • Deal damage (absorbed by temp HP first), heal, set temporary HP
  • HP visibility toggle: All HP, Party HP only, or No HP (controls what the Player view shows)

SRD Monster Database

  • Autocomplete search powered by the Open5e API when adding enemies
  • Auto-fills name, initiative modifier (from DEX), max HP, and AC
  • All auto-filled values are overridable before adding
  • Full stat block side panel in DM view (AC, abilities, saves, actions, traits, and more)

DM vs. Player View

Feature Player View DM View
Initiative order yes yes
Names yes yes
Active turn / Round / Timer yes yes
Creature type badges yes yes
Death status yes yes
HP & Health bars configurable yes
AC yes
Stat block side panel yes
HP controls (damage/heal/temp) yes
Kill / Revive yes
Add/remove creatures yes
Roll initiative yes
Encounter controls yes

Roadmap

v0.1 — Proof of Concept

  • Tech stack setup (Bun, React, TypeScript, Vite)
  • GitHub Actions + Pages deployment
  • Add creatures, roll/set initiative, sorted order
  • Active turn highlight, Next Turn, round counter
  • localStorage persistence & cross-tab sync

v0.2 — MVP

  • Fantasy design (dark tones, parchment, thematic fonts, animations, icons)
  • DM / Player view toggle
  • HP tracking (current/max, damage, heal, temp HP)
  • HP visibility toggle (all / party-only / none)
  • In-game elapsed time display
  • Creature type toggle (Party/Enemy inline)
  • AC tracking & display for DM
  • Kill / Revive with death status in Player view
  • Encounter reset / End encounter
  • Add multiple creatures of the same type at once
  • Test coverage

v0.3 — SRD & Stat Blocks

  • SRD monster autocomplete via Open5e API
  • Auto-fill creature stats from SRD data
  • Stat block side panel (DM only)

Future

  • Condition tags
  • Concentration toggle with visual indicator
  • Pets/Summons with owner linkage and shared initiative
  • Notes field per creature (DM only)
  • Keyboard shortcuts
  • D&D Beyond integration

Development

Prerequisites

Setup

bun install

Commands

Command Description
bun run dev Start local dev server with HMR
bun run build Type-check + production build
bun run preview Serve the production build locally
bun run lint Run ESLint
bun run typecheck Run TypeScript type checker

Tech Stack

Runtime Bun
Framework React 19 + TypeScript 5
Bundler Vite 8
Styling Tailwind CSS v4
State sync useLocalStorage from usehooks-ts

License

Licensed under the GNU General Public License v3.0.

About

DnD Encounter Tracker with Split Screen feature

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages