wikipedia-game-solver/README.md

2.2 KiB

Wikipedia Game Solver

Important

The project is a work in progress, at an early stage of development.

Note

The project is also a way to learn and experiment with a clean monorepo architecture, with Turborepo, and TypeScript as the main language.

The project setup can be used as a template/boilerplate for new projects.

About

The Wikipedia Game involves players competing to navigate from one Wikipedia page to another using only internal links.

Wikipedia Game Solver is a tool that helps you find the shortest path between two Wikipedia pages, using only internal links, basically solving the Wikipedia Game for you.

Available online: https://wikipedia-game-solver.theoludwig.fr

Getting Started

Prerequisites

Installation

# Go to the project root
cd wikipedia-game-solver

# Configure environment variables
cp .env.example .env
cp apps/website/.env.example apps/website/.env
cp apps/api/.env.example apps/api/.env

# Install dependencies
pnpm install --frozen-lockfile

# Install Playwright browser binaries and their dependencies (tests)
pnpm exec playwright install --with-deps

Development

# Start the development servers
node --run dev

# Start the development Docker services (e.g: Database)
docker compose --file compose.dev.yaml up

# Database migrations
node --run database:migrate

# Lint
node --run lint:editorconfig
node --run lint:prettier
node --run lint:eslint
node --run lint:typescript

# Tests
node --run test

# Build
node --run build

# To execute a command in a specific package (e.g: apps/api)
cd apps/api
node --run ace -- list

Production environment with Docker

# Setup and run all the services for you
docker compose up --build

# To execute database migrations
docker compose exec wikipedia-game-solver-api sh
node --run database:migrate

Services started

License

MIT