2026 / fullstack + game + web

Mahjong

A shared game core for real-time Taiwan Mahjong

Game table background from the Mahjong repository
From the repository

01 / Overview

Project overview

The repository separates the Vite client, Fastify/Socket.IO server, Mahjong rules engine, and shared types into npm workspaces. One production image serves the frontend and the real-time backend, with GitHub workflows for GHCR publishing and Oracle deployment.

02 / System highlights

npm workspace monorepo
Shared rules and state engine
Socket.IO client/server
Single production container

03 / Architecture

Client

React 18

Vite

socket.io-client

Shared game-core package

Server

Fastify 5

Socket.IO

PostgreSQL client

Shared game-core package

Real-time

Socket.IO event transport

Shared TypeScript contracts

Room and table UI flows

Infrastructure

Docker image

GHCR publish workflow

Oracle deploy workflow

Typecheck, test, and build scripts

04 / Toolchain

TypeScriptReactViteFastifySocket.IOPostgreSQLDockerGitHub Actions

05 / Source notes

01

README: apps/web, apps/server, packages/game-core, and packages/shared.

02

Package manifests: React 18, Fastify 5, Socket.IO 4, PostgreSQL client, and Vitest.

03

Repository workflows publish one image and document Oracle deployment.