A fullβstack D&D 5e companion: create characters, track loot, and manage coin purses β Spring Boot + PostgreSQL in the back, Angular in the front.
Module | What works today |
---|---|
Characters | Full CRUD operations: race, class, subclass, background |
Inventory | Automated weight + attunement calculations |
Coin Purse | Multi-currency management (GP / PP / EP / SP / CP) |
Real-time | WebSocket support for live inventory and character updates |
Containers | Advanced inventory organization with weight management |
Item Search | Fuzzy search across character inventories and item catalog |
Auth | Spring Security with form login + HTTP Basic authentication |
Tech Stack: β59% Java, 16% SCSS, 16% TypeScript, 9% HTML - Enterprise-grade full-stack architecture.
- Docker & Docker Compose
- Git
# Clone the repository
git clone https://github.com/SCanakis/DndApp.git
cd DndApp
# Make the start script executable (Linux/Mac only)
chmod +x start.sh
# Choose your startup option:
# π― Start with ALL sample data (recommended for demo)
./start.sh --with-all
# ποΈ Start with character data only (classes, races, backgrounds)
./start.sh --with-characters
# βοΈ Start with item data only (weapons, armor, equipment)
./start.sh --with-items
# ποΈ Start with empty database (clean slate)
./start.sh
# Use bash directly instead of chmod
bash start.sh --with-all
- Frontend: http://localhost
- Backend API: http://localhost:8080
- Database: localhost:5432 (user:
dnd
, password:dndpass
)
π Live Demo: View on AWS EC2 (Production deployment)
This application follows a microservices-inspired architecture with clear separation of concerns:
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Angular SPA β β Spring Boot β β PostgreSQL β
β (Frontend) βββββΊβ (Backend) βββββΊβ (Database) β
β β β β β β
β β’ Components β β β’ REST APIs β β β’ Relational β
β β’ Services β β β’ WebSockets β β β’ JSON Support β
β β’ Guards β β β’ Security β β β’ Full-text β
β β’ Interceptors β β β’ JPA/Hibernate β β Search β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
Backend (Spring Boot)
- RESTful API Design: Clean endpoints following REST principles
- WebSocket Integration: Real-time updates for inventory and character changes
- Spring Security: Form-based and HTTP Basic authentication
- JPA/Hibernate: Object-relational mapping with PostgreSQL
- Service Layer Pattern: Clear separation between controllers and business logic
- DTO Pattern: Data transfer objects for API boundaries
- Comprehensive Testing: Unit and integration tests with TestContainers
Database (PostgreSQL)
- Advanced Features: JSON column support for complex D&D mechanics
- Full-text Search: PostgreSQL's pg_trgm extension for fuzzy item searching
- Referential Integrity: Foreign key constraints maintaining data consistency
- Custom Domains: Type-safe ability score constraints (0-30)
- Optimized Indexes: Performance-tuned queries for inventory operations
Real-time Features
- WebSocket Endpoints: Live character stats, inventory, and coin purse updates
- STOMP Protocol: Message routing for targeted updates
- Event Broadcasting: Multi-user session support for shared campaigns
# Empty database
docker-compose up
# With specific data sets
CHARACTER_DATA_FILE=./db/character-data.sql docker-compose up
ITEM_DATA_FILE=./db/item-data.sql docker-compose up
# Full production-like environment
CHARACTER_DATA_FILE=./db/character-data.sql ITEM_DATA_FILE=./db/item-data.sql docker-compose up
# Stop containers
docker-compose down
# Remove all data for fresh start
docker-compose down --volumes
DndApp/
βββ frontend/dnd-app/ # Angular 17 frontend with TypeScript
βββ backend/dndapp/ # Spring Boot backend with Java 17+
βββ db/ # PostgreSQL database layer
β βββ init-extensions.sql # Database extensions setup
β βββ init-data.sql # Core schema & migrations
β βββ character-data.sql # D&D classes, races, backgrounds
β βββ item-data.sql # Weapons, armor, equipment catalog
βββ docker-compose.yml # Multi-container orchestration
βββ start.sh # Automated deployment script
Method | Endpoint | Description |
---|---|---|
GET | /api/characters |
Retrieve all characters |
POST | /api/characters |
Create new character |
GET | /api/items |
Browse item catalog |
GET | /api/classes |
List D&D character classes |
GET | /api/races |
List available races |
Complete API Documentation β - Comprehensive endpoint reference with examples
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feat/amazing-feature
) - Open a Pull Request
Development Standards: Clean code principles, comprehensive testing, and documented APIs
This application uses game content from the D&D 5th Edition System Reference Document (SRD), which is available under the Open Game License (OGL). The SRD content includes character races, classes, spells, monsters, and equipment that form the mechanical foundation of this application.
System Reference Document (SRD)
- Character classes, races, and backgrounds
- Equipment, weapons, and armor statistics
- Game mechanics and rules references
This product is compliant with the Open Game License (OGL) and contains Open Game Content, as defined in the Open Game License version 1.0a Section 1(d). No material which is Product Identity under the OGL is reproduced herein.
Dungeons & Dragons and D&D are trademarks of Wizards of the Coast LLC, which does not license or endorse this product.
This project is licensed under the MIT License - see the LICENSE file for details.
Enterprise-grade web application built for D&D enthusiasts who want a digital companion for character management and inventory tracking. Demonstrates modern full-stack development practices with Spring Boot microservices, Angular frontend, containerized deployment, and comprehensive testing strategies.
Perfect for: Players, Dungeon Masters, and developers interested in game mechanics implementation and modern web application architecture.
Live Application: Deployed on AWS EC2 with Docker containerization for scalable, production-ready hosting.
Built With Love For
- π Players who want to focus on roleplaying instead of bookkeeping
- π§ββοΈ Dungeon Masters who need efficient campaign management tools
- π» Developers interested in full-stack development and game mechanics
- π’ Teams looking for examples of enterprise-grade application architecture