- Java 11+
- Maven 3+
Install Java 11+ as per your operating system
./mvnw.cmd clean package
- JOL_DATA ( required ) - points to the game data, example data is available at src/test/resources/data
- ENABLE_CAPTCHA - disable captcha for local development if required, default: true
- JOL_RECAPTCHA_KEY - required for captcha - developer key
- JOL_RECAPTCHA_SECRET - required for captcha - developer secret
- DISCORD_API_VERSION - nuff said, default: 6
- DISCORD_BOT_TOKEN - required for discord integration, developer api token
- DISCORD_PING_CHANNEL_ID - required for discord integration, channel id to post pings
- TYPE - some visual changes to distinguish environments, default: dev
Run the tomcat9:run goal after setting up 1 or more environment variables
JOL_DATA=src/test/resources/data ./mvnw.cmd tomcat9:run
You can also run unit tests with
JOL_DATA=src/test/resources/data ./mvnw.cmd test
Note that if you run with example/test data (from src/test), the app will launch with 6 pre-registered players named "Player1" through "Player6" respectively, each with the password "password".
- games.json - hashmap of Game Name ->
GameInfo.java - pastGames.json - hashmap of Timestamp ->
GameHistory.java - players.json - hashmap of Player Name ->
PlayerInfo.java - chats.json - list of global chat entry
ChatEntryBean.java - timestamps.json - maps to
Timestamps.java - message.json - banner message
- decks.json - hashmap of Player Name -> Deck Name ->
DeckInfo.java - registrations.json - hashmap of Game Name -> Player Name ->
RegistrationStatus.java - tournament.json - maps to
TournamentData.java - cards - card source directory
- vtescrypt.csv - official csv for crypt cards ( latest )
- vteslib.csv - official csv for library cards ( latest )
- decks - decks directory
- *.json - modern format decks
- *.txt - legacy format decks
- games - games directory, by game uuid
- *.json - registered decks
- game.xml - game state - maps to
GameState.java - actions.xml - chat history - maps to
GameActions.java
- DWR - legacy pre-ajax java library for handling client-side callbacks
- Generates
dwr/interface/DS.jsfile that is used at runtime viajs/ds.jsbased off the functions listed inDeckServerRemote.java - Requires complex objects to be registered as converters in
WEB-INF/dwr.xmlin order to serialize as JSON net.deckserver.dwr- root folder for classes related to DWR functionsbean- objects that turned into JSON by DWR and used by the frontendds.jsscriptcreators- holds responsibility for populating JSON responses by typesgetFunction- maps to JS callback located inds.jsfilecreateData- generatesbeanobjects to use for rendering JSON data
model- misc classes for handling game state / command handlingChatParser.java- builds card links, parses deck lines, builds disc iconsCommandParser.java- used to pull info out of users submitted commandsDoCommand.java- main logic that turns command line into game/chat actionsGameModel.java- holds the individual player views of a particular gamePlayerModel.java- holds the state of the logged in player, current view, chats to renderGameView.java- player-centric view of a game, holds toggle state, and state changed flags for playersJolAdmin.java- main responsibility class for pretty much everything - singletonJolGame.java- main responsibility for modifying game state, or actionsModelLoader.java- handles converting between UI and XML data objects
DeckServerRemote- main link between JS and JAVA, gets converted by DWR to/dwr/interface/DS.jsfile to be consumed
- Generates
- JSP - basic servlet rendering library
MainServlet.java- maps to/and/main.jspLoginServlet.java- maps to/loginLogoutServlet.java- maps to/logoutRegisterServlet.java- maps to/register- JSP templates - located under
/WEB-INF/jsps- grouped by function
layout.jspfor each JOL 'page' is loaded first, then it loads subsequent components/WEB-INF/main.jspholds all the references to the functional layout sections
- Jersey - Reference implementation for JAX-RS for restful services
JolApplicationconfigures jersey for path and package scanningApiResourceinternal rest endpoints ( not used currently ) to eventually replace DWRCorsFilterconfigure CORS settings for rest endpointsSecurityFilterprototype to try and populate Servlet specPrincipalandisUserInRoletype functionality- commands - experiment to try and replace DWR / DeckServerRemote ( not used currently )
- JaxB - XMl to Java serialization - legacy JOL format
net.deckserver.game.storage.jaxb- root folder for XML file definitionsactions- files to serializeactions.xmlfilestate- files to serializegame.xmlfileXmlFileUtils- wrapper to simplify loading/saving JOL xml files
- Jackson - JSON Serialization library
- Internally used to read/write JSON based data files
- Jquery - UI javascript functionality
- Used for DOM selectors, building / clearing dynamic elements based on JSON data returned by DWR
- Caffeine - caching library
- Used to make expiring in memory caches for things like active users, or
JolGameto speed up performance
- Used to make expiring in memory caches for things like active users, or
- Nginx - static file server - hosted at https://static.deckserver.net/
CardDatabaseBuilder.javaparses the VEKN supplied crypt and library CSV files and generates static JSON / HTML files to be used by tooltips / modalshtml- html output of parsed card text, tooltip use onlyjson- json output of parsed text, used by modals to populate infoimages- card images
- Docker - used to run application server on deckserver.net
docker-compose.yml- configuration for deckserver.net ( minus Traefik )local-docker-compose.yml- local config for static data and/or application server