Seeder & WireMock from the terminal
Everything the Playground does is also available from a terminal.
Seeder
Section titled “Seeder”DATABASE_URL=postgresql://playdex:playdex@localhost:5432/playdex dotnet run --project tools/SeederThe 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 scenarios
Section titled “WireMock scenarios”WireMock listens on http://localhost:8888. Switch what each fake provider reports with a POST:
curl -X POST http://localhost:8888/__admin/steam/playingcurl -X POST http://localhost:8888/__admin/steam/not_playing
curl -X POST http://localhost:8888/__admin/psn/playingcurl -X POST http://localhost:8888/__admin/psn/not_playing
curl -X POST http://localhost:8888/__admin/xbl/playingcurl -X POST http://localhost:8888/__admin/xbl/not_playing_onlinecurl -X POST http://localhost:8888/__admin/xbl/not_playingThe same requests are in tools/Wiremock/requests.http, which you can run from Rider or VS Code’s REST Client.
Changing what’s “played”
Section titled “Changing what’s “played””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.
Running the API outside Docker
Section titled “Running the API outside Docker”src/Api/appsettings.Development.json already points every provider at http://localhost:8888, so you can run only the infrastructure in Docker:
docker compose up db wiremock appriseDATABASE_URL=postgresql://playdex:playdex@localhost:5432/playdex dotnet run --project src/Api