A production-ready full-stack monorepo application for creating and managing wilderness regions, paths, and landmarks in the LuminariMUD game world. Built with React/TypeScript frontend, Python FastAPI backend, and integrated with LuminariMUD's MySQL spatial databases.
โ System Status: EARLY DEVELOPMENT
- Interactive Map Display: Visual representation of the wilderness with zoom and pan capabilities
- Advanced Drawing Tools: Point, polygon, and linestring tools with real-time validation feedback
- Precision Coordinate System: Accurate mouse tracking and coordinate conversion at all zoom levels
- Intelligent Selection: Point-in-polygon and distance-to-line algorithms for precise feature selection
- Layer Management: Toggle visibility of regions, paths, and other map elements
- Visual Drawing Feedback: Color-coded validity indicators and real-time guidance
- Visual Region Creation: Draw geographic areas, encounter zones, and terrain modifiers with validation
- Path Drawing: Create roads, rivers, and other linear features with real-time feedback
- Validated Coordinate Entry: Bounds-checked coordinate input with automatic sanitization
- Smart Drawing Validation: Real-time feedback for minimum point requirements and validity
- Enhanced Properties Panel: Input validation, coordinate bounds checking, and user guidance
- Error Prevention: Comprehensive input validation and bounds checking (-1024 to +1024)
- Robust Error Handling: User-visible error notifications with auto-dismiss functionality
- Loading States: Visual feedback during API operations and data persistence
- Optimistic Updates: Immediate UI feedback with automatic rollback on failures
- Performance Optimized: Canvas memoization and selective re-rendering for smooth interaction
- Keyboard Shortcuts: Enhanced ESC handling for drawing cancellation and tool switching
- Multi-environment Support: Switch between development and production servers
- Node.js 18+ and npm 9+ (for frontend workspace support)
- Python 3.8+ (for FastAPI backend)
- Access to LuminariMUD MySQL database (or compatible MySQL setup)
- Modern web browser with JavaScript enabled
- Git
-
Clone the repository
git clone https://github.com/moshehbenavraham/wildeditor.git cd wildeditor -
Install dependencies
# Install frontend dependencies npm install # Install Python backend dependencies cd apps/backend/src pip install -r requirements.txt
-
Configure environment
# Frontend configuration cp apps/frontend/.env.example apps/frontend/.env # Edit apps/frontend/.env: # VITE_API_URL=http://localhost:8000/api # Backend configuration cp apps/backend/.env.example apps/backend/.env # Edit apps/backend/.env: # MYSQL_DATABASE_URL=mysql+pymysql://username:password@localhost/luminari_mudprod # PORT=8000 # HOST=0.0.0.0 # Chat Agent configuration (optional) # Edit environment variables: # OPENAI_API_KEY=your-openai-key # DEEPSEEK_API_KEY=your-deepseek-key # WILDEDITOR_MCP_KEY=your-mcp-key
-
Set up MySQL database Ensure your MySQL database has the required spatial tables:
-- Ensure spatial support is enabled -- Create/verify regions, paths, points tables -- (See Database Schema section for details)
-
Start development servers
# Start frontend (Terminal 1) npm run dev:frontend # Frontend on :5173 # Start Python backend (Terminal 2) cd apps/backend/src python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000 # Start Chat Agent (Terminal 3, optional) cd apps/agent/src python -m uvicorn main:app --reload --host 0.0.0.0 --port 8002
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000/api
- API Documentation: http://localhost:8000/docs
- Chat Agent: http://localhost:8002 (if running)
The Wilderness Editor features an integrated Chat Assistant that revolutionizes wilderness building through natural language interaction.
- ๐ฃ๏ธ Natural Language Interface: "Create a forest region between the lake and mountain"
- ๐ง Spatial Intelligence: Analyzes terrain and finds optimal placement for new regions
- ๐ฟ Organic Region Creation: Generates natural-looking borders using advanced algorithms
- ๐ค๏ธ Smart Path Building: Creates curved, terrain-aware paths connecting multiple regions
- ๐๏ธ Draggable Interface: Resizable window with multi-monitor support and markdown rendering
- ๐พ Content Staging: All AI-generated content is staged for review before saving
- Click the chat icon in the top-right corner
- Drag the window to your preferred location (even to a second monitor!)
- Ask natural language questions:
- "Create a dense forest region northeast of the village"
- "Make a river connecting the mountains to the ocean"
- "Find empty space for a new region near coordinates (100, 200)"
- "Connect these three regions with a dirt road"
Chat UI (Frontend) โ Chat Agent (8002) โ MCP Server (8001) โ Backend (8000) โ MySQL
- Complete Chat Assistant Guide - Comprehensive usage guide and examples
- Agent Development Guide - Technical details and API reference
The project also includes MCP (Model Context Protocol) server integration for enhanced GitHub Copilot capabilities:
- AI-Powered Terrain Analysis: Use natural language to analyze wilderness regions
- Intelligent Landmark Creation: Generate and place landmarks with AI assistance
- Smart Path Generation: Create optimized wilderness paths using AI
- Contextual Code Assistance: Enhanced autocomplete and suggestions for wilderness management code
# Configure GitHub Copilot with MCP server
.\setup-copilot-mcp.ps1 -McpKey "your-mcp-key" -ApiKey "your-api-key"Open GitHub Copilot Chat in VS Code and try:
- "Analyze the terrain complexity of region 5"
- "Create a mountain peak landmark in the northern area"
- "Generate an optimal path between the forest and mountains"
๐ Complete Setup Guide
wildeditor/
โโโ apps/
โ โโโ frontend/ # React TypeScript frontend
โ โ โโโ src/
โ โ โโโ public/
โ โ โโโ package.json
โ โโโ backend/ # Python FastAPI backend
โ โ โโโ src/
โ โโโ mcp/ # MCP server for AI integration
โ โโโ src/
โ โโโ requirements.txt
โโโ packages/
โ โโโ shared/ # Shared types and utilities
โ โ โโโ src/types/
โ โโโ auth/ # Shared authentication
โโโ docs/ # Documentation
โโโ mcp/ # MCP-specific documentation
- User Guide - How to use the wilderness editor interface and tools
- Setup Guide - Quick start installation and configuration
- Documentation Index - Complete documentation organization and guide
- Developer Guide - Technical architecture and development workflow
- API Documentation - Backend API reference and endpoints
- Testing Guide - Testing strategy and procedures
- Contributing Guide - How to contribute to the project
- Deployment Guide - Production deployment instructions
- Migration Guide - Express to Python FastAPI migration
- Integration Guide - LuminariMUD game server integration
- Monitoring Guide - Application monitoring and observability
- Backup Guide - Database backup and recovery procedures
- Disaster Recovery - Emergency response procedures
- Security Policy - Security practices and vulnerability reporting
- Changelog - Version history and release notes
- Code Audit - Security and code quality assessment
- Wilderness System - LuminariMUD wilderness architecture
- Project Specifications - Detailed project requirements
- Development TODO - Current tasks and development roadmap
- Architecture Decisions - ADR records for major technical decisions
- Claude Instructions - AI assistant guidance for this codebase
- Chat Assistant Guide - AI-powered wilderness building companion
- Roadmap - Long-term project vision and milestones
This editor integrates seamlessly with the LuminariMUD wilderness system:
- Coordinate System: Uses the same -1024 to +1024 coordinate space
- Database Compatibility: Works directly with existing LuminariMUD MySQL spatial tables
- Region Types: Supports all game region types (Geographic, Encounter, Sector Transform, Sector Override)
- Path Types: Compatible with roads, rivers, and other path types
- Real-time Updates: Changes reflect immediately in the game world
- React 18.3+ - Modern UI framework
- TypeScript 5.5+ - Type-safe development
- Vite 7.0 - Fast build tool and dev server
- Tailwind CSS - Utility-first styling
- Lucide React - Beautiful icons
- Supabase Auth - User authentication
- FastAPI - Python 3.8+ web framework with automatic OpenAPI documentation
- SQLAlchemy - Database ORM for MySQL integration
- Pydantic - Request/response validation and serialization
- MySQL Integration - Direct connection to LuminariMUD's existing spatial tables
- JWT Authentication - Secure API access (configurable)
- Uvicorn - ASGI server for high-performance async operations
- TypeScript Interfaces - Shared types between frontend and backend
- Common Utilities - Shared helper functions
- Turborepo - Monorepo build orchestration
- npm Workspaces - Package management
- ESLint - Code linting across all packages
- TypeScript - Full-stack type safety
See the Monorepo Structure section above for the high-level organization.
-
apps/frontend/src/- React application sourcecomponents/- UI components (MapCanvas, ToolPalette, etc.)hooks/- Custom React hooks (useEditor, useAuth)services/- API client and external integrationslib/- Utility libraries (Supabase client)types/- TypeScript type imports from shared
-
apps/backend/src/- FastAPI Python backend sourcerouters/- FastAPI endpoint definitionsschemas/- Pydantic request/response schemasmodels/- SQLAlchemy database modelsconfig/- Database configuration and setupmain.py- FastAPI application entry point
-
packages/shared/src/- Shared codetypes/- TypeScript interfaces used by both frontend and backend
-
docs/- Comprehensive documentation (see Documentation section above)
We welcome contributions! Please see our Contributing Guide for details on:
- Setting up the development environment
- Coding standards and best practices
- Submitting pull requests
- Reporting issues
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests if applicable
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Project Wiki
- LuminariMUD Team - For the amazing MUD system and wilderness architecture
- CircleMUD Community - For the foundational MUD codebase
- Open Source Contributors - For the tools and libraries that make this possible
- LuminariMUD - The main MUD codebase
- Wilderness System Documentation - Detailed system architecture
Made with โค๏ธ for the LuminariMUD community