The social layer for multiplayer games
One API for groups, roles, friends, moderation and a live stream of every change. SDKs for TypeScript, React, Java, Roblox, C++ and Unreal Engine.
const guild = await junjo.groups.create({
kind: "guild",
name: "Crimson Dawn",
});
await junjo.groups.inviteByUserId(guild.id, "nova");
const ok = await junjo.can("nova", guild.id, "invite");Crimson Dawn
guild, 4 of 25- ariaLeader
- brambleOfficer
- kestrelMember
- nova joined by inviteMember
nova can invite: yes, from Member
Built for live games
Game servers, your website and your bots read and write the same groups, and every one of them sees every change, on any platform an SDK covers.
const guild = await junjo.groups.get(guildId);
// hand over the lead in one step,
// only if nobody changed the guild since
await junjo.groups.batch(guildId, [
{ op: "member.role.add", userId: "nova", roleId: lead },
{ op: "member.role.remove", userId: "aria", roleId: lead },
{ op: "member.role.add", userId: "aria", roleId: officer },
], { ifMatch: guild?.version });- One stream for the whole game
- Every change in order, with a position to resume from. Your servers, your website and your bots see the same thing.
- Safe when several places write
- Every group has a version. A write can require the version it read, and a batch applies several changes together or not at all.
- Knows its own writes
- Each event says which key and which writer made it, so a server that keeps a local copy skips its own echoes.
- Permissions with context
- Grant a permission in one map or mode and deny it in another on the same role. Contexts inherit, nearest first.
The whole surface
The same names in the HTTP API, every SDK and the React hooks.
- groups
- Guilds, clans, parties and sub-groups, with per-kind limits and batches.
- roles
- Roles with grants, denies, inheritance and entries scoped by context.
- members
- Rosters, joins, kicks, promotions and bulk import.
- permissions
- One check or a hundred, answered by the deciding rule.
- bans
- Game and group bans with full history.
- sanctions
- Mutes and any other timed restriction your game defines.
- identities
- Linked accounts across platforms, and display names.
- friends
- Requests, tags, suggestions and blocks.
- invitations
- Direct invites and links, with expiry.
- events
- One ordered stream of every change, resumable, saying who made it.
Keeps your auth
Junjo never touches your login. It takes the user id your auth already issues and links ids across platforms when a player connects a second account. Clerk, Supabase and plain JWT adapters are built in.
const junjo = new Junjo({
apiKey: process.env.JUNJO_API_KEY,
authAdapter: clerkAdapter(clerk),
});Run it yourself
Source-available (ELv2) and free to run for your own game: one Docker image and one Postgres, the same API as hosted.
Self-hosting guideOr let me host it
Dashboard and database included, free during the beta. Email me and I will set up your game.
Request access