Back to Projects
AI-Powered RPG

SoloRealms

AI-Powered Solo D&D Game - A sophisticated web-based solo Dungeons & Dragons experience where GPT-4o acts as your personal Dungeon Master.

45% Complete
In Development
Freemium
SoloRealms - AI D&D Adventure

🎮 What is SoloRealms?

SoloRealms is a sophisticated web-based solo Dungeons & Dragons experience where GPT-4o acts as your personal Dungeon Master. It's designed for players who want to enjoy D&D adventures on their own schedule, with AI-driven storytelling that adapts to their choices and creates immersive, personalized narratives.

🏗️ Technical Architecture

Frontend (Next.js 15 + React 19)

  • • Next.js 15 with React 19 and TypeScript
  • • Clerk for secure user management
  • • Tailwind CSS with custom components
  • • Framer Motion for smooth UI transitions
  • • XState for combat flow management
  • • WebSocket integration for live gameplay

Backend (FastAPI + Python)

  • • FastAPI with async support
  • • PostgreSQL with SQLAlchemy ORM
  • • Alembic for database schema management
  • • OpenAI GPT-4o for narrative generation
  • • WebSocket support for live game updates
  • • Clerk integration for secure API access

🎯 Core Game Features

AI Dungeon Master

  • • Dynamic storytelling with GPT-4o
  • • Adaptive responses based on character history
  • • Combat narration and detailed descriptions
  • • Optional text-to-speech voice narration

Complete D&D 5e Character System

  • • Full D&D races, classes, and ability scores
  • • Experience points and leveling system
  • • Inventory management with magical items
  • • HP tracking and status effects

6-Stage Story Structure

  • • Intro - Setting the scene
  • • Inciting Incident - Main conflict begins
  • • First Combat - Initial tactical encounter
  • • Twist - Story revelation or complication
  • • Final Conflict - Climactic battle
  • • Resolution - Story conclusion and rewards

Advanced Combat System

  • • Turn-based combat with full D&D 5e rules
  • • Initiative system and turn order
  • • Action economy with reactions
  • • Visual target selection with range validation
  • • XState-powered combat flow

🎲 How the Game Works

Game Flow

  1. 1. Character Creation: Players create D&D characters with stats and backstory
  2. 2. Adventure Selection: Choose from short-form (~30 min) or campaign adventures
  3. 3. AI Narration: GPT-4o describes scenes and responds to player actions
  4. 4. Player Actions: Type actions, speech, or thoughts to interact with the world
  5. 5. Dice Integration: Roll dice when prompted for skill checks and combat
  6. 6. Combat Encounters: Engage in tactical turn-based battles
  7. 7. Story Progression: Advance through the 6-stage narrative structure

Real-Time Interaction

  • • WebSocket communication for live updates
  • • Instant AI responses
  • • State synchronization across components
  • • Robust error handling and reconnection

Data Persistence

  • • Character progression saved to PostgreSQL
  • • Adventure progress and world state tracking
  • • Inventory and equipment persistence
  • • Detailed combat history logs

📊 Development Status (~45% Complete)

✅ Completed Features

  • • Authentication system (90%)
  • • Character creation and management (85%)
  • • Basic game interface (75%)
  • • Backend infrastructure (80%)
  • • Database models (95%)

🚧 In Progress

  • • Story system (25%)
  • • Combat system (30%)
  • • Adventure management (10%)

📋 Planned Features

  • • Social features and adventure sharing
  • • Advanced AI voice integration
  • • Multiplayer party support
  • • Admin tools and content management

Game Features

Experience the full depth of D&D 5e with features designed for solo play:

Character Creation

Full D&D 5e character creation with all official classes, races, and backgrounds. Automated stat generation and equipment selection.

Dynamic Storytelling

AI-generated adventures that adapt to your character's background, choices, and play style for unique experiences every time.

Combat System

Turn-based combat following D&D 5e rules with intelligent enemy AI and tactical decision-making support.

Campaign Management

Save and resume campaigns, track character progression, and maintain persistent relationships with NPCs.

Character sheet interface
Combat interface

Project Details

My Role

Lead Developer & Game Designer

Timeline

4 months

Status

In Development

Frontend Technologies

Next.js 15
React 19
TypeScript
Clerk Auth
Tailwind CSS
Framer Motion
XState
WebSocket

Backend Technologies

FastAPI
Python
PostgreSQL
SQLAlchemy
Alembic
GPT-4o

🚀 Key Technical Highlights

AI Integration: Context management for story continuity across sessions
Performance: Optimized rendering with React memoization and caching
Real-Time: WebSocket implementation for live gameplay interactions
Database: Complex relational models for game data with indexed queries
Security: Comprehensive authentication with Clerk integration
UX: Immersive gaming interface with smooth animations and accessibility

🎯 Portfolio Highlights

SoloRealms demonstrates expertise in:

  • • Full-Stack Development with modern React/Next.js and FastAPI
  • • AI Integration with sophisticated GPT-4o context management
  • • Real-Time Systems using WebSocket for live gameplay
  • • Advanced State Management with XState for game logic
  • • Performance optimization for real-time gaming interactions