A fun card game to play with friends (or foes). Work in progress.
- Chek RULES for more information how the game is played.
- Chek BACKLOG for current development status and roadmap.
Requires Node.js v22 or greater. I'm personally using Volta to automatically switch Node.js versions between projects.
Install project dependencies (very few) with npm install
and you are ready to go.
- apps
- cli - Tiny impmentation of game playable through a CLI
- server - A stateless implementation playable over HTTP
- client - A web browser UI implementation that uses server as back-end
- packages
- game - Core game logic, usable both on client/server.
- util - Utility functions like shuffle()
The easiest way to test the game is to run npm run cli
to run the CLI implenntation of the game.
To run the game in a web browser you'll need to npm run sever
and npm run client
and open open up http://localhost:5173/
in your favorite web browser
Run tests in watch mode during development:
npm test:dev
Do a single test run with code coverage:
npm run test:coverage
This is a personal hobby project and I've been wanting to explore the following concepts and ideas:
- How good can the DX with modern JavaScript and JSDoc be (compared to eg. TypeScript)
- Use as few dependencies as possible
- Server Side/Node.js
- Using ESM natively without any transpilation or bundling.
- Use built-in Node.js test runner.
- Use built-in Node.js SQLite library.
- Use built-in WebSockets and/or Server Push Events
- Use built-in watch mode eg. ´node --watch` instead of eg. Nodemon
- Client Side/Browser
- Use Native Browser APIs
- No JavaScript build step
- No CSS build step
- Server Side/Node.js
- Architecture
- Clear seperation of concerns: Isolated game core logic that allows for multiple implementations of the game
- Service logic decouploed from protocol layer (HTTP/SSH/Telnet etc.) & API layer (REST, GraphQL, RPC etc.)
- Deployment
- Deploy "anywhere": Edge/Serverless/Docker?
Tools used to enfore code formatting (and one of the few project dev dependencies):