Welcome to the Unofficial Dominion Assistant, a React application designed to enhance your gameplay experience for the popular card game, Dominion! This tool provides comprehensive features for game management, scoring, and player interaction, allowing Dominion enthusiasts to focus on strategy and enjoyment.
Unofficial Dominion Assistant is a free tool which aimed to support the main features of the game and the ones we used personally. Many of the specfific expansions and cards are not specifically supported but should allow for manual adjustment to accommodate them. Please see our GitHub issues page for our roadmap/upcoming features and to make requests.
This software runs entirely in the browser and should not affect the local machine, but game state may not be accurately tracked and may affect the outcome of games. This tool should not (yet?) be relied upon for tournaments or anything where it is not being used for personal use. The project is provided "as-is" without any warranties or guarantees. Use at your own risk. The authors are not responsible for any damage or data loss that may occur from using this software.
Especially as a free tool, we make no guarantees, waranty, or promises of bug-free accuracy or that we will implement all suggestions. Our time is limited and this project is made and run for free. If you'd like to donate to Digital Defiance to facilitate specific features or support development, that would be greatly appreciated. Donations will not be refunded and we make no guarantees that a donation will ensure a requested change is made, though we will certainly make the effort if possible.
Please note that the Unofficial Dominion Assistant is not affiliated with or endorsed by the makers of Dominion or Donald X Vaccarino. This application is a fan-built project created to enhance your gameplay experience and requires ownership of the physical Dominion game to use. It does not allow you to play without having the original game. The use of the Dominion logo is intended solely for personal use to support the Dominion community and should be considered under the Fair Use Doctrine.
Under 17 U.S.C. § 107, fair use allows limited use of copyrighted material without requiring permission from the rights holders. Factors to consider include:
- The purpose and character of the use (e.g., educational, non-commercial).
- The nature of the copyrighted work.
- The amount and substantiality of the portion used.
- The effect of the use on the potential market for the original work.
Case References:
- In Campbell v. Acuff-Rose Music, Inc., 510 U.S. 569 (1994), the U.S. Supreme Court emphasized that transformative uses of copyrighted material could qualify as fair use.
- In Lentz v. Morrow, 104 Cal.App.3d 392 (1980), the court upheld that using copyrighted material in a manner that requires the original for use is less likely to infringe on the copyright holder’s rights.
Our application, as a fan-built tool that does not replicate the game, could be argued as transformative.
- Player Management: Easily add, remove, and track multiple players
- Dynamic Scoring: Real-time score calculation and leaderboard
- Game Setup Wizard: Customizable options for various game modes and expansions
- Turn Tracking: Keep track of player turns and phases
- Detailed Game Log: Record and review game events and card plays
- Expansion Support: Compatibility with various Dominion expansions and game mats
- Save/Load Games: Ability to save game progress and resume later
- Intuitive UI: User-friendly interface with Material-UI components
This is an NX project created with create-nx-workspace
.
- Confirm end game with dialog
- Game timer visible
- Auto-save after each event
- Graph of victory points over time
- Track turn card gains
- +card tracking (optional/enable-able)
- Council-Room button?
- Implement pause/unpause game enhancement: may be covered by save/load?
- Node.js (version 20.9.0 or higher)
- yarn (version 1.22.22 or higher)
- NX CLI
-
Clone the repository:
git clone https://github.com/Digital-Defiance/DominionAssistant.git
From here you may follow the instructions below or jump to the section on Dev Container usage.
-
Install dependencies
yarn install
-
Start the app
yarn start
A popup should offer to open the application in a browser.
- Visual Studio Code
- Docker
- Remote - Containers extension for VS Code
-
Clone the repository:
git clone https://github.com/Digital-Defiance/DominionAssistant.git
-
Open the project folder in Visual Studio Code.
-
Set up .env:
- Copy the .env.example in the project root to .env
- Fill in the CODACY_PROJECT_TOKEN from https://app.codacy.com/gh/Digital-Defiance/DominionAssistant/settings/coverage
- Fill in the FONTAWESOME_KEY from https://fontawesome.com/kits/1111eb8cf6/package
- Save the .env file
- When prompted, click "Reopen in Container" or use the command palette (F1) and select "Remote-Containers: Reopen in Container".
- VS Code will build the dev container and set up the environment. This may take a few minutes the first time.
- Once the container is ready, open a new terminal in VS Code and run:
yarn install
- Start the app:
yarn start
A popup should offer to open the application in a browser.
We highly recommend using Visual Studio Code Dev Containers/Docker for a consistent and isolated development environment. This ensures that all dependencies and configurations are standardized across different development setups.
The devcontainer.json postCreateCommand will run through setup of NVM to select a desired version of Node, perform the yarn install, and install the nx cli globals.
Once the application is started with yarn start-
The app consists of several main screens:
- Home Screen
- Dominion Assistant (main game screen)
- Game Log
- Load/Save Game
Navigate through these screens using the tab bar at the bottom of the app.
To start a new game:
- Add player names
- Set game options (including expansions and special rules)
- Start the game and use the interface to track scores, turns, and game events
Other commands available:
- yarn start: Starts the development server
- yarn build: Builds the app using NX
- yarn test:jest: Runs Jest tests
- yarn test:jest:single: Runs a single specified test (eg yarn test:jest:single src/game/tests/dominion-lib-load-save-saveGame.spec.ts)
- yarn test:playwright: Runs playwright e2e tests
- yarn test:playwright:report: Shows the playwright report
- yarn lint:eslint: Runs ESLint
- yarn lint:eslint:fix: Runs ESLint with auto-fix option
- yarn lint:prettier:fix: Runs Prettier to format various file types
- yarn clean: Removes dist/coverage directories
- yarn reset: Removes node_modules, dist, coverage, and runs yarn install again
We welcome contributions to Dominion Assistant! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License.
- The creators of Dominion for inspiring this project
- React and NX for providing the development framework
- Material-UI for the component library
- Digital Defiance and Jessica Mulein for facilitating and creating this work
To learn more about developing on this project, look at the following resources:
Join our community of developers.
- Digital Defiance: 501c3 Non Profit Open Source Engineering Guild, with our own Discord.
- Version 0.12.7
- Fix game time calculation functions for current turn/time up to event, fixes #65
- Version 0.12.6
- Add game debug page to utils
- Version 0.12.5
- Added "secret" utils tab with tools to repair game state
- Version 0.12.4
- Fixed bug with grouped actions botching the time record
- Version 0.12.3
- Rebuild turn statistics cache on game load and after creating a large test game
- Add --noEnd arg to create large game script for testing large games
- Version 0.12.2
- Add padding to bottom of game interface so we can scroll above the fab buttons
- Version 0.12.1
- Make game log retain scroll position between visits and scroll to bottom on updates
- Version 0.12.0
- Remove timeCache, add gameTime to game log events
- Version 0.11.3
- Remove next turn/end game buttons in favor of fab buttons at bottom right
- Version 0.11.2
- Improve visual feedback on applying common actions
- Prevent aria error on clicking out of the details dialog
- Version 0.11.1
- Add more common actions
- Version 0.11.0
- Added support for discard tracking
- Added several cards to common actions, including several from Seaside with discard involved
- Version 0.10.12
- Improved common actions interface
- Improved common actions UI issues with scrollbars
- Version 0.10.11
- Fixed bug that applied common actions while scrolling the options
- Version 0.10.10
- Added support in common actions/recipes to make count by a function in order to implement Huge Turnip or other dynamic actions
- Fixed bug when switching off recipe list tab hovered recipe stayed active
- Version 0.10.9
- Try to improve viewport issues for various components
- Version 0.10.7
- Try to resolve #50
- Version 0.10.6
- Added:
- Introduced RecipeSummaryPopover component to display recipe information in a pop-up when a recipe is hovered over in RecipeList.
- Created RecipeSummary component for detailed display of recipe actions and future actions.
- Added futureActionMap enumeration for standardized future-tense action names.
- Implemented GroupedActionDestStrings and GroupedActionTriggerStrings for enhanced readability in grouped action destination and trigger displays.
- Updated:
- GameInterface now supports new grouped action recipes with onHover, onLeave, and onClick handlers.
- Enhanced TurnAdjustmentsSummary for responsive height adjustments based on container size.
- Modified RecipeList component with VariableSizeList to allow different item sizes for headers, spacers, and recipes, improving layout consistency.
- applyGroupedAction now validates grouped action names against defined recipes to ensure accuracy.
- Tests:
- Updated unit tests in dominion-lib-log-applyGroupedAction to include validation for grouped actions and future action handling.
- Added:
- Version 0.10.5
- Add messages box for displaying messages
- Version 0.10.4
- Filter out net-zero adjustments from Turn Adjustments
- Version 0.10.3
- Improve FontAwesome icons for goruped actions
- Add icon to the log for grouped actions
- Version 0.10.2
- Add FontAwesome
- Add custom icon support to recipes/common actions
- Add icons to Common Actions/recipes tab
- Version 0.10.1
- Add more common actions (Smithy, Library, Market, Festival, etc)
- Recipes are in a FixedSizeList
- Version 0.10.0
- Add common actions with support for cards like council room which add cards now for other players and remove them on their turns
- Version 0.9.10
- Remove curses/colonies from statistics graphing when disabled
- Version 0.9.9
- Reworked Game Log screen completely to improve performance
- Version 0.9.8
- Add options to show/hide track cards and track gains
- Version 0.9.7
- FloatingCounter background color to match player
- Fix player checkboxes positioning
- Version 0.9.6
- GameClock to use caching functions
- New overlay with quick reference counters
- Version 0.9.5
- Added average actions per turn statistic
- Version 0.9.4
- Subtle tweaks to increment/decrement tooltips
- Rename GameScreen to GameInterface
- Rename CurrentStep.GameScreen to CurrentStep.Game
- Show no adjustments instead of empty table in Turn Adjustments component
- Version 0.9.3
- Rework game display, add Turn Adjustments feature which summarizes the changes in the current turn
- Rework game log, add Turn Adjustments feature which summarizes the changes in a given turn
- Version 0.9.2
- Add link checkbox to link changes together
- Version 0.9.1
- Tiny hotfix to fix the add players page breaking due to recent changesl
- Version 0.9.0
- Breaks save game compatibility by changing some property names in the save game
- Adds version compatibility check when loading and importing save games
- Reworked cache system to try and improve the game log and statistics pages
- Implemented new functions for
rebuildCaches
andupdateCachesForEntry
to handle game log caching - Adjusted
applyLogAction
andaddLogEntry
to work with new caching functions
- Implemented new functions for
- Improved
loadGame
to support reloading of cached data and updated error handling inloadGameAddLog
- Updated the
StatisticsScreen
to rely on the new updateCachesForEntry function via addLogEntry - Updated tests to mock
updateCachesForEntry
and ensure accurate time cache and statistics calculations - Added simulated game generator with customizable turn count for testing game log performance
- Refactored
dominion-lib-fixtures.ts
to simplify mocked log entries for tests - Minor optimizations and bug fixes
- Added s3 deployment YAML to auto-deploy to S3 on version tag
- Fixed initial supply amounts to use table from BoardGameGeek
- Version 0.8.0
- Extend caching functionality so that statistics page is rendered faster
- Version 0.7.0
- Add import functionality
- Add caching of game time calculations so that game log is rendered faster on a big game
- Version 0.6.1
- Fix game log/statistics scrollability at bottom for tab bar
- Version 0.6.0
- Added turn card gains count tracking
- Version 0.5.0
- Added turn/new turn card count tracking
- Version 0.4.1
- Restricted Load/Save screen from saving over auto saves
- Fixed viewport issues and start working towards responsiveness to different screen sizes.
- Version 0.4.0
- Added autosave functionality to save game progress after each state change.
- Version 0.3.0
- Added load/save game functionality
- Version 0.2.0
- New Feature: Added detailed victory point tracking by turn in calculateVictoryPointsAndSupplyByTurn, supporting graphical representation.
- UI Enhancements: Introduced StatisticsScreen for game statistics display with line charts for player scores, supply counts, and turn durations.
- Game Log Updates: Added trash option for log entries, ensuring trashed items don't impact supply counts.
- Error Handling: Introduced InvalidTrashActionError for invalid trash actions.
- Dependencies: Integrated chart.js and react-chartjs-2 for graphing capabilities.
- Other Enhancements: Refactored game setup and mock creation for better test coverage and clarity.
- Added
- Added VERSION_NUMBER constant in constants.ts.
- Displayed the version number in the AboutScreen.
- Changed
- Modified the font size of the GameClock component to 1rem for better readability.
- Updated GameInterface to conditionally render the GameClock component only if the viewport width is greater than 1300 pixels.
- Enhanced the IncrementDecrementControl component to include a trash icon button for decrementing victory fields.
- Updated the Player component to handle the trash action for victory fields.
- Fixed
- Fixed the supply decrement logic in updatePlayerField to account for the victoryTrash flag.
- Add confirm end game dialog
- Feature: Added GameClock component to display the game time, current turn time, average turn time, and the average turn time for the current player
- The GameClock component shows the total game time, current turn time, average turn time, and the average turn time for the current player
- Updated the GameLogEntry component to format date and time correctly.
- Adjusted the position of the GameClock component to ensure all lines are visible.
- Added tests for the new functions.
- Fixed bug in computation of game time
- Fixed bugs in NEXT_TURN properties
- Improvement: Improve about/disclaimer/readme
- Improvement: Avoid combined actions when correcting.
- Fix: Resolved bug preventing the addition of the last victory card.
-
Enhancement
:
- Added turn to log entries.
- Display turn number in the next turn.
- Fixed linked action issues in player component and log.
- Feature: Enabled undo for the most recent select/next turn.
- Improvement: Enhanced game log readability.
- Maintenance: Codacy/lint fixes.
- Improvement: Improved typing.
- Feature: Added typings.
- Fix: Tracked currentPlayerIndex in log entries and fixed game log.
-
Improvement
:
- Improved endgame display.
- Allowed ties in rankings.
- Improved select first player.
- Fixed first player state.
- Maintenance: Addressed linting issues.
- Cleanup: Removed unused variables.
- Refactor: Reworked log/start/next.
-
UI Rework
:
- Relied more on CSS for font sizes.
- Converted all fonts to WOFF/WOFF2.
- Used Minion over Trajan in many places.
- Homogenized tab centering components.
-
Refactor
:
- Moved sizing constants into theme.
- Removed 'any' types.
- Improved type safety and centralized sizing in theme.
- Maintenance: Attempted to resolve ESLint issues.
- Feature: Migrated to flat ESLint config and updated Prettier to v3.
- Update: Included GitHub Actions extension in devcontainer.
- Feature: Uploaded coverage to Codacy.
- Setup: Configured zshrc/bashrc to load DOTENV_CONFIG_PATH.
- Setup: Configured Codacy environment.
-
Feature
:
- Set NO_PLAYER for NEXT_TURN and SELECT_PLAYER actions.
- Added getPreviousPlayerIndex.
- Updated tests.
- Fix: Corrected getTimeSpanFromStartGame to handle consecutive saves.
- Feature: Added logic to add the save game log entry when saving.
- Refactor: Reworked storage system.
- Removal: Removed 'cross-platform' feature since now react only.
- Fix: Fixed Playwright server.
-
Fix
:
- Resolved Playwright/Jest overlap.
- Fixed canUndoAction to only undo NEXT_TURN of NoPlayerActions.
- Moved set-kingdom base/prosperity to tests.
- Moved app.spec.tsx to tests.
-
UI Improvement
:
- Removed margin on Scoreboard.
- Moved correction checkbox to within Player component.
- Setup: Installed Copilot CLI in devcontainer and hid canUndo for START_GAME.
- Fix: Corrected useMemo.
-
Improvement
:
- Improved titles.
- Moved canUndo CurrentStep check into canUndoAction.
-
Fix
:
- Removed react-native 8081 port forward.
- Fixed TabView/App to render only single tab.
- Fixed duplicate about screen.
- Fixed canUndo error when not in CurrentStep.Game.
- Added sx property option for SuperCapsText.
- Used MUI styled instead of emotion styled.
- Improved About screen sub-panel titles to use SuperCapsText.
- Maintenance: Lint/Prettier fixes.
- Cleanup: Removed Zone identifier.
- Migration: Migrated to plain React.
- Conversion: Converted from react-native. Addresses #12.
- Enhancement: Split up dominion-lib and added tests.
- Fix: Set color when editing different user. Closes #8.
- Fix: Corrected overwrite save game.
- Improvement: Enhanced load save functionality. Closes #11.
- Feature: Removed HelloWave and added Correction checkbox. Closes #7.
- Fix: Corrected README.
-
Refactor
:
- Removed global mats component.
- Integrated into Player.
- Redid SuperCaps to be Tooltip compatible.
- Made IncrementDecrementControl have optional tooltip on the label.
- Feature: Defaulted to curses enabled.
- Setup: Codacy configuration.
- Switch: Changed ESLint configs.
- Update: Added Codacy badge to README.
- Improvement: Enhanced home screen.
- Initial Commit: Generated by create-expo-app 3.0.0.