Thank you for your interest in contributing to DungeonMasterAI! 🎉 This guide will help you understand the project structure and how you can help.
The project is divided into two main parts:
- Built with Next.js (App Router).
/src/app/page.tsx: Contains the main UI logic and game state management (Lobby, Avatar Creation, Game Loop).- Tailwind CSS is used for styling and Lucide React for icons.
- Communication with the server is handled via
socket.io-client.
- Built with Node.js and Express.
server.js: Manages Socket.io connections, game state, and player coordination.aiService.js: Handles integration with the Google Gemini API. If you want to improve AI narration or rule enforcement, this is the place to look.
- Fork the project.
- Create a Branch for your changes (
git checkout -b feature/your-feature-name). - Ensure both the client and server are running correctly on your system.
- Commit your changes (
git commit -m 'Add new feature'). - Push to your branch (
git push origin feature/your-feature-name). - Open a Pull Request.
- Comments: Write clear comments, especially for complex AI logic.
- AI Prompts: If you modify prompts in
aiService.js, please test them thoroughly to avoid "hallucinations." - Style: Follow the existing style based on functional React components and a modern dark aesthetic.
If you find a bug, please open an Issue on GitHub describing the problem and the steps to reproduce it.
We look forward to your contributions! ⚔️📜