How edg-coder/libre-vtt works
Libre VTT is a virtual tabletop for running campaigns locally, with a browser-joinable public-game option and native mobile clients. A host launches a table, manages campaign state and game actions, and synchronizes the session with players; players interact with maps, tokens, chat, and character sheets. Separate product branches provide rules/reference content, plugins, audio and tutorials. The excerpts establish key server and native-client responsibilities, but many browser modules were not sampled, so their internal connections are omitted.
Main entry points: game-server.js Game host · launcher.js App launcher · MainActivity.java Android app shell · luce.js Maps and lighting
Components 22
Session runtime
- Game host
server/game-server.js - App launcher
server/launcher.js - Local file server
server/server.js - Dedicated server
server/server-dedicato.js - Connection relay
relay/src/index.js
Table experience
- Maps and lighting
web/js/mappa/luce.js - Lighting calculations
condiviso/luce-calcolo.js - Character sheets
web/js/schede/sheets.js - Music and sound
web/js/strumenti/music.js - Guided tutorial
web/js/strumenti/tutorial.js
Campaign content
- Campaign state
server/game-server.js - Private manuals
server/manuali-privati.js - Media library
server/server.js
App clients
- Android app shell
pacchetti/mobile/android/app/src/main/java/app/librevtt/MainActivity.java - Android native bridge
pacchetti/mobile/android/app/src/main/java/app/librevtt/Ponte.java - Android runtime
pacchetti/mobile/android/app/src/main/java/app/librevtt/Motore.java - iOS app shell
pacchetti/mobile/ios/LibreVTT/ViewController.swift
Rules and extensions
- Rules compendium
web/js/regole/compendio.js - SRD reference
web/js/regole/manuale-srd.js - Plugin manager
server/plugins.js
Other components
- Host and players
- Browser players
Connections 22
- Host and players → App launcher: launches
- App launcher → Game host: starts
server/launcher.js - App launcher → Local file server: starts
server/launcher.js - Dedicated server → Game host: runs host
server/game-server.js - Browser players → Game host: joins game
- Game host → Campaign state: manages state
server/game-server.js - Game host → Lighting calculations: uses
server/game-server.js - Game host → Private manuals: checks manuals
server/game-server.js - Game host → Plugin manager: loads plugins
server/game-server.js - Android app shell → Android runtime: starts runtime
pacchetti/mobile/android/app/src/main/java/app/librevtt/MainActivity.java - Android app shell → Android native bridge: registers bridge
pacchetti/mobile/android/app/src/main/java/app/librevtt/MainActivity.java - Android native bridge → Android app shell: calls activity
pacchetti/mobile/android/app/src/main/java/app/librevtt/Ponte.java - iOS app shell → Browser players: presents web table
pacchetti/mobile/ios/LibreVTT/ViewController.swift - Maps and lighting → Lighting calculations: uses calculations
- Host and players → Maps and lighting: plays on maps
- Host and players → Character sheets: uses sheets
- Host and players → Rules compendium: consults rules
- Rules compendium → SRD reference: includes reference
- Host and players → Music and sound: controls audio
- Host and players → Guided tutorial: follows guidance
- Host and players → Media library: manages assets
server/server.js - Game host → Connection relay: uses relay
server/game-server.js