
Gami.Fied 发布开源自托管游戏化引擎,采用 AGPL-3.0 许可
来源标题:Show HN: Gami.Fied – Open-source, self-hosted gamification engine (AGPL-3.0)
Gami.Fied 是一个开源、自托管的游戏化引擎,可将应用内用户行为转化为 XP、连续签到、徽章、排行榜、联赛和奖励,数据始终留在自有服务器上。免费开源版提供 26 项功能、70 个有文档的 API 操作和 8 个现成 React 组件,通过事件上报和规则配置即可实时发放奖励。
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Turn what people do in your app into XP, streaks, badges, leaderboards, leagues and rewards. Open source, self-hosted, and your data never leaves your servers.
Gami.FiedengineRulesStreaksLimits+50 XP · Level 7★Badge unlockedSeven-day streakWeekly leaderboard#5 → #3Events go in. Rules, streaks and limits decide. Rewards come out, on servers you run.
Pause animation
features in the free, open-source edition26
API operations, each one documented70
ready-made React components8
How it works
Send events from anywhere. Gami.Fied decides what they are worth, and your players see it straight away.
Your server, or the SDK in your app, tells Gami.Fied what someone did. A retry with the same idempotency key never counts twice.
await gami.events.track({ userId: 'user_123', type: 'lesson_completed', });
Step 2A rule matches
Rules you set up in the dashboard decide what it is worth. Change them any time, test them on past events, and roll back if needed.
{ "trigger": "lesson_completed", "actions": [{ "type": "award_xp", "params": { "amount": 50 } }] }
Step 3The player is rewarded
XP lands in their ledger, their streak grows, badges unlock and the leaderboard moves, live in your app through the SDK or React components.
<LevelProgress /> <StreakCalendar /> <ToastHost />
9:41Lingo Leap
lesson_completedsent by your server
Lesson rewardRule matched · +50 XP
Level 71,250 XP
★Seven-day streakBadge unlocked · 12 days
See it
Rules, badges, streaks, leaderboards, leagues and the store, recorded from the live demo. No sound, with captions.
Progression, a points economy, competition, community, integrations and the controls to run it, all in the free, open-source edition.
Progression
XP, levels, streaks, achievements and challenges.
Economy
Currencies, wallets and a reward store.
Competition
Leaderboards, segments, teams and leagues.
Community
Friends, kudos, a feed and invites.
Integrations
SDK, React, webhooks, connectors and plugins.
Administration
Run it like the rest of your stack.
Typed SDK, plain HTTP, or drop-in React components. Pick what fits.
import { Gami } from '@gami.fied/sdk';
const gami = new Gami({ baseUrl: process.env.GAMI_API_URL, apiKey: process.env.GAMI_API_KEY });
// Rules, streaks and achievements run in the background. await gami.events.track({ userId: 'user_123', type: 'lesson_completed', properties: { course: 'spanish-101' }, });
curl -X POST https://gami.example.com/v1/events
-H "x-api-key: $GAMI_API_KEY"
-H "Content-Type: application/json"
-d '{ "event": "lesson_completed", "user_id": "user_123" }'
import { GamiProvider, LevelProgress, StreakCalendar, ToastHost } from '@gami.fied/react'; import '@gami.fied/react/styles.css';
export function Rewards({ token }: { token: string }) { return ( <GamiProvider endUserToken={token} baseUrl="https://gami.example.com"> <LevelProgress /> <StreakCalendar /> <ToastHost position="bottom-right" /> </GamiProvider> ); }
Typed end to end
The SDK covers every public route, with retries and clear errors.
Short-lived player tokens read only that player's own data.
Toasts and leaderboards update the moment rewards land.
An OpenAPI document, tested against the real responses.
Your data stays yours
Player data, events and rewards live in your own PostgreSQL. Nothing is sent anywhere else.
No bill per user
Run it for ten players or ten million. The engine is open source and free, with no per-user pricing.
Docker Compose brings up the API, worker, dashboard, PostgreSQL and Redis, with health checks and migrations.
Comparing options? See how Gami.Fied compares, including where it is weaker.
Download the release files, fill in your secrets, and start it. Upgrades are one setting.
curl -LO https://github.com/gami-fied/gami.fied/releases/latest/download/docker-compose.yml curl -LO https://github.com/gami-fied/gami.fied/releases/latest/download/env.example cp env.example .env # then fill in the secrets docker compose up -d
The dashboard opens at http://localhost:3000. Images are published for amd64 and arm64.
Free and open source. Install it today, or star the project to follow along.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。