Skip to content

dechristopher/lio

Go Report Card License: AGPL v3

Lioctad (li[bre] octad) is a free online octad game server focused on realtime gameplay and ease of use.

Octad is a 4x4 chess variant: the same pieces and rules as chess (check, checkmate, promotion, en passant) with variant-specific castling, played on a 4x4 board. The starting position in OFEN (Octad's FEN) is ppkn/4/4/NKPP w NCFncf - 0 1.

Stack

Lioctad is written in Go 1.22 using Go Fiber and React 17 with Redux. Go templates are used for templating. Pure octad logic — move generation, legality, OFEN parsing, and outcomes — lives in the octad library, not in this repo; the server is built around it. The server is fully asynchronous, making heavy use of Go routines. WebSocket connections are handled by a separate server that communicates using Redis PubSub. Lioctad talks to an octad engine that uses minimax with alpha-beta pruning for games against computers. It uses PostgreSQL to store games, which are indexed by Elasticsearch. HTTP requests and WebSocket connections can be proxied by Nginx. The frontend is written in TypeScript, using Sass to generate CSS. All rated games are published in a free PGN database.

Repository layout

This is a monorepo with two independent sub-projects:

  • src/ — the Go backend (module github.com/dechristopher/lio). Dependencies are vendored. Notable packages: cmd/lio (entrypoint), engine (Octad search + evaluation), dispatch (engine move requests), room (game state machine), www (HTTP/WebSocket server).
  • ui/ — the TypeScript/React frontend.

A short architectural map for contributors and AI tooling lives in CLAUDE.md.

Development

Backend (run from src/):

go build ./...                                      # build
go test ./engine/ -count=1                          # run engine tests
go run ./cmd/lio --debug room,dispatch,clock,engine # run the server locally

The server binary accepts --debug <comma,separated,flags> to enable scoped debug logging. By default it listens on port 4444.

Frontend [beta] (run from ui/):

yarn install
# see ui/package.json for build/serve scripts

License

Lioctad is licensed under the GNU Affero General Public License 3 or any later version at your choice. See COPYING for details.

About

♚ lioctad.org: the forever free, adless and open source octad server

Topics

Resources

License

AGPL-3.0, Unknown licenses found

Licenses found

AGPL-3.0
LICENSE
Unknown
COPYING

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors