跳到正文
DEV Community· Hex Guard·· 5 天前AI 評分28

Playroom:自架應用程式整合 Steam、PlayStation 和 Xbox 遊戲收藏

I built a self-hosted app to see all my Steam, PlayStation and Xbox games in one place

AI 導讀

Playroom 是一款自架網頁應用程式,可在同一頁面整合 Steam、PlayStation(PS3 至 PS5 獎盃)和 Xbox 遊戲收藏,並自動同步遊戲時間、成就及獎盃。它以單一 Docker 容器運行,毋須資料庫,資料儲存在單一資料夾,亦不使用遙測;Nintendo 遊戲則須手動加入。

正文

I play on PC, PS5 and Xbox, plus a Switch that sits next to the TV. Every platform has its own library, its own stats and its own idea of what "played" means. I wanted one page where I could see everything: what I own, what I actually played, and the pile of games I keep buying and never start.

The existing tools didn't fit what I wanted. Some are desktop-only, some are hosted services where my data lives on someone else's server. I run a small homelab anyway, so I built Playroom, a self-hosted web app for your whole game collection.

Playroom home page

Live demo (fake collection, read-only): https://hexguardsec.github.io/playroom-selfhosted/
Source: https://github.com/HexGuardSec/playroom-selfhosted

What it does

  • Syncs Steam, PlayStation (PS3 to PS5 trophies) and Xbox automatically. Nintendo games are added by hand, since there is no public API.
  • Covers, playtime, achievements and trophies, ratings and notes for every game.
  • An activity calendar built from each sync, so you can see when you actually played.
  • A backlog view with estimated time to beat, to face the pile of shame.
  • Public or private collection, 15 interface languages.

Things that were harder than expected

PlayStation has no public API. Playroom uses the same endpoints as the official PlayStation website, with an NPSSO token you get from your own account. It works, but it can break if Sony changes something, and the docs say so clearly.

Xbox history is noisy. On Windows, the Xbox app records PC games launched through Game Bar, even games that have nothing to do with Xbox. My first sync showed almost 200 "Xbox" games. Playroom now keeps a title only if it ran on a console or has Xbox achievements, and my list went down to the 95 games I really played.

PS4 and PS5 versions of the same game show up as two trophy lists. Playroom merges them into a single entry.

Built for people who self-host

  • One Docker container, no database to run. Data stays in a single folder you can back up.
  • No runtime dependencies: Node.js 22 and plain browser JavaScript, nothing from npm.
  • Security first: scrypt password hashing, strict Content Security Policy, CSRF protection, a non-root container with a read-only file system and no Linux capabilities. API keys never appear in logs or URLs.
  • No telemetry. Playroom never phones home.

Running it takes one command:

docker run -d --name playroom -p 8080:8080 \
  -v ./data:/app/data \
  ghcr.io/hexguardsec/playroom-selfhosted:latest

On first launch, the container logs print a one-time setup code, and the web page walks you through creating your account and adding your API keys.

A note on how it was built

I built Playroom with a lot of help from an AI assistant (Claude). I designed it, tested it on my own setup and reviewed the code, and the repository has an AI-DECLARATION.md file that explains what was AI-generated and what wasn't. I'd rather be upfront about it.

What's next

The next version (planned for mid-December) adds notifications (Discord, ntfy), JSON/CSV export, backup and restore, and an import from Playnite. The full roadmap is in ROADMAP.md.

If you try it, I'd love your feedback: issues and ideas are welcome on GitHub, and there's a Discord server for questions: https://discord.gg/xy9nYXxRvW

And if you also have a backlog that scares you a little, tell me how many unplayed games you have. Mine is not a number I'm proud of.

來源:DEV Community · dev.to