Documents
Documents are structured, long-form content in StudioBrain — game design documents, story bibles, style guides, lore compendiums, and more. Unlike entities (which are field-based records), documents use a rich text editor with sections, headings, and formatted prose.
Documents vs Entities
| Aspect | Entity | Document |
|---|---|---|
| Primary editor | Field-by-field form (YAML frontmatter fields) | Rich text editor (TipTap) with sections |
| Template category | entity | document |
| Examples | Character, Location, Item, Plant | Game Design Doc, Story Bible, Style Guide |
| Outline view | Not available | Hierarchical section outline |
| Rich text | Markdown body (secondary) | Rich text is the primary content |
| Export | JSON, CSV, Markdown | PDF, DOCX, HTML, Markdown |
Both entities and documents are stored as markdown files with YAML frontmatter. The template_category field in the template determines which editing experience is used.
Built-in Document Templates
StudioBrain ships document templates (from the studiobrain-templates catalog, under Standard/Documents/) for common creative workflows. Each defines its sections plus metadata fields (title, status, version, authors, and a few type-specific fields).
| Template | Sections |
|---|---|
| Game Design Document | Overview, Core Mechanics, Level Design, UI/UX, Technical Requirements |
| Story Bible | World Overview, History & Timeline, Factions & Organizations, Magic System / Technology, Rules of the World |
| Style Guide | Color Palette, Typography, Iconography, UI Components, Brand Voice |
| Character Bible | Archetype Overview, Backstory, Motivation & Goals, Relationships, Character Arc |
| Script / Screenplay | Logline, Synopsis, Act Structure, Scenes, Dialogue Notes |
| Manuscript | Front Matter, Chapter Outline, Chapters, Back Matter, Appendix |
| Blog Framework | Topic / Thesis, Outline, Draft Body, SEO Notes, Publishing Schedule |
| How-To Guide | Prerequisites, Step-by-Step Instructions, Troubleshooting, FAQ, Next Steps |
| Crafting Guide | Materials, Tools Needed, Step-by-Step Instructions, Tips & Best Practices, Variations |
| Recipe Book | Ingredients, Equipment, Preparation Steps, Variations, Nutrition Info |
The set available in your workspace depends on the installed template catalog and any custom document templates you add.
Creating a Document
- Click + New in the sidebar
- Select the Document category tab
- Choose a document template (or start with a blank document)
- Enter a title and click Create
The document opens in the rich text editor with the template’s pre-defined sections as headings.
The Rich Text Editor
Documents use a TipTap-based rich text editor with autosave.
Formatting
- Headings
- Bold, italic, underline,
strikethrough,inline code, text color - Bullet lists and numbered lists
- Block quotes
- Code blocks
- Horizontal rules
- Links
Rich Content
- Images — insert into the document body
Standard TipTap keyboard shortcuts apply (for example Ctrl/Cmd + B for bold and Ctrl/Cmd + I for italic).
Sections and Outline
The document edit page shows an outline built from the headings in the body. Drag sections in the outline to reorder them; the content under a heading moves with it. Type a heading (or use the toolbar heading buttons) to add a section, and the outline updates.
Export
Use the Export menu in the toolbar. Available formats:
- PDF — styled PDF document
- Word (.docx) — Microsoft Word format
- HTML — self-contained web page
- Markdown — the document as markdown (server export)
- Markdown Bundle — ZIP with markdown and assets (shown when the content references entities or assets)
See Exporting Content for details.
Creating Custom Document Templates
A document template is a markdown file with YAML frontmatter and template_category: document. Built-in examples live in _Templates/Standard/Documents/; your own go under _Templates/Custom/. Frontmatter declares the sections and the metadata fields:
---
template_category: document
template_name: Brand Guide
template_id: brand_guide
description: Brand identity and usage guidelines
icon: palette
sections:
- id: brand-identity
label: Brand Identity
type: rich-text
description: Core identity, mission, and values
- id: logo-usage
label: Logo Usage
type: rich-text
description: Primary logo and clear-space rules
fields:
title:
type: string
required: true
label: Document Title
status:
type: enum
options: [draft, review, approved, published]
default: draft
label: Status
version:
type: string
default: "1.0"
label: Version
---
# {{title}}
## Brand Identity
## Logo UsageThe body below the frontmatter is the default content for new documents; section headings guide the user (and AI generation) on what to write.
See Also
- Template Categories — How entity, document, and map templates differ
- Exporting Content — All export options
- Template Authoring — Technical reference for template frontmatter
- Rich Text Editor — Developer reference for the TipTap editor