Commit Graph
74 Commits
Author SHA1 Message Date
lobo e1d837bc78 fix(igdb): search only games a user can own and play
Build, Test & Push Core Service / quality-check (push) Failing after 49s
Build, Test & Push Core Service / docker (push) Skipped
The search listed DLC and e-Reader levels, and the limit of
10 pushed the main games out. Keep main games, standalone
expansions, seasons, remakes, remasters, expanded games and
ports, and show 20 hits.
2026-09-25 15:24:05 +02:00
lobo 4d50863cb8 feat(library): add games by name from IGDB
Build, Test & Push Core Service / quality-check (push) Successful in 51s
Build, Test & Push Core Service / docker (push) Successful in 1m24s
Games the user owns outside Steam get the key minus their
IGDB id, or the Steam appid when IGDB knows the game on
Steam. The sync never removes a MANUAL row and takes it
over once the user owns the game on Steam. Users without
a Steam ID can use the library.
2026-09-25 14:37:21 +02:00
lobo 5d608b72e6 feat(security): accept the auth cookie and guard against CSRF
Core reads the login token from the tbp_access cookie or a Bearer
header, whichever verifies, and parses it once per request. Unsafe
requests need an X-TBP-Client or Authorization header, CORS allows
only the exact frontend origin, and a missing or expired token
answers 401 instead of 403.
2026-09-25 13:45:08 +02:00
lobo 762b7898d3 feat(security): load verify keys from auth JWKS
Build, Test & Push Core Service / quality-check (push) Successful in 40s
Build, Test & Push Core Service / docker (push) Successful in 1m24s
Core finds the key by the token kid and loads the JWKS again for an
unknown kid, at most every 10 s. JWT_PUBLIC_KEY is used only until the
first JWKS load works, so a key removed from the JWKS cannot verify
later. While that key still works, requests do not wait for a slow
Auth.
2026-09-25 11:01:28 +02:00
lobo 9fd552a785 feat(library): library-wide achievement sync and summary
Achievements were fetched only when a game detail page was opened, and a Steam error was stored as "no achievements" or "hidden". A background run after each library sync now fetches schemas and the unlocks of games with new playtime, one Steam call per second for all runs together, and never overwrites stored data on a Steam error. Adds GET /api/library/achievements/summary, achievement counts on GameDto and the public profile, and migration V7 (playtime_at_refresh).
2026-09-25 10:13:31 +02:00
lobo 86db6f7167 feat(library): picker for what to play next and a status-only update
GET /api/library/picker returns random backlog games for a time budget, HIGH priority first. PUT /games/{appid}/status changes only the status, so the picker does not need the game detail (and its Steam calls) to keep rating, notes and priority.
2026-09-25 09:29:15 +02:00
lobo 0a5186782f test: generate the JWT test keys, drop application-dev.yml
Build, Test & Push Core Service / quality-check (push) Successful in 41s
Build, Test & Push Core Service / docker (push) Successful in 1m20s
The dev config held real keys. Local dev config now lives outside the repo; integration tests create a fresh Ed25519 keypair per run.
2026-09-25 08:37:55 +02:00
lobo ba75c00301 feat(library): Steam name and avatar for the header 2026-09-24 15:27:33 +02:00
lobo 00a7991380 feat(library): time to beat from IGDB 2026-09-24 14:40:41 +02:00
lobo 2f2f8a2918 feat(profile): public profile data for a ticket from Auth
GET /api/public/profiles/library with X-Profile-Ticket returns totals, status
counts, playing and finished games with rating; never notes, priority or the
Steam ID. Login filters reject the ticket, and Core keeps no copy of the
privacy flag.
2026-09-24 14:18:32 +02:00
lobo ea1e1e9aec feat(library): sync the Steam wishlist with store prices
Each sync fetches the public wishlist and the store name, price and discount
(batches of 100) and replaces the user's wishlist_game rows, without games
the user owns. A Steam error keeps the old list, a failed store batch keeps
the last known price, and a Steam ID change drops the old account's list.
GET /api/library/wishlist returns it newest first.
2026-09-24 13:58:44 +02:00
lobo ba1f1e6fe1 feat(library): playtime history per day and a nightly sync
Each sync records the growth of playtime per game and day (Europe/Berlin).
The first successful sync of a Steam account is only the baseline, tracked in
user_steam_sync.history_steam_id, so a new or failed account never turns its
whole playtime into one day. A nightly sync at 23:55 runs the recently used
accounts one after the other. GET /api/library/activity returns minutes per
day and the games of Steam's last two weeks.
2026-09-24 13:41:37 +02:00
lobo afa2a7ea75 feat(library): sort by rating and priority with a stable order
Games without a rating or priority come last in both directions. Priority
sorts HIGH, MEDIUM, LOW instead of by enum name, and appid breaks every tie,
so pages no longer repeat or skip games with equal values.
2026-09-24 13:17:12 +02:00
lobo 0482fb0c88 feat(library): summary endpoint with status counts and a backlog pick
GET /api/library/summary returns the game count per status, the never-started
count and a random backlog game. exclude=<appid> makes a new pick differ from
the current one.
2026-09-24 11:22:29 +02:00
lobo 474a5dd570 test: share one Postgres container across test classes
The per-class container was stopped under the Spring context that the next
test class reused, so a second integration test class failed with
"Connection is not available".
2026-09-24 11:22:29 +02:00
lobo 3351ef75f0 fix(library): keep backlog edits made during a sync, reject fractional ratings
UserGame now uses @DynamicUpdate, so the sync flush writes only the columns it
changed and no longer overwrites a backlog update committed meanwhile.
2026-09-24 11:04:02 +02:00
lobo 0ac93394d9 feat(library): backlog status, rating, notes and priority per game
New games start as BACKLOG, or PLAYING when they have playtime. The sync
never changes a status later. PUT /api/library/games/{appid}/backlog sets
all four fields; /api/library/games filters by status and name (q).
2026-09-24 10:51:17 +02:00
lobo b46e2badbd fix(security): close the Steam test endpoint, /internal and Prometheus to the public
/api/steam/test/{steamId} let anyone query any Steam profile with our API key. /internal/** had no controller but was open for any future one. Actuator now exposes only health, without details. The management block was also indented under endpoints, so show-details never applied.
2026-09-24 10:24:34 +02:00
lobo 50f5f26157 fix(library): sync again after a Steam ID change and keep library on empty result
An empty Steam answer (error, private profile, wrong ID) was stored as OK and
soft-deleted the whole library. It is now FAILED, keeps the library and is
retried after 15 minutes (app.library.failed-retry-minutes).

The automatic sync now also runs when the Steam ID in the token differs from
the stored one, and removes the games of the previous Steam account.
2026-09-24 08:56:45 +02:00
Andreas Dahm dbea8922d5 Changed from JWT token to public/privat key 2026-05-12 08:57:12 +02:00
Andreas Dahm 1eb445e7a0 Added tests 2026-05-11 14:31:38 +02:00
Andreas Dahm ac97442312 Added dev impersonation and changed api a little bit 2026-04-29 08:50:02 +02:00
Andreas Dahm 1b08e7902c Try to fetch steam game count if requested and cache it 2026-04-28 15:43:02 +02:00
lobo be9b70c541 Add owned-games DTO and full profile support
Introduce SteamOwnedGamesResponse and SteamProfileAndGamesResponse DTOs and extend SteamApiService with getOwnedGames(...) and getFullPlayerProfile(...) to fetch and combine player summary and owned games. Update SteamTestController to return the combined profile/games response. Remove redundant Steam service URL entries from application.yml. Add SteamApiServiceTest to cover player summary, owned games (including null fields), and the combined profile flow; service falls back to empty lists on errors.
2026-04-19 15:15:15 +02:00