A modern web application that brings D&D-style role-playing games to life with customizable scenarios, character creation, and an AI-driven game master.
- Scenario-based gameplay with unique attributes and skills
- Character customization with different backgrounds and roles
- Dynamic storytelling powered by OpenAI's GPT
- D20 dice rolling mechanics to add randomness to outcomes
- Progress tracking and game state persistence
- Frontend: Next.js, React, Tailwind CSS
- Backend: Next.js API routes, Supabase
- Authentication: Supabase Auth
- Database: Supabase PostgreSQL
- AI: OpenAI API
- Clone the repository:
git clone <repository-url> cd dnd-app-impl
- Install dependencies with
npm install
- Copy
.env.local.example
to.env.local
and fill in your API keys - Run the development server with
npm run dev
- Open http://localhost:3000 in your browser
The application requires the following environment variables:
# Supabase configuration
NEXT_PUBLIC_SUPABASE_URL=your-supabase-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
# OpenAI configuration
OPENAI_API_KEY=your-openai-api-key
The codebase follows a clear separation between frontend and backend components while maintaining a monorepo structure:
/src/app
- Next.js App Router pages and layouts/src/components
- Reusable React components/src/lib
- Frontend utility functions and API clients/src/backend
- Backend logic and services/src/shared
- Shared types and utilities/public
- Static assets
For a more detailed breakdown of the project's organization including the complete frontend and backend separation, see the PROJECT_STRUCTURE.md
file.
See the AppPlan.md
file for the full development roadmap and progress tracking.
MIT