No description
  • Elixir 50.1%
  • TypeScript 42.8%
  • Python 4.7%
  • HTML 0.9%
  • HCL 0.8%
  • Other 0.5%
Find a file
Derek Hammer dc02b32862 refactor: flatten nesting and reduce complexity for Credo compliance
- admin_character_command.ex: extract handle_item_command,
  parse_item_with_possible_quantity, do_add_experience, do_teleport,
  format_zone_info, do_switch_zone, do_switch_zone_location,
  build_item_attrs, insert_each_item helpers. Simplify
  calculate_level_from_xp with cond instead of nested ifs.
- admin_quest_command.ex: extract format_quest_template_entry,
  format_quest_instance_info, format_objective_progress,
  format_quest_objective helpers. Flatten inspect_quest.
- zone.ex: extract set_named_entrance, set_first_location_entrance,
  update_zone_entrance helpers.
- llm.ex: extract format_npc_line, format_location_line helpers.
2026-04-26 22:24:28 -06:00
.opencode feat: add OpenCode mcli tool integration 2026-01-21 04:26:23 -07:00
admin refactor: extract reusable design system components 2026-01-21 04:20:41 -07:00
desktop fix desktop build 2025-06-24 00:44:51 -06:00
devops fix: secure migration and backend deployments with initContainer pattern for credential handling 2025-08-23 21:06:52 -06:00
docs feat: add LLM-powered quest and zone co-author system 2026-01-21 22:13:12 -07:00
frontend fix: backend Credo alias nesting, Elixir formatting, Login test updates 2026-04-26 22:17:57 -06:00
mudcli feat: Obsidian Forge UI redesign — full visual overhaul 2026-03-24 01:29:20 -06:00
plans feat: Obsidian Forge UI redesign — full visual overhaul 2026-03-24 01:29:20 -06:00
realtime refactor: flatten nesting and reduce complexity for Credo compliance 2026-04-26 22:24:28 -06:00
research docs: add quest system research and Phase 2 quality review 2025-08-15 22:48:46 -06:00
schemas send all characters 2025-07-17 18:19:39 -06:00
static refactor: extract reusable design system components 2026-01-21 04:20:41 -07:00
task_history refactor: transport barrel, chat hooks integration, sidebar live data 2026-04-26 22:12:24 -06:00
.gitignore zone packer main logic 2025-07-01 11:31:44 -06:00
.gitlab-ci.yml Update .gitlab-ci.yml file 2025-08-23 18:36:47 +00:00
AGENTS.md docs: Update AGENTS.md with complete mcli command documentation 2026-03-29 14:03:25 -06:00
LICENSE Add a license 2025-06-21 18:15:36 +00:00
mcli feat: add LLM-powered quest and zone co-author system 2026-01-21 22:13:12 -07:00
opencode.json puppeteer 2025-08-15 21:19:45 -06:00
package-lock.json feat: implement comprehensive static website with Vite, TypeScript, and Tailwind CSS 2025-08-22 22:29:29 -06:00
PROTOBUF_MESSAGE_PATTERN.md refactor: complete quest management cleanup and add protobuf pattern guardrails 2026-01-21 06:28:18 -07:00
pyproject.toml feat: add LLM-powered quest and zone co-author system 2026-01-21 22:13:12 -07:00
QUEST_QUICK_START.md feat: add LLM-powered quest and zone co-author system 2026-01-21 22:13:12 -07:00
README.md add readme 2025-06-21 12:16:27 -06:00
webauthn_debug.html fix: handle base64url encoding in WebAuthn credential IDs 2025-08-23 18:42:48 -06:00
ZONE_QUICK_START.md feat: add LLM-powered quest and zone co-author system 2026-01-21 22:13:12 -07:00
zone_scorched-caldera.json refactor: transport barrel, chat hooks integration, sidebar live data 2026-04-26 22:12:24 -06:00
zone_template_simple.json feat: add LLM-powered quest and zone co-author system 2026-01-21 22:13:12 -07:00

HammerMUD2

A modern real-time MUD (Multi-User Dungeon) built with Elixir/Phoenix backend, React frontend, and Tauri desktop app.

Project Structure

hammermud2/
├── mudcli/           # Python CLI tool for managing the project
├── realtime/         # Elixir/Phoenix backend server
├── frontend/         # React/TypeScript web frontend
├── desktop/          # Tauri desktop application
├── docs/             # Project documentation
└── logs/             # Application logs

Directory Details

  • mudcli/ - Python-based command-line interface for development workflow

    • Manages starting/stopping services
    • Runs tests, linting, and database operations
    • Bootstraps the development environment
  • realtime/ - Phoenix backend application

    • WebSocket-based real-time communication
    • User authentication and character management
    • World simulation and chat system
    • PostgreSQL database integration
  • frontend/ - React web application

    • Real-time chat interface
    • Character creation and selection
    • Game world visualization
    • Built with TypeScript, Tailwind CSS, and Redux Toolkit
  • desktop/ - Tauri desktop wrapper

    • Native desktop experience
    • Wraps the web frontend in a desktop application
    • Cross-platform support (Windows, macOS, Linux)
  • docs/ - Project documentation

    • Game design documents
    • API documentation
    • Development guides

Quick Start

Prerequisites

  • Python 3.13+ (for mudcli)
  • Elixir 1.15+ and Erlang 26+ (for backend)
  • Node.js 18+ and npm (for frontend/desktop)
  • PostgreSQL (for database)
  • Rust (for Tauri desktop app)

Bootstrap the Environment

  1. Clone the repository:

    git clone <repository-url>
    cd hammermud2
    
  2. Run the bootstrap script:

    ./mcli bootstrap
    

    This will:

    • Install all system dependencies
    • Set up Python virtual environment
    • Install Elixir, Node.js, and Rust dependencies
    • Create and seed the database
  3. Start the application:

    ./mcli start
    

    This starts both the backend server and frontend development server.

  4. Access the application:

Alternative Setup (Manual)

If you prefer manual setup or the bootstrap fails:

  1. Install dependencies:

    ./mcli deps
    
  2. Set up the database:

    cd realtime
    mix ecto.setup
    cd ..
    
  3. Start services:

    ./mcli start
    

Development Commands

The mcli tool provides all necessary development commands:

Service Management

./mcli start           # Start backend and frontend
./mcli stop            # Stop all services
./mcli restart         # Restart all services
./mcli status          # Check service status
./mcli logs            # View service logs
./mcli logs -f         # Follow logs in real-time

Development Tools

./mcli test            # Run all tests
./mcli test --frontend-only  # Run only frontend tests
./mcli test --backend-only   # Run only backend tests
./mcli lint            # Lint and format all code
./mcli lint --check    # Check code style without fixing

Database Operations

./mcli reset-db        # Reset database (removes all user data)

Desktop Application

./mcli desktop         # Start desktop application

Environment Setup

./mcli bootstrap       # Full environment bootstrap
./mcli setup          # Lightweight setup (dependencies only)
./mcli deps           # Install project dependencies

Technology Stack

Backend (realtime/)

  • Elixir/Phoenix - Web framework and real-time features
  • PostgreSQL - Primary database
  • Phoenix LiveView - Real-time UI updates
  • WebSockets - Real-time communication
  • ExUnit - Testing framework

Frontend (frontend/)

  • React 18 - UI framework
  • TypeScript - Type safety
  • Vite - Build tool and dev server
  • Tailwind CSS - Styling
  • Redux Toolkit - State management
  • Vitest - Testing framework

Desktop (desktop/)

  • Tauri - Desktop application framework
  • Rust - Systems programming language
  • WebView - Renders the React frontend

CLI Tool (mudcli/)

  • Python 3.13 - CLI implementation
  • Click - Command-line interface framework
  • Black/Flake8 - Code formatting and linting

Game Features

  • Real-time Chat System - Multi-channel communication
  • Character Creation - D&D-inspired character building
  • World Navigation - Move through game locations
  • User Authentication - Secure account system
  • Character Management - Multiple characters per account
  • Minimap - Visual world representation

Contributing

  1. Set up development environment:

    ./mcli bootstrap
    
  2. Make your changes and test them:

    ./mcli test
    ./mcli lint
    
  3. Start the application to verify:

    ./mcli start
    

Troubleshooting

Common Issues

  1. Services won't start:

    ./mcli status          # Check what's running
    ./mcli stop            # Stop any hung processes
    ./mcli start           # Try starting again
    
  2. Database issues:

    ./mcli reset-db        # Reset database (WARNING: removes all data)
    
  3. Dependency problems:

    ./mcli deps            # Reinstall dependencies
    
  4. Log investigation:

    ./mcli logs -f         # Follow logs to see errors
    

Getting Help

  • Check service logs: ./mcli logs
  • Verify service status: ./mcli status
  • Run the bootstrap again: ./mcli bootstrap
  • Check individual service READMEs in their directories

License

This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.