CoolFace
Apppublic

fenrir2232/interactive-fantasy-map-wiki

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

Interactive fantasy map with integrated wiki โ€” all in a single Docker container.

![License: MIT](LICENSE)

Live Demo

[๐Ÿ‘‰ interactive-fantasy-map-wiki.hf.space](https://fenrir2232-interactive-fantasy-map-wiki.hf.space)

Default credentials: admin / admin

Features

  • โ€”Interactive map โ€” Leaflet with CRS.Simple, zoom and pan, compass, place search
  • โ€”Integrated wiki โ€” Markdown pages with TipTap editor (ProseMirror), image upload, version history
  • โ€”Side panel โ€” click a marker on the map to read its linked wiki article
  • โ€”Map editor โ€” create, edit, delete markers; import/merge/export JSON; save to server
  • โ€”Admin panel โ€” protected login to edit the wiki and the map
  • โ€”Settings panel โ€” customize world name, map image & dimensions, favicon, social sharing (og:title, og:description, og:image), colors with live preview
  • โ€”Dynamic OG tags โ€” each wiki page gets custom open-graph metadata for rich link previews
  • โ€”Translation system โ€” all UI strings in JSON files; add a new language by creating a single lang/xx.json file

Documentation

Full guide on translating the UI, customizing the theme, adding markers, creating wiki pages, and more: `DOCS.md`

Getting Started

bash
docker compose up -d

Open in your browser:

PageURL
Maphttp://localhost:3000/map/
Wikihttp://localhost:3000/wiki/
Settings (admin)http://localhost:3000/settings

Development without Docker

bash
npm install
node server.js

Configuration

Create a .env file (or copy from .env.example):

env
ADMIN_USER=admin
ADMIN_PASS=your_password
SESSION_SECRET=some_random_string
APP_LANG=eng

Then rebuild: docker compose up -d --build

Language

The UI supports English and Italian via APP_LANG. Set it in docker-compose.yml:

yaml
environment:
  - APP_LANG=eng   # English
  - APP_LANG=it    # Italian

Then docker compose up -d --build.

All user-facing strings (navigation, buttons, placeholders, dates, alerts, map UI, editor UI, settings) switch language automatically. The wiki content (markdown files) is not affected.

Adding a new language

  1. 1.Copy lang/eng.json to lang/fr.json (or any language code)
  2. 2.Translate all values in the new file
  3. 3.Set APP_LANG=fr in docker-compose.yml
  4. 4.Rebuild: docker compose up -d --build

That's it โ€” no code changes needed.

Settings

Access /settings (admin login required) to customize:

SettingDescription
World NameChanges the site title and navbar brand
MapUpload a new map image, set width/height in pixels
FaviconUpload your own site icon (SVG, PNG, ICO, max 2MB)
Social SharingCustom og:title, og:description, og:image for link previews
ColorsLive preview of gold, background, text colors with real-time theme preview

Project Structure

.
โ”œโ”€โ”€ map/                   # Map files (viewer, editor, SVG, markers JSON)
โ”‚   โ”œโ”€โ”€ index.html         # Public map viewer
โ”‚   โ”œโ”€โ”€ editor.html        # Marker editor (admin)
โ”‚   โ”œโ”€โ”€ settings.html      # Branding & settings panel (admin)
โ”‚   โ”œโ”€โ”€ markers.json       # Marker data
โ”‚   โ””โ”€โ”€ mappa.svg          # Base map image
โ”œโ”€โ”€ wiki/                  # Wiki pages in Markdown
โ”‚   โ”œโ”€โ”€ images/            # Uploaded images
โ”‚   โ””โ”€โ”€ versions/          # Version backups
โ”œโ”€โ”€ lang/                  # Translation files
โ”‚   โ”œโ”€โ”€ eng.json           # English translations (all UI strings)
โ”‚   โ”œโ”€โ”€ it.json            # Italian translations
โ”‚   โ”œโ”€โ”€ loader.js          # Translation loader
โ”‚   โ””โ”€โ”€ maps.js            # HTML template renderer
โ”œโ”€โ”€ server.js              # Express server
โ”œโ”€โ”€ branding.json          # Customizable site branding
โ”œโ”€โ”€ Dockerfile             # Node 20 Alpine build
โ”œโ”€โ”€ docker-compose.yml     # Container orchestration
โ”œโ”€โ”€ .env.example           # Configuration template
โ””โ”€โ”€ package.json

License

MIT ยฉ 2026

This software is provided "as is", without warranty of any kind.