Box of Cards V3

The beta release — custom decks, AI players, Discord login and everything else a live party card game needs. Part of the Box of Cards work.

TS · React · NodeJs · Digital Ocean · Docker · S3 · Route53 · Cloudwatch · Cloudfront · Websockets · Redux Toolkit · RTK Query · MaterialUi · Jest · Affinity Designer · Affinity Photo

Box of Cards Beta Release!

New Landing Page

I am very proud that Box of Cards is now released as a beta.

It took me years of spare time developing it. This could have been done way faster but I really desired to embrace several learning opportunities and new technologies on the way.

This page tours the features of the beta. Why I switched from AWS serverless to dedicated Digital Ocean servers now has its own project: Leaving Serverless.

Games, Decks & Account

Main Menu

This main menu is displayed after logging in.

3rd party Logins via e.g. Discord unlock custom Decks & Account management. Guests can host games but not manage decks as I need a permanent identifier to assign decks to.

Gamelobby Deck Selection

A Gamelobby with the Decks tab active

After clicking on 'Host Game' a new Gamelobby is created. The host can then select and like decks on the active Decks tab.

Gamelobby Option Selection

A Gamelobby with the Options tab active

The Options tab enables the host to customize game rules. This includes e.g. whether a sentence is automatically being drawn or selected and whether the winner is being chosen by the cardinal or being voted by all.

Inviting Players

Gamelobby Invite Overlay

This game is played with others. The host can copy and send join links to play mates. AI Players can also be added for their supreme humor or testing deck creations by yourself.

Sentence Selection

Game with active Sentence Selection

This is a game in which sentences are being actively chosen. The host selected the top left sentence card and can now confirm it. The info box at the bottom always tells players when and what to do. The players are displayed at the top with their avatars. Here all players except the host are AIs. The host avatar has tags which mark him as host and cardinal.

Answer Selection

Gamelobby with host selecting Answers

In this round the host has to choose two answers from his five answers. He chose 'Lots of Coffee' first and 'Their Bot Nets' second. The Answer Options 'Lots of' and 'Their' are highlighted as the host selected those specifically. Currently the AI Barlow is Cardinal and will decide the best contribution.

Answer Presentation

GameLobby with Player presenting Answers

All submitted Answer-Stacks are presented by a player. Normally this would be done by the Cardinal but AIs can't present and thus a player has to. Submissions are anonymous and non-chronological to avoid picking best friends.

Winner Presentation

Host presents winning Answer submission

Barlow liked the Answers submitted by the host and thus the host scored a point. Scores are being displayed on top of the avatar if any points are earned. If you like the result you can download an image of it as keepsake or share it on social media & messengers.

The ad placeholder on the bottom is the primary way to monetize Box of Cards and to pay server bills.

History

Active History tab

The game stores results of previous rounds and provides access via the History tab. Due to the mobile view this tab is currently being hidden in the '...' menu-button.

The history can be downloaded too. Though only 12 cards may be downloaded at once to keep browser & server happy. If more than 12 cards are available a selection will appear to switch between parts of the history.

Theme & Language

Game in light mode and german

Box of Cards automatically opens in light or dark mode based on your browser default. Additionally you can play it in german or english. Decks are exempt from your language selection, so those won't translate by themselves.

Deck Creation

A Users Deck Management Page

The most important part of Box of Cards are the custom decks. Decks contain general information like a name, description, language, a marker for rough content and of course sentences & answers.

Deck Editing

A User editing a Deck

The left half contains the sentences of the deck and the right half the answers. For test purposes selected Answers can be inserted into the selected Sentence using the 'Insert in X' buttons. Sentences & Answers can be downloaded & uploaded separately.

Deck Info

Deck Info Tab

Statistics and settings of the edited deck.

Deck Format

Downloaded Sentences & Answers in Text Editor

To keep deck editing as simple as possible the answers & sentences are split into two downloadable files. Every line contains one sentence or one answer. A Sentence can have up to 3 placeholders/underscores '_'. Answers can have up to 3 options which allow exchangable text snippets '[A,the,]'.

Discord Login

Login via 3rd Party using Discord

To track & manage as little user data as possible I only use 3rd party logins. This is also the minimum amount of data I can fetch from Discord.

The Discord Developer Portal is amazing. It feels like being home <3.

Box of Cards Discord Server

Summary of the Box of Cards Discord Server

I created a Discord Server to interact with the Box of Cards community. Here I will gather & respond feedback, provide changelogs & give players a place to socialize.

FAQ

Frequently asked Questions Page

Nobody asked any of these questions yet. But I guess most FAQ pages are created from guesses and expanded upon afterwards.

Legal Stuff

Legal Notice Page

There is SO MUCH legal stuff to comply with and there are many partial overlaps too. It feels impossible to avoid repetitive statements when complying with all of Europe, Great Britain, Germany, USA, California, Australia, etc.

Backend Tests

All tests in Webstorm in a single run

The application has exclusively end-to-end tests. Most of the internal logic is quite simple, and I'm interested in whether the overall system works as expected. The tests were incredibly helpful, especially during migrations between technologies.

Fun with Axios

As a developer I use this Meme often

Axios is a backbone of the world wide web.

Because of this it feels funny when you pass your baseUrl like 'https://boxof.cards' to an axios request and Axios just overrides it with 'http://localhost:8080'.

It took me hours to debug and understand the code behind this. There are multiple levels of default values for urls and it really just ignores your parameter.

All of this would not be a problem if talking to a single server and using the constructor baseUrl but I manage multiple Websocket Nodes.

It is also not sufficient to change the source code once as this is part of multiple generated Apis gluing my Services together. So after Api-generation, a script is run to replace the troublesome code in the generated files.

Major Updates everywhere

React Router, you okay?

I am glad that the react eco-system and Material UI slowed down.

While developing Box of Cards I went through two major Updates for most libraries. After my final update I was quite surprised when react-router decided to remove an essential feature and provided no way to replace it. How did I solve this? Well I did not. Not everything has to be solved.

I could talk dozens of hours on the development of Box of Cards. Reach out to me if something interests you.

Thanks for reading. Have fun with Box of Cards and leave me some feedback on its Discord.