DMO/
├── client/ # React/Next.js frontend
├── server/ # Node.js/Express backend
├── database/ # Database schema and migrations
└── docs/ # Documentation
- Node.js 18+
- PostgreSQL 13+
- Redis (optional, for session management)
- VS Code Insiders
-- Create database
CREATE DATABASE dmo_db;
-- Run the schema
psql -d dmo_db -f server/database/schema.sqlcd server
npm install
cp .env.example .env
# Edit .env with your database credentials
npm run devcd client
npm install
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- API Health Check: http://localhost:3001/health
-
User Authentication
- Registration/Login system
- JWT token management
- User profiles
-
Character Management
- Character creation form
- Stats calculation (D&D 5e rules)
- Character sheet display
- Inventory management
-
Room System
- Room creation with unique codes
- Join room functionality
- Player management
-
Real-time Gameplay
- Socket.io integration
- Turn-based system
- Dice rolling mechanics
- Chat system
-
Combat System
- Initiative tracking
- Health/damage management
- Spell casting
- Attack rolls
- AI Dungeon Master
- OpenAI/Anthropic integration
- Personality configuration
- Dynamic story generation
- NPC dialogue
Why Web-based is recommended:
- ✅ Cross-platform (any device with browser)
- ✅ Easy real-time multiplayer
- ✅ Better for forms/text content
- ✅ Easier database integration
- ✅ Better AI API ecosystem
- ✅ No app store deployment hassles
- React/Next.js: Modern, component-based UI
- Socket.io: Real-time bidirectional communication
- PostgreSQL: Robust data storage with JSON support
- Node.js: JavaScript everywhere, easier development
- Initialize the projects with
npm install - Set up your database
- Start with user authentication
- Build character creation
- Add room/session management
- Implement real-time features
- Integrate AI functionality
client/src/
├── components/
│ ├── auth/ # Login/register forms
│ ├── character/ # Character sheets & creation
│ ├── game/ # Game board, chat, dice
│ ├── room/ # Room management
│ └── ui/ # Reusable UI components
├── pages/ # Next.js pages
├── hooks/ # Custom React hooks
├── context/ # Global state management
└── utils/ # Helper functions
server/
├── routes/ # API endpoints
├── models/ # Database models
├── services/ # Business logic
├── middleware/ # Auth, validation, etc.
└── database/ # Schema and migrations
Ready to start building your D&D platform! 🎲