Tarot Card Shuffle Draw is a free and open-source project that shuffles and returns a selection of Tarot cards. Users can choose different decks, specify the number of cards to draw, and include reversed cards in the draw. Public domain illustrations of the cards are presented with the results.
This port of the application is dockerised, with accompanying Helm chart that can be run in plain docker or installed on Kubernetes. There are other versions available - see Alternative Deployment Ports below
- Deck Options: Full Deck, Major Arcana only, Minor Arcana only
- Reversed Cards: Option to include reversed cards
- Random Draw: Secure randomness using
crypto/rand
- Web Interface: User-friendly web interface built with Gin
- Dockerized: Easy deployment with Docker
- Continuous Integration: Automated testing and deployment with GitHub Actions
The included GitHub actions workflow covers test, build, package, publish.
Prerequisites
- Go 1.22 or later
- Docker (for containerized deployment)
There is a helper script for downloading the (included) images from Wikipedia/Wikimedia commons in image_downloader
-
Clone the repository:
git clone https://github.com/joshuamkite/tarot-card-shuffle-draw-web.git cd tarot-card-shuffle-draw-web
-
Install dependencies and run the application:
go mod tidy go run main.go
-
Open your browser and navigate to
http://localhost:80
.
-
Build the Docker image:
docker build -t tarot_shuffle_draw .
-
Run the Docker container:
docker run -p 80:80 tarot_shuffle_draw
-
Open your browser and navigate to
http://localhost
.
Prerequisites
- Kubernetes cluster
- Helm installed
-
Add the Helm Repository:
helm repo add tarot-card-shuffle-draw-web https://github.com/joshuamkite/tarot-card-shuffle-draw-web
-
Update the Helm Repository:
helm repo update
-
Install the Helm Chart:
helm install tarot-shuffle-draw tarot-card-shuffle-draw-web/helm/tarot-shuffle-draw
-
Access the Application:
kubectl get svc --namespace default
Look for the
tarot-shuffle-draw
service and note theNodePort
. Access the application athttp://<node-ip>:<node-port>
.
Prerequisites
- Kubernetes cluster
- ArgoCD installed
-
Add the Application to ArgoCD:
Create a new application in ArgoCD pointing to this repository.
argocd app create tarot-shuffle-draw \ --repo https://github.com/joshuamkite/tarot-card-shuffle-draw-web.git \ --path helm/tarot-shuffle-draw \ --dest-server https://kubernetes.default.svc \ --dest-namespace default
-
Sync the Application:
argocd app sync tarot-shuffle-draw
-
Access the Application:
kubectl get svc --namespace default
Look for the
tarot-shuffle-draw
service and note theNodePort
. Access the application athttp://<node-ip>:<node-port>
.
- Choose the deck type: Full Deck/ Major Arcana only/ Minor Arcana only.
- Select reversed cards option: Include or exclude reversed cards.
- Specify the number of cards to draw.
- Click "Draw Cards" to see the results.
GET /
: Displays the options page.POST /draw
: Handles drawing cards based on user input.GET /license
: Displays the license page.
Run the tests using the following command:
go test -v -cover ./...
There is a cross platform command line port (sorry, no illustrations!) available with binaries packaged for various operating systems - see tarot-card-shuffle-draw
There is a serverless port deployed as AWS Lambda microservices orchestrated with API Gateway and backed with S3 and CloudFront - see tarot-card-shuffle-draw-lambda