Skip to content

Seeder & WireMock from the terminal

Everything the Playground does is also available from a terminal.

Terminal window
DATABASE_URL=postgresql://playdex:playdex@localhost:5432/playdex dotnet run --project tools/Seeder

The API must have started at least once beforehand, because it’s the API that creates the schema. The seeding logic lives in tools/Seeding and is shared with the Admin Playground. Edit DatabaseSeeder.cs there to change the demo data.

WireMock listens on http://localhost:8888. Switch what each fake provider reports with a POST:

Terminal window
curl -X POST http://localhost:8888/__admin/steam/playing
curl -X POST http://localhost:8888/__admin/steam/not_playing
curl -X POST http://localhost:8888/__admin/psn/playing
curl -X POST http://localhost:8888/__admin/psn/not_playing
curl -X POST http://localhost:8888/__admin/xbl/playing
curl -X POST http://localhost:8888/__admin/xbl/not_playing_online
curl -X POST http://localhost:8888/__admin/xbl/not_playing

The same requests are in tools/Wiremock/requests.http, which you can run from Rider or VS Code’s REST Client.

The responses are plain JSON files in tools/Wiremock/mocks/, named <provider>.<state>.json. They’re mounted read-only into the container, so edit one and the next poll picks it up. For example, change gameextrainfo and gameid in steam.playing.json to test a different Steam game.

File Endpoint it answers
steam.*.json GET /ISteamUser/GetPlayerSummaries/v0002/
psn.*.json GET /api/userProfile/v1/internal/users/*/basicPresences
xbl.*.json GET /v2/presence
xbl.game_details.json GET /v2/marketplace/title/*

PSN sign-in is mocked too: any NPSSO works and resolves to account psn-account-id.

src/Api/appsettings.Development.json already points every provider at http://localhost:8888, so you can run only the infrastructure in Docker:

Terminal window
docker compose up db wiremock apprise
DATABASE_URL=postgresql://playdex:playdex@localhost:5432/playdex dotnet run --project src/Api