Loreum

The structured creative backend for AI-assisted writing.

Loreum stores your canonical worldstate as structured data that AI can query. Build your world in the app, connect any MCP-compatible AI, and write with an assistant that actually knows your characters, relationships, timeline, and style.

Entity System

Characters, locations, organizations, and fully custom types. Each entity has structured fields, a backstory, secrets (hidden from public view), notes, tags, and relationships to other entities. Characters have species and role, Locations have region and condition, and Organizations have hierarchy and ideology. Custom types define their own field schemas through polymorphic extension tables.

Screenshot: Entity System

Knowledge Graph

Relationships are first-class objects, not just links in text. Create labeled, directional connections between any entities, including alliances, rivalries, family ties, and faction membership. The graph is rendered with React Flow so you can drag nodes, zoom in, and save layouts. See your entire world's web of connections at a glance.

Screenshot: Knowledge Graph

Timeline & Gantt

Events and eras on an interactive Gantt chart. Drag to move or resize events. Color-coded eras provide historical context. Support for standard ISO dates and custom numeric calendars for fantasy worlds. Link entities to events to track who was involved and when.

Screenshot: Timeline & Gantt

Lore Wiki

Markdown articles organized by category with tags and entity mentions. Think of it as your world bible, searchable, structured, and cross-referenced. Articles link to entities, so you can navigate from a lore article about a war to the characters who fought in it.

Screenshot: Lore Wiki

Storyboard

Plotlines with thematic statements and plot points. Works with chronological and release ordering. Chapters and scenes linked to plotlines, POV characters, locations, and timeline events. The narrative structure sits alongside the world data, cross-referenced at every level.

Screenshot: Storyboard

Custom Entity Types

Define Weapons, Spells, Vehicles, Species, or any concept your world needs. Each custom type gets its own name, icon, color, and field schema, which is a JSON-defined set of fields (text, select, number) that appear on every entity of that type. No code required.

Screenshot: Custom Entity Types

Public Wiki

Set any project to Public or Unlisted. Readers get a clean, read-only view of your world, including entities, relationships, timeline, lore, and storyboard. The secrets field is never exposed. Share your world with players, readers, or fans while keeping GM notes and plot twists private.

Screenshot: Public Wiki

Style Guide

A structured writing guide covering voice, tone, POV, tense, pacing, and dialogue rules. Scenes can carry style overrides for dream sequences, flashbacks, and tonal shifts. Each character has voice notes for consistent dialogue. When the AI assists with writing, it layers the base guide, scene overrides, and character voices to maintain your prose style across sessions.

Screenshot: Style Guide

AI Integration (MCP)

A Model Context Protocol server lets AI assistants like Claude read and write your world data. Search entities, read relationships, browse the timeline, pull the style guide, create characters, add lore articles, and link timeline events. The AI works with your structured world instead of guessing. Free on all tiers. Bring your own AI, bring your own tokens.

Screenshot: AI Integration (MCP)

Review Queue

Every AI write operation lands in a staging area instead of modifying your canon directly. You see a diff-style view of each proposed creation, update, or deletion. Accept, edit, or reject each change individually, or batch-accept a full AI session. Changes are grouped by session so you can review them in context. The same mechanism powers collaborator suggestion mode for teams.

Screenshot: Review Queue

API Key Authentication

Generate project-scoped API keys from project settings to connect your MCP client. Each key has a name, permission level (read-only or read-write), and optional expiration. Revoke keys any time. The MCP server authenticates with the key as a Bearer token, and all requests are scoped to the project.

Screenshot: API Key Authentication

Built to last

Full-stack, not a wrapper

NestJS API with Prisma ORM, PostgreSQL, Redis, BullMQ. Next.js frontend with server rendering. Shared TypeScript types across the entire monorepo. Every layer is purpose-built.

Real data architecture

22-model relational schema with polymorphic entities, join tables, and proper foreign key constraints. Not a JSON blob in a NoSQL bucket.

Open source, not open-washed

AGPL-3.0. Full commit history. CI/CD pipeline. Contributing guide. The code is the product. If it disappeared tomorrow, you could fork it and keep going.

Tested and gated

Vitest + Supertest integration tests against a real database. GitHub Actions CI runs lint, type-check, test, and build on every PR. Pre-commit hooks enforce formatting.

Auth done properly

OAuth2 with token family rotation, replay detection, CSRF protection, rolling sessions. Not a Firebase wrapper with a login button.

AI-native architecture

The MCP server exposes 27 tools across reads and writes. Write tools route through a staging area so AI changes never touch live data without review. The same service layer powers both MCP and the planned hosted AI tier.

Stack

FrontendNext.js 16, React 19, shadcn/ui, Tailwind, React Flow
APINestJS, Prisma 7, PostgreSQL 18, Redis 7, BullMQ
AuthOAuth2 + JWT with token rotation, CSRF, httpOnly cookies
AIMCP server (Model Context Protocol), works with Claude and any MCP client
InfraCloudflare (CDN, Tunnel, R2), Turborepo + pnpm monorepo
TestingVitest, Supertest, GitHub Actions CI, Husky pre-commit hooks

Who it's for

Fiction authors building novel series, screenplays, or shared universes who need their world bible to be more than a Google Doc.

Game designers documenting RPG worlds, quest structures, faction dynamics, and branching narratives.

TTRPG game masters running campaigns who want to track NPCs, plot threads, session history, and share a player-facing wiki without spoiling secrets.

Collaborative teams working on shared fictional universes who need structure, not chaos.

Open source

AGPL-3.0. The entire codebase is public. Contributions are welcome, and we have a contributing guide, issue templates, and CI that runs on every PR. Your data is yours. If you want to self-host, you can.

We chose AGPL specifically: anyone can use, modify, and deploy Loreum, but if you offer it as a hosted service, you contribute back. That's how open source stays open.