Skip to content

A full-stack wilderness editor for LuminariMUD with advanced drawing tools, precision coordinate system, and real-time validation.

License

Notifications You must be signed in to change notification settings

moshehbenavraham/wildeditor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

94 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Luminari Wilderness Editor

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

License TypeScript React Python FastAPI Turborepo

๐ŸŒŸ Features

Core Functionality

  • 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

Editing Capabilities

  • 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)

Data Management & User Experience

  • 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

๐Ÿš€ Quick Start

Prerequisites

  • 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

Installation

  1. Clone the repository

    git clone https://github.com/moshehbenavraham/wildeditor.git
    cd wildeditor
  2. Install dependencies

    # Install frontend dependencies
    npm install
    
    # Install Python backend dependencies
    cd apps/backend/src
    pip install -r requirements.txt
  3. 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
  4. 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)
  5. 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
  6. Access the application

  7. Open in browser Navigate to http://localhost:5173

๐Ÿ—๏ธ Monorepo Structure

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

๐Ÿ“– Documentation

๐Ÿš€ Getting Started

๐Ÿ‘ฉโ€๐Ÿ’ป Development

๐Ÿš€ Deployment & Operations

๐Ÿ”’ Security & Compliance

๐Ÿ—๏ธ Architecture & Planning

๐Ÿ“‹ Reference

๐ŸŽฎ Integration with LuminariMUD

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

๐Ÿ› ๏ธ Technology Stack

Frontend (apps/frontend/)

  • 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

Backend (apps/backend/)

  • 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

Shared (packages/shared/)

  • TypeScript Interfaces - Shared types between frontend and backend
  • Common Utilities - Shared helper functions

Development Tools

  • Turborepo - Monorepo build orchestration
  • npm Workspaces - Package management
  • ESLint - Code linting across all packages
  • TypeScript - Full-stack type safety

๐Ÿ“ Project Structure

See the Monorepo Structure section above for the high-level organization.

Key Directories

  • apps/frontend/src/ - React application source

    • components/ - UI components (MapCanvas, ToolPalette, etc.)
    • hooks/ - Custom React hooks (useEditor, useAuth)
    • services/ - API client and external integrations
    • lib/ - Utility libraries (Supabase client)
    • types/ - TypeScript type imports from shared
  • apps/backend/src/ - FastAPI Python backend source

    • routers/ - FastAPI endpoint definitions
    • schemas/ - Pydantic request/response schemas
    • models/ - SQLAlchemy database models
    • config/ - Database configuration and setup
    • main.py - FastAPI application entry point
  • packages/shared/src/ - Shared code

    • types/ - TypeScript interfaces used by both frontend and backend
  • docs/ - Comprehensive documentation (see Documentation section above)

๐Ÿค Contributing

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

Quick Contribution Steps

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests if applicable
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ†˜ Support

๐Ÿ™ Acknowledgments

  • 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

๐Ÿ”— Related Projects


Made with โค๏ธ for the LuminariMUD community

About

A full-stack wilderness editor for LuminariMUD with advanced drawing tools, precision coordinate system, and real-time validation.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •