cribbage

BSD 3 Clause License Language Build Coverage Version

Site | GitHub | Coverage Report

Cribbage is a popular card game, predominately played by two players.

Background

An example of a fullstack cribbage playing program, allowing games to be played with remote users.

It has been created as “a bit of fun” and, as of Dec 2025, the project is essentially complete, and now presents as an example project for general perusal. I’m always learning and welcome feedback any aspects of the project, especially if there are ways to make things simpler and / or clearer. If you’re interested in helping me along that learning path please make any comments through the github issues page.

Packages

graph TD
    dioxus["dioxus 0.7"] 

    web["web"]
    ui["ui"] 
    api["api"]
    server["server"]

    web --> dioxus
    web --> ui
    web --> api

    ui --> dioxus
    ui --> api
    
    api --> dioxus
    api --> server

Project Documentation

Setup

Note: git pre-commit checks require active database because the following commands are executed:

DATABASE_URL=postgres://postgres:password@localhost:5432/cribbage
docker-compose -f docker/compose.yml up -d
cd packages/server
cargo sqlx migrate run

Testing

cargo test --all-features

Build

dx build --package=web

Run

dx serve --package=web

Navigate to:

Notes

History

This project has been used as a learning platform and had many flavours over time. The Rust / Dioxus combination proved the most productive and sucessful.

The key interest revolved around:

Previous technologies included Scala, Akka (now Pekko), and later trying out the Cats Effects stack.

The project then moved to Rust initially using Leptos before finally committing to Dioxus.

I have to raise my hat to the Dioxus team and community as a whole for being incredibly supportive, proactive, reactive and helpful with any questions / queries I had during the development.