NomberFax31 downloadsBrowse a game catalog, keep a player profile with friends, achievements, badges and leaderboards, and sync results from game plugins that opt in. Requires an online account.
ObsiGama — a game hub for Obsidian

ObsiGama is an independent community project and is not affiliated with or endorsed by Obsidian (Dynalist Inc.).
The in-app brand is ObsiGama. In the Obsidian community directory the plugin is listed as GAMA Hub, because directory rules do not allow names that start with “Ob” or contain “Obsi”. The plugin id is obsigama and does not change.
The in-app name lives in
PLATFORM_NAME(src/brand.ts).manifest.json→nameis the directory listing (“GAMA Hub”). Game plugins find the hub by the plugin id, so that id should not change after the first release.
ObsiGama is "Steam inside Obsidian": an online hub with your account, profile, game catalog, library, friends,
achievements, badges and leaderboards. Games are separate Obsidian plugins (on GitHub) that stay fully
playable offline. A game that opts in (its own Connect to ObsiGama toggle, off by default) uses the small
@obsigama/sdk to send each finished run to your ObsiGama account.
game plugin (offline) ObsiGama plugin (online hub) Supabase (free tier)
┌──────────────────────┐ SDK ┌──────────────────────────┐ HTTPS ┌──────────────────────────┐
│ local stats / bests / │────▶│ account + session │──────▶│ Auth, Postgres + RLS, │
│ achievements, queue │ in- │ consent per game │ RPC │ ingest_batch() validation │
│ "Connect to ObsiGama" │◀────│ catalog/library/friends │◀──────│ badges, activity, Storage │
└──────────────────────┘proc └──────────────────────────┘ └──────────────────────────┘
No server setup is needed: the plugin uses the official ObsiGama server.
| Path | What |
|---|---|
src/ |
The ObsiGama plugin (TypeScript, esbuild, plain DOM UI) |
src/views/hub-view.ts |
Hub: Catalog, Library, Friends, Profile, game page + reviews, notifications |
src/backend.ts |
Supabase client, auth, reads/writes, avatar upload |
src/platform-api.ts |
In-process API that game plugins call through the SDK, consent dialog |
src/image/ |
Any image → small WebP (resize, center-crop, quality search) |
packages/sdk/ |
Dependency-free SDK for game plugins (offline-first state, queue, sync, settings toggle) |
examples/mini-old-games, examples/hellvault |
Ready integration code + manifests for the two existing games (Mini Old Games, HELLVAULT) |
supabase/migrations/ |
Database schema, RLS, RPCs, triggers, storage buckets, seed (badges + 2 games) |
supabase/tests/ |
SQL smoke tests (run on plain Postgres with a Supabase stub) |
scripts/approve-game.mjs |
Maintainer: validates a game submission issue → icon WebP + SQL (never runs SQL) |
scripts/manifest-to-sql.mjs |
Registers a game: manifest JSON → SQL |
.github/ISSUE_TEMPLATE/add-game.yml |
"Add a game" submission form |
INTEGRATION.md |
How to connect any game plugin |
docs/ARCHITECTURE.md |
Design notes and decisions |
As required by Obsidian's developer policies:
https://eravzmmusvdtsqsxplij.supabase.co), over HTTPS. The plugin ships its
public publishable key; access is limited by Row Level Security. No other servers are contacted.data.json. Game plugins never see it or any key.ObsiGama works out of the box with the official server. To run a private copy of the backend instead:
s-hub), a strong database password, and a region close to your players.supabase/migrations/20261111100000_init_schema.sql, Run. Then do the same with
supabase/migrations/20261111100100_seed_badges_and_games.sql.npm i -g supabase # or: brew install supabase/tap/supabase
supabase login
supabase link --project-ref <your-project-ref> # the ref is in the project URL
supabase db push # applies everything in supabase/migrations/
{{ .Token }}
(the 6-digit code) instead of / in addition to the link.sb_publishable_…)
or legacy anon key. Never use a secret / service_role key in the plugin.Free tier fit: fewer than 1,000 players use a tiny share of the free limits (50k monthly users, 500 MB database, 1 GB storage, 5 GB egress). Avatars are ~10–50 KB WebP files. A free project pauses after 7 days without any requests; open the dashboard to resume it.
src/image/.avatars and game-icons buckets accept only image/webp, with hard size limits
(512 KB / 256 KB). Users can only write avatars/<their user id>/….Badges are rows in public.badges; the server awards them, never the client:
rule_type = which per-user counter it watches: on_register, count_runs, count_games,
count_achievements, count_friends; threshold = {"gte": N}.profiles are updated incrementally by triggers (new run, game added to library, achievement unlocked,
friendship accepted). After a counter changes, only active badges of that rule type that the user does not own
yet are checked (award_badges()); owned badges are never re-checked. Each award is unique per user
(ON CONFLICT DO NOTHING) and writes an activity entry. Newly awarded badges come back in the sync response so the
game or ObsiGama can show a toast; profiles read badges in the same get_profile() call.insert into public.badges (id, name, description, sort_order, rule_type, threshold)
values ('hundred_runs', '100 runs', 'Finished 100 runs', 35, 'count_runs', '{"gte": 100}');
Upload its icon as WebP to game-icons/badges/hundred_runs.webp and set icon_url. A new kind of rule needs one
counter + one when branch in award_badges().npm install
npm run build # typecheck (plugin, SDK, examples) + esbuild -> main.js
npm run lint # eslint with Obsidian's official rules (eslint-plugin-obsidianmd)
npm test # unit tests (SDK state/queue/client, image math, game submissions)
./scripts/test-sql.sh # SQL smoke tests; needs a local Postgres 15+ (PGHOST/PGPORT/PGUSER)
To try it, copy main.js, manifest.json, styles.css into <vault>/.obsidian/plugins/obsigama/ and enable it.
Releases: bump version in manifest.json, package.json and versions.json, commit, then push a tag that equals the
version exactly (no v): git tag 1.0.1 && git push origin 1.0.1. The Release workflow builds, lints, tests and
attaches main.js, manifest.json and styles.css to the GitHub release.
game_keys; for now games are submitted by issue and approved by hand); game icons upload tool; pruning old scores/ingest_log with pg_cron.Any Obsidian game plugin can join the catalog. Every game is reviewed by hand by the maintainer (code read-through and a play test in a clean vault) before it is listed, and a game can be rejected or delisted later.
obsigama-manifest.json, the
"Connect to ObsiGama" toggle in your settings, one endRun per finished run.obsigama-manifest.json and a square icon (PNG/JPG/WebP; converted to WebP 128×128).manifestVersion and open a new issue (or comment on the old one).Acceptance rules (all required):
scripts/approve-game.mjs never touches the database: it validates and prints SQL that you run yourself.
node scripts/approve-game.mjs 12 --check # validate issue #12, check the repo is public, print the review checklist
node scripts/approve-game.mjs 12 --write # after manual QA: icon -> supabase/approved/<game-id>.webp,
# SQL -> supabase/approved/<game-id>.sql
node scripts/approve-game.mjs 12 --write --supabase-url https://<ref>.supabase.co # also puts the icon URL into the SQL
node scripts/approve-game.mjs --manifest path/to/obsigama-manifest.json \
--repo-url https://github.com/owner/repo --description "Short pitch" [--icon icon.png] [--check|--write]
Then: SQL Editor → run the SQL; Storage → game-icons → upload the WebP as games/<game-id>.webp; close the issue.
Use --draft to register a game without listing it. It needs gh (logged in) and npm install (for sharp).
scripts/manifest-to-sql.mjs is the bare manifest → SQL tool (also validates) for your own games.
src/, supabase/): GNU AGPL-3.0.packages/sdk/) and integration examples (examples/): MIT, so any game plugin can bundle them freely.Made by NOMBER · Support the project 💜