Prysm
Menu

API surface

Prysm's backend exposes 21 edge functions, grouped below by purpose. They exist to serve the Prysm app. This is a map for readers, not a developer API.

The functions

GroupFunctionsWhat they do
Catalogsearch, games, game-artwork, rouletteSearch the catalog, serve game detail, popular, popular-with-friends, recently viewed and watched lists, fetch artwork, and deal a roulette pick
Shareshare-resolve, share-confirmTurn a shared link into a game, then add it once you confirm
Vague searchvague-search, vague-search-sweepAccept a description of a game, and answer queued descriptions on a schedule
Platform linkingsteam-link-start, steam-link-callback, steam-link-finish, steam-import, xbox-link-start, xbox-link-callback, xbox-link-finish, xbox-import, android-importConnect a Steam or Xbox account and import owned games, or import what is installed on an Android phone
Accountaccount-deleteDelete the signed-in account and its data
Backgroundpush-sweep, game-release-sweep, revenuecat-webhookScheduled and vendor-facing work: send pending push notifications, ring release-day alerts, and receive subscription changes from RevenueCat

The background group is not called by the app. The sweeps are run by the scheduler, and the webhook is called by RevenueCat.

Not everything is a function

Reading and writing your own library, wishlist, follows, likes and posts does not go through an edge function at all. The app talks to the database directly, and row-level security decides what each signed-in user may see and change. Ranking the feed, listing notifications and computing challenge progress are database functions called the same way.

Edge functions exist where something needs a secret, a third-party API or a service role: IGDB, Steam, Xbox, the language model, push and RevenueCat.

What a game looks like

Every catalog endpoint shapes its response into one object, so the app sees a consistent game whichever route produced it.

FieldMeaning
id, title, slugIdentity. The slug is IGDB's and is stable, so share links can use it
cover, abbreviation, colorKeyCover art, and a short label and colour used when there is no art
releaseDate, releasePrecisionThe date, and whether it is a real day, month, quarter or year
genres, platformsGenre names, and the platforms the game is on
criticScoreIGDB's aggregate of critic scores
timeToBeatHours, timeToBeatCountTypical playthrough length, and how many submissions it rests on
sessionFitHigh, medium or low, used by roulette
summaryIGDB's description, untruncated

releasePrecision and timeToBeatCount are there so the app can be honest: a date is only a day when the precision says so (see Events), and a time to beat is shown with the number of submissions behind it.

Last updated