Metadata-Version: 2.4
Name: hexgame-server
Version: 0.1.0
Summary: FastAPI WebSocket Hex game server with matchmaking, best-of series, win detection, reconnect, and an optional Redis/PostgreSQL state backend
Author-email: Cahya Wirawan <cahya.wirawan@gmail.com>
License: MIT
Project-URL: Homepage, https://hexgame.codingdojo.ai
Project-URL: Source, https://github.com/cahya-wirawan/hexgame
Keywords: hex,game,board-game,websocket,fastapi,matchmaking,server
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Topic :: Games/Entertainment :: Board Games
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: fastapi<0.100,>=0.95
Requires-Dist: uvicorn[standard]<0.23,>=0.22
Requires-Dist: websockets<12,>=11
Provides-Extra: redis
Requires-Dist: redis<6,>=4.5; extra == "redis"
Provides-Extra: postgres
Requires-Dist: sqlalchemy<3,>=2; extra == "postgres"
Requires-Dist: psycopg[binary]<4,>=3; extra == "postgres"
Provides-Extra: dev
Requires-Dist: pytest<8,>=7; extra == "dev"
Requires-Dist: pytest-asyncio<0.22,>=0.21; extra == "dev"
Requires-Dist: httpx<0.25,>=0.24; extra == "dev"
Provides-Extra: all
Requires-Dist: hexgame-server[postgres,redis]; extra == "all"

# hexgame-server — Hex game server

FastAPI WebSocket Hex game server with matchmaking, best-of series, server-authoritative gameplay, win detection, reconnect tokens, and an optional Redis/PostgreSQL state backend. Ships with a built-in Vite/React dashboard (`/`, `/docs`, `/overview`, `/statistics`).

Installing this package gives you the `hexgame-server` command.

## Install

```bash
pip install hexgame-server                    # core
pip install "hexgame-server[redis]"           # + Redis state backend
pip install "hexgame-server[postgres]"        # + PostgreSQL completed-series history
pip install "hexgame-server[all]"             # both backends
```

`hexgame-server` is independent from the [`hexgame`](https://pypi.org/project/hexgame/) client distribution — install that one as well only if you want to play against your own server from the same machine.

## Run

```bash
hexgame-server --host 0.0.0.0 --port 8000
# optional flags: --reload, --workers N (Redis backend required), --log-level info
```

Then open:

- Landing page: <http://127.0.0.1:8000/>
- Slot state JSON: <http://127.0.0.1:8000/slots>
- Overview dashboard: <http://127.0.0.1:8000/overview>
- Statistics leaderboard: <http://127.0.0.1:8000/statistics>

See the [main repository README](https://github.com/cahya-wirawan/hexgame) for the full server documentation, WebSocket protocol, deployment options (Docker), and design notes.
