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
-
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
-
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000/api
- API Documentation: http://localhost:8000/docs
-
Open in browser Navigate to
http://localhost:5173
wildeditor/
โโโ apps/
โ โโโ frontend/ # React TypeScript frontend
โ โ โโโ src/
โ โ โโโ public/
โ โ โโโ package.json
โ โโโ backend/ # Python FastAPI backend
โ โโโ src/
โโโ packages/
โ โโโ shared/ # Shared types and utilities
โ โโโ src/types/
โโโ docs/ # Documentation
โโโ package.json # Workspace root
- 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
- 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