# Synhex

A simultaneous-turn hex tactics game (Frozen Synapse–inspired) with friends, invitation links, rematches, personal avatars and SQLite storage. Seeded from Microchess's match/lobby shell.

The complete application is in [`web/`](web/). Files outside that folder are for repository tooling and CI only. Start locally:

```sh
php -S 127.0.0.1:8080 -t web web/router.php
```

Localhost automatically uses a test account. See [`web/README.md`](web/README.md) for setup, OAuth (`auth.timfalken.com`), rules and tests.

Game balance knobs (accuracy, weapons, walk range, grid size, walls, vision) live in one file: [`web/lib/game-config.php`](web/lib/game-config.php). OAuth secrets stay in the generated, gitignored `web/data/config.php`.

This branch is the seed for a future GitLab project `Timfa/synhex`. **Production FTP deploy is disabled** until that host exists.

## GitLab CI/CD

The default branch is `master`. `.gitlab-ci.yml` runs PHP/hex/API tests, JavaScript checks and a real FTP fixture test. The `ftp_upload` deploy job is set to `when: never` so pipelines never upload. Re-enable it when production exists.

Required CI variables (unused until deploy is turned back on):

| Variable | Value |
| --- | --- |
| `timftphost` | FTP/FTPS/SFTP hostname or URL |
| `timftpuser` | Login name |
| `timftppassword` | Password; configure as masked/protected in GitLab |
| `projectftp` | Existing remote application directory, relative to the FTP login root or absolute |

The mirror preserves the entire production `data/` directory. Test artifacts, the development router and the application README are excluded from upload.

The deployment fixture can also run locally with Python 3, `pyftpdlib` and `lftp`:

```sh
python3 ci/test_deploy.py
```
