Olly is a game client and server for the two-player strategy board game, Othello.
- Play Othello with friends by inviting via username (no matchmaking)
- User registration and account (username/password) management
- Send and receive friend requests from others
- View your pending (incoming and outgoing) invites to games as well as currently active games
- Abandon games at any point before a player wins
- Request (classical AI) moves generated using Negamax algorithm (as an API endpoint:
/companion)
This repository consists of a Rust web server using axum, and a Next.js client (in client/).
It is recommended to use the Nix development shell at the root of this repository to automatically install all necessary dependencies (excluding Docker, which must be installed manually).
- Start the background services (server, PostgreSQL database, Redis cache):
docker compose up -d - Migrate the database:
cargo run --package migration up - Run the web client:
cd client && npm run dev
Frontend: Use cypress e2e test runner (npm run test). After each subsequent execution, sea-orm-cli migrate fresh must be run to ensure that app state is refreshed to defaults. Otherwise, some tests may fail.
Backend: Use Cargo's built in runner (cargo test). After each subsequent execution, sea-orm-cli migrate fresh must be run to ensure that app state is refreshed to defaults. Otherwise, some tests may fail.
DATABASE_URL(default:postgres://olly:password@db:5432/olly) - specifies the address of the PostgreSQL databaseREDIS_URL(default:redis://cache) - specifies the address of the Redis server