Skip to content
← projects / Catan

Catan

A multiplayer web adaptation of the board game Catan, playable together in a browser in real time.

Overview
year
2025
role
Full-stack design and development
status
Live
front
Vue 3
back
FastAPI, Python, WebSocket
data
PostgreSQL
Catan — full-screen map view
Catan — overview

Context

The project

A digital version of Catan, playable multiplayer in the browser: randomly generated board, settlement and road placement, resource production, trading between players, the robber and victory point counting.

Architecture

Stack: Vue 3 · FastAPI · PostgreSQL · WebSocket

Game state lives on the server, never in the client. Every action a player sends is validated server-side — is it their turn, do they have the resources, is the spot legal — before it is applied and pushed back to every participant.

It's the only defensible architecture for a multiplayer game: a client that works out for itself what it's allowed to do is a client you can tamper with.

What the game teaches

Catan is an excellent modelling exercise. The board is a hexagonal tiling where settlements sit on vertices and roads on edges — so three coordinate systems coexist, and half the work is moving cleanly between them: which tiles touch this vertex, which edges start here, which vertices are too close to take a new settlement.

Once that geometry is laid down correctly, the game rules become almost trivial to implement. Laid down crooked, every rule becomes a special case.

Architecture

01 · State

Game state lives entirely on the server, never in the client.

02 · Validation

Every action is checked server-side — turn, resources, legality — before it is applied.

03 · Broadcast

The new state is pushed back to every participant over WebSocket.

04 · Persistence

Games and move history kept in PostgreSQL, environment started with a single docker compose command.

Interface

Filter and source panel
Detail view of a single item

Next project

Thanos

Continue