Open-source poker hand calculator.
- General info
- Architecture
- Features
- Quick start with Docker
- Installation
- Unit and performance tests
- Development
- License
This project has been written to a develop fast open-source hand calculator for Texas Hold'em as an Engineering Thesis. It uses TwoPlusTwo evaluator for calculating hand ranks. The repository contains unit and performance tests, Docker image with Docker Compose for quick start and configured CI/CD with GitHub Actions.
The Application is split into 3 projects:
- Node.js backend application built with Typescript and Express.js framework
- Frotend written in pure JavaScript and Webpack bundler located in
frontend
directory - C++ Addon with TwoPlusTwo table generator in
addon
directory
- Responsive web application for Poker Texas Hold'em odds calculator up to 9 players
- Displaying the number of enumerated combinations and hand rank probability for each player
- Support for Death Cards
- Request caching on the backend side
- Logging requests with log retention politics stored inside
logs
directory
Turn on Docker and in your terminal run:
docker-compose up
App will be listening on http://localhost:3000
.
To install the application you should have installed Node 16 version, make and g++ complier.
Next, follow consecutive commands:
npm install
npm run build:all
npm run start
The app will be listening on http://localhost:3000
.
Unit tests are written in Jest testing framework.
To run unit tests run:
npm run test
if you wish to get a coverage report you run npm run test:coverage
.
To run performance tests for addon run:
npm run test:performance
if you wish to print results and manually validate results run npm run test:performance:printResults
.
To serve a frontend by the backend application you should build the frontend first using npm run build:frontend
. After that you can run the backend development server with:
npm run dev
When you work on the frontend you may wish to dynamically rebuild the project. To run the frontend development server run:
npm run dev:frontend
You can check out the full license here
This project is licensed under the terms of the MIT license.