A browser-based fantasy MUD (Multi-User Dungeon) with a web GUI and authenticated REST API for 3rd party clients. Built on Val Town with SQLite for easy modding and extension.
- 8 continents with unique climates and cultures (Aetheria, Drak'thor, Silverwood, Irondeep, Mistral Isles, Shadowmere, Solaria, Frostheim)
- 120+ countries with diverse governments, economies, laws, traditions, and lore
- 60+ islands (inhabited and uninhabited) + 35 island city-states
- 50+ wilderness areas across all continents
- Seasons & calendar (Spring, Summer, Autumn, Winter with 28-day seasons)
- 20 races: Human, Elf, Dwarf, Halfling, Orc, Dark Elf, Beastkin, Dragonborn, Demon, Angel, Fairy, Vampire, Werewolf, Goblin, Slime, Merfolk, Giant, Spirit, Golem, Undead
- 15 classes: Warrior, Mage, Ranger, Rogue, Cleric, Paladin, Necromancer, Bard, Monk, Summoner, Berserker, Alchemist, Farmer, Merchant, Knight
- Detailed stats: STR, DEX, INT, WIS, CON, CHA, LUK
- 12 schools: Destruction, Restoration, Alteration, Conjuration, Illusion, Mysticism, Enchanting, Necromancy, Nature Magic, Blood Magic, Divination, Rune Magic
- 20+ spells with MP costs, damage, healing, range, and cooldowns
- Melee: Swords, axes, daggers, unarmed, warhammers, spears
- Ranged: Bows, crossbows, throwing stars, throwing daggers
- Magic: Spells from all 12 schools
- 12 combat skills with leveling and proficiency
- Farming: Plant seeds, water crops, harvest by season
- Housing: Buy and build houses, camps, villages, towns
- Relationships: Friendship, affection, romance, marriage, gift-giving
- Children: With age-up consent system
- Content toggles: Configurable per race, age group, sentience for romance/marriage/trading
- Per-country currencies with exchange rates
- Shops with buy/sell modifiers
- Player-to-player trading with barter system
- Import/export trade routes between countries
- 10+ guilds: Adventure, Trade, Warrior, Mage, Thief, Farming, Fishing, Monster Hunter
- Hierarchy: Novice → Apprentice → Journeyman → Expert → Master → Grandmaster
- 8+ schools: Magic academies, combat schools, general education
- Join fees and rank progression
- 20+ unique NPCs with jobs, families, and personalities
- Dialog tree system stored in database - filterable by race, class, job, age, relationship level
- Multiple dialog options with branching conversations and effects
- 15 monster types: Slimes, wolves, goblins, spiders, dragons, griffins, phoenixes, etc.
- Taming system: Use Taming Collars, success based on CHA and difficulty
- Mounts: Ride tamed creatures (horses, griffins, etc.)
- Recruit NPCs with high enough friendship
- Give orders: follow, guard, quest, build, patrol
- Assign followers to quests or construction projects
- Boat: Between coastal cities and islands
- Carriage: Between inland locations
- Magical teleportation: Between academy waypoints
- Each with different costs and travel times
- 12 languages: Common, Elvish, Dwarvish, Orcish, Draconic, Infernal, Celestial, Sylvan, Abyssal, Merfolk, Beast Tongue, Ancient
- Proficiency system affects NPC interactions
- Friend requests (send, accept, reject)
- Private messaging (friends only)
- Player-to-player trading
- Export character as JSON (stats, inventory, skills, quests, followers, tamed creatures)
- Export entire world as JSON (all database tables)
- Share worlds and characters between instances
Rendering mermaid diagram...
main.ts- HTTP entry pointdb/schema.ts- 30+ database tablesdb/seed.ts- World data: races, classes, spells, continents, countries, islands, NPCs, dialogs, items, monsters, guilds, questslib/auth.ts- Registration, login, sessions, API keyslib/game-engine.ts- All game mechanicsapi/routes.ts- 40+ REST API endpointsgui/index.html- Full web GUI
Two methods:
- Session cookie (for browser): Login via
POST /api/auth/login - API key (for 3rd party): Send
X-API-Keyheader orAuthorization: Bearer <key>
| Method | Path | Description |
|---|---|---|
| POST | /api/auth/register | Create account |
| POST | /api/auth/login | Login, returns session cookie |
| POST | /api/auth/logout | Logout |
| GET | /api/auth/me | Current account info |
| GET | /api/data/races | All playable races |
| GET | /api/data/classes | All classes |
| GET | /api/data/magic-schools | Magic schools |
| GET | /api/data/spells | All spells |
| GET | /api/data/guilds | All guilds |
| GET | /api/data/quests | All quests |
| GET | /api/data/continents | All continents |
| GET | /api/data/countries | All countries |
| GET | /api/data/islands | All islands |
| GET | /api/data/calendar | Current game date |
| POST | /api/characters | Create character |
| GET | /api/characters | List your characters |
| GET | /api/characters/:id | Get character details |
| POST | /api/game/look | Look around |
| POST | /api/game/move | Move direction |
| POST | /api/game/attack | Attack target |
| POST | /api/game/cast | Cast spell |
| POST | /api/game/equip | Equip item |
| POST | /api/game/dialog/start | Start NPC dialog |
| POST | /api/game/dialog/continue | Continue dialog |
| POST | /api/game/shop/buy | Buy from shop |
| POST | /api/game/shop/sell | Sell to shop |
| POST | /api/game/trade/offer | Create trade offer |
| POST | /api/game/trade/respond | Accept/reject trade |
| POST | /api/game/gift | Give gift to NPC |
| POST | /api/game/propose | Propose marriage |
| POST | /api/game/guild/join | Join guild |
| POST | /api/game/quest/accept | Accept quest |
| POST | /api/game/tame | Tame creature |
| POST | /api/game/travel | Use travel route |
| POST | /api/game/farm/plant | Plant crop |
| POST | /api/game/farm/water | Water crop |
| POST | /api/game/farm/harvest | Harvest crop |
| POST | /api/game/build | Start construction |
| POST | /api/game/follower/recruit | Recruit follower |
| POST | /api/game/follower/order | Order follower |
| POST | /api/game/advance-day | Advance calendar |
| POST | /api/social/friend-request | Send friend request |
| POST | /api/social/friend-request/respond | Accept/reject |
| GET | /api/social/friend-requests | Pending requests |
| GET | /api/social/friends | Friends list |
| POST | /api/social/message | Send message |
| GET | /api/social/messages | Inbox |
| GET | /api/export/character/:id | Export character JSON |
| GET | /api/export/world | Export world JSON |
All game data is in SQLite. To add content:
- New races:
INSERT INTO races (name, description, base_hp, ...) VALUES (...) - New items:
INSERT INTO items (name, item_type, damage, ...) VALUES (...) - New NPCs:
INSERT INTO characters (name, is_npc, npc_job, ...) VALUES (...) - New dialog: Add to
dialog_trees,dialog_nodes,dialog_options - New quests:
INSERT INTO quests (name, description, steps, rewards, ...) VALUES (...) - New monsters:
INSERT INTO monster_templates (...) VALUES (...) - Content toggles: Configure romance/marriage/trading per race/age in
content_toggles
- Morrowind: Magic schools, travel systems (silt striders → boats/carriages/teleporters)
- Diablo/Diablo 2: Loot, combat, character classes
- Stardew Valley: Farming, seasons, relationships, gift-giving
- Rune Factory: Monster taming, farming + combat hybrid
- My Time in Portia: Building, construction projects
- Ultima 7: Follower system, open world interaction
- Isekai anime/manga: Race variety, guild hierarchies, adventure themes
- Dwarf Fortress: Laws, traditions, families, economy simulation