Skip to content

JustinWoodring/lorefire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lorefire

Lorefire

Release

Screenshot 2026-03-06 at 8 20 58 AM

A local-first chronicle for 5e campaigns. Record sessions, auto-transcribe with AI, generate bardic summaries, track characters, and build your campaign archive — all on your machine, no cloud required.

Built with NativePHP, Laravel 12, React, and Inertia.js.

Tested on Apple Silicon. Runs on any sufficiently powerful machine — Macs tend to excel at local AI workloads.


✨ Features

Feature Description
📚 Campaigns Manage multiple campaigns with party portraits and full session history
🧙 Characters Full 5e character sheets — HP, spell slots, inventory, conditions, short/long rests
📥 Beyond Import Import characters directly from D&D Beyond
🎙️ Session Recording Record audio at the table and transcribe locally with WhisperX
📖 Bardic Summaries AI-generated epic prose recaps of your sessions
⚔️ Encounter Tracker Auto-detect encounters from transcripts with round-by-round breakdowns
🧝 NPC Roster Track campaign NPCs with attitudes, locations, and AI-generated portraits
🔮 Oracle AI chat assistant with full access to your campaign and character data
🎨 Art Generation Generate character portraits and scene art via ComfyUI, z.ai, or DALL-E
📄 PDF Export Export campaign or session data to PDF
🔍 Detail Extraction LLM-powered extraction of stat changes and NPC appearances from transcripts

📦 Installation (Release Build)

  1. Download the latest .dmg from the Releases page
  2. Open the DMG and drag Lorefire.app to /Applications
  3. Because the app is not notarized, macOS Gatekeeper will block it on first launch. Remove the quarantine flag:
xattr -rd com.apple.quarantine /Applications/Lorefire.app
  1. Open the app normally — the onboarding wizard will guide you through the rest.

🚀 Getting Started (Development)

Prerequisites

Setup

# Clone the repo
git clone https://github.com/justinwoodring/lorefire.git
cd lorefire/lorefire-desktop

# Install PHP dependencies
composer install

# Install Node dependencies
npm install

# Copy and configure environment
cp .env.example .env
php artisan key:generate

# Run database migrations
DB_DATABASE=$(pwd)/database/nativephp.sqlite php artisan migrate

# Build frontend assets
npm run build

# Start the app
php artisan native:serve

Note: Make sure no other Vite process is already running on port 5173 before starting native:serve. You can check with lsof -i :5173.


⚙️ Configuration

All settings are configured inside the app via Settings (after onboarding). Nothing requires editing .env manually.

🎙️ Transcription (WhisperX)

Lorefire bundles WhisperX in a local Python virtual environment. Audio is never sent off your device.

On first launch, the app automatically installs the Python venv in the background. You can monitor progress in the onboarding wizard or in Settings.

Setting Description
Model size tinylarge-v3. base is recommended for most Macs. Larger = more accurate but slower.
Language Default English. Auto-detect and 9 other languages supported.
HuggingFace Token Required for speaker diarization (identifying who said what). Free at huggingface.co/settings/tokens. You must also accept both pyannote model licenses while logged into the same account: pyannote/speaker-diarization-3.1 and pyannote/segmentation-3.0.

Large-v3 note: Needs 8 GB+ RAM and will be noticeably slow on CPU. On Apple Silicon with enough unified memory it works well.

🤖 LLM Provider (Summaries, Oracle, Art Prompts)

Pick one provider in Settings. API keys are stored locally in SQLite and never leave your machine except to call the chosen provider.

Provider Notes
z.ai (recommended) GLM models via the z.ai Coding Plan. Supports glm-4.6, glm-4.7, glm-4-flash, and others. Get a key at z.ai.
OpenAI Uses gpt-4o-mini by default. Requires an OpenAI API key.
Anthropic Uses claude-3-haiku. Requires an Anthropic API key.
Ollama Any locally running model (e.g. llama3, mistral). Requires Ollama running on localhost:11434. No API key needed.
None Falls back to template-based summaries. All other features still work.

