The Pub is a modern, markdown-based repository for Dungeons & Dragons 5th Edition homebrew content. Store, search, filter, and analyze your custom monsters, spells, magic items, and subclasses with an intuitive interface and AI-powered assistance.
- Markdown-Based Content Management: Store all homebrew content in simple markdown files
- AI Analysis: Built-in AI assistant that can analyze balance, suggest improvements, and modify content
- Content Types: Manage monsters, spells, magic items, and character subclasses
- Advanced Filtering: Filter content by properties like CR, spell level, rarity, and more
- Responsive Design: Works on desktop, tablet, and mobile devices
- Light/Dark Mode: Toggle between light and dark themes for comfortable viewing
- PDF Export: Export any content or AI analysis as a PDF file
- Global Search: Quickly find any content across all categories
- Source Viewing: View the raw markdown source for any content
- Content Width Controls: Adjust the content width for comfortable reading on any screen
- Next.js - React framework for server-rendered applications
- React - UI component library
- Mistral AI API - AI assistant integration
- Gray Matter - Markdown parsing with YAML frontmatter
- Remark - Markdown processor
- html2pdf.js - PDF export capability
- Fuse.js - Fuzzy search library
- Node.js 14.x or higher
- npm or yarn
- Mistral AI API key (for AI analysis features)
-
Clone the repository:
git clone https://github.com/Tremontaine/the-pub.git cd the-pub
-
Install dependencies:
npm install
-
Create a
.env.local
file in the project root with your Mistral AI API key:MISTRAL_API_KEY=your_mistral_api_key
-
Add your logo (optional):
- Save your logo as
logo.png
in thepublic
folder
- Save your logo as
-
Start the development server:
npm run dev
-
Access the application at http://localhost:3000
npm run build
npm start
The Pub can be easily deployed using Docker.
-
Clone the repository:
git clone https://github.com/Tremontaine/the-pub.git cd the-pub
-
Create a
.env
file with your Mistral API key:MISTRAL_API_KEY=your_mistral_api_key
-
Build and start the container:
docker compose up -d
-
Access The Pub at http://localhost:8765
-
Build the Docker image:
docker build -t the-pub .
-
Run the container:
docker run -p 8765:3000 -e MISTRAL_API_KEY=your_api_key -v $(pwd)/content:/app/content -d the-pub
MISTRAL_API_KEY
: Your Mistral AI API key (required for AI analysis features)
The Docker setup maps the content
directory to persist your homebrew content even when the container is updated. Make sure your server has proper permissions set for this directory.
All content is stored in markdown files within the content
directory:
content/
├── bestiary/ # Monsters and creatures
├── spells/ # Spells and cantrips
├── items/ # Magic items and artifacts
└── subclasses/ # Character subclasses
---
name: Frost Giant
type: Giant
challenge_rating: 8
size: Huge
alignment: Neutral Evil
---
# Frost Giant
Terrible and fearsome giants with blue-white skin and pale, frosty hair.
## Stats
- **Armor Class:** 15 (patchwork armor)
- **Hit Points:** 138 (12d12 + 60)
- **Speed:** 40 ft.
... (additional content)
---
name: Frostbolt
level: 2
school: Evocation
casting_time: 1 action
range: 60 feet
components: V, S
duration: Instantaneous
---
# Frostbolt
A bolt of ice shoots from your fingertips at a target within range.
... (additional content)
---
name: Frost Brand
type: Weapon (any sword)
rarity: Very Rare
requires_attunement: true
---
# Frost Brand
When you hit with an attack using this magic sword, the target takes an extra 1d6 cold damage.
... (additional content)
---
name: Oath of Frost
class: Paladin
---
# Oath of Frost
The Oath of Frost binds paladins to the ideals of endurance, isolation, and preservation.
... (additional content)
MISTRAL_API_KEY
: Your Mistral AI API key (required for AI analysis features, Mistral Large is used)
Adjust content width using the controls in the top right corner:
- Narrow (25%)
- Centered (40%)
- Wide (90%)
The built-in AI assistant can:
- Analyze balance of any entry
- Suggest improvements
- Add new features to existing content
- Modify content based on your specifications
- Provide detailed explanations
- Icon assets: Game-icons.net
- Fonts: Google Fonts
- D&D 5e SRD: Wizards of the Coast
Built with ❤️ for the D&D homebrew community
The Pub is not affiliated with, endorsed, sponsored, or specifically approved by Wizards of the Coast LLC. The Pub may use the trademarks and other intellectual property of Wizards of the Coast LLC, which is permitted under Wizards' Fan Content Policy. For example, Dungeons & Dragons® is a trademark of Wizards of the Coast. For more information about Wizards of the Coast or any of Wizards' trademarks or other intellectual property, please visit their website at www.wizards.com.