# Running it on your PC

For developing Games Communities itself. You need .NET 10 and Node 22.

## Build

```sh
dotnet build GamesCommunities.slnx -v q -nologo -clp:ErrorsOnly
cd store/client && npm ci && npm run build && npm run check
```

`npm run build` also builds this manual into `dist/docs/`.

## The service

```sh
dotnet run --project shared/GamesCommunities.Api -- --data=<folder> [--admin=<user>]
```

It listens on `http://127.0.0.1:5080`, keeping everything (SQLite and files) in `<folder>`. Useful flags for a test
service: `--no-review` (games go live without review), `--voice-dev` (voice without a media server).

## The website

```sh
cd store/site
GC_API=http://127.0.0.1:5080 node server.mjs
```

Open `http://127.0.0.1:3200`. The manual is at `/docs/`.

## The app

```powershell
.\tools\Start-GC.ps1 -Api http://127.0.0.1:5080
```

> [!WARNING]
> Anything that starts the launcher on a PC with a real Games Communities install must pass `--folder=<scratch>`, so
> it doesn't touch the real install.

## Test data

`store/client/dev/seed-communities.mjs` fills a local service with communities, with flags for more:
`--shops`, `--design`, `--scripts`, `--code`, `--pages`, `--more`, `--street`.

## Publishing a game to it

```sh
gc-cli login --api=http://127.0.0.1:5080
gc-cli publish-native <folder> --exe=Game.exe
```

## Tests

```sh
dotnet test --project shared/tests/GamesCommunities.Services.Tests
dotnet test --project store/tests/GamesCommunities.Store.Tests
```