🎨 Image Generation

Configure in Settings → Image Generation.

Provider Notes
ComfyUI (local) Connects to your local ComfyUI instance. Uses whatever checkpoint is currently loaded. Default URL: http://localhost:8188. See ComfyUI setup below.
z.ai Uses your z.ai API key (configured above). Recommended model: cogview-4-flash.
OpenAI DALL-E Uses your OpenAI API key. Recommended model: dall-e-3.
None Disables image generation entirely.

Two art styles are available: Lifelike (realistic fantasy painting) and Comic (graphic novel illustration). The default can be set globally in Settings and overridden per campaign.


🖼️ ComfyUI Setup

ComfyUI is optional — it lets you generate portraits and scene art locally using Stable Diffusion / FLUX models.

1. Install ComfyUI

Follow the official install guide: https://github.com/comfyanonymous/ComfyUI

git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt

2. Install ComfyUI-Manager (required)

Lorefire's workflows use custom nodes. ComfyUI-Manager lets you install them in one click.

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git

Restart ComfyUI, then open the Manager (button in the top-right of the UI) and click Install Missing Custom Nodes.

3. Required custom nodes

Install these via ComfyUI-Manager → Install Custom Nodes:

Node Purpose
ComfyUI-Manager Node manager (already installed above)
rgthree-comfy Power Lora Loader used in FLUX workflows
ComfyUI_IPAdapter_plus IP-Adapter for portrait consistency (optional but recommended)

After installing, restart ComfyUI and use Manager → Install Missing Custom Nodes to resolve any remaining dependencies.

4. Download a checkpoint model

Place checkpoint files in ComfyUI/models/checkpoints/. Recommended models:

Model Notes
FLUX.1-dev Best quality; requires HuggingFace login. Download flux1-dev.safetensors.
FLUX.1-schnell Faster, fewer steps needed.
Any SDXL checkpoint e.g. RealVisXL. Place in checkpoints/.

For FLUX models you also need the text encoders and VAE — place them in:

  • ComfyUI/models/clip/clip_l.safetensors, t5xxl_fp16.safetensors
  • ComfyUI/models/vae/ae.safetensors

These can all be downloaded from the FLUX.1-dev HuggingFace repo.

5. Start ComfyUI

cd ComfyUI
python main.py
# Runs on http://localhost:8188 by default
# For GPU-poor machines: python main.py --lowvram

6. Configure Lorefire

In Settings → Image Generation, set the provider to ComfyUI and confirm the base URL (http://localhost:8188).

Lorefire submits generation jobs via the ComfyUI API. The active checkpoint in ComfyUI is used automatically — swap the model in ComfyUI's checkpoint loader to change style.


🗂️ Tech Stack

Layer Technology
Framework Laravel 12
Desktop runtime NativePHP / Electron 1.3
Frontend React 19 + TypeScript
Routing / SSR bridge Inertia.js v2
Styling Tailwind CSS v4
Build tool Vite 7
Database SQLite (local, via NativePHP)
Transcription WhisperX (local Python venv)
Queue Laravel database queue

📝 Notes

  • All data is local. The SQLite database lives in ~/Library/Application Support/lorefire/ (production) or ~/Library/Application Support/lorefire-dev/ (dev).
  • No account required. Nothing is synced to a server. Your campaigns stay on your machine.
  • Other hardware: Tested on Apple Silicon. It may work on Intel Macs, Windows, or Linux, but this is untested. WhisperX in particular will be significantly slower without a dedicated neural engine or GPU.
  • Transcription is CPU/ANE-bound. On Apple Silicon, WhisperX uses the mps backend. Large audio files may take a few minutes even on base model.

📄 License

MIT — see LICENSE

© 2026 Justin Woodring

About

A local-first chronicle for 5e campaigns — record sessions, transcribe with AI, and build your campaign archive on your own machine.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors