Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions modules/auth_oauth/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "Social Authentication Provider",
"description": "Authenticate users with OAuth 2.0.",
"icon": "key",
"tags": [
"core",
"user",
"auth"
],
"authors": [
"rivet-gg"
],
"status": "coming_soon",
"dependencies": {},
"errors": {}
}
61 changes: 61 additions & 0 deletions modules/discord_activity/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Discord Activities

Integrate your Rivet game with [Discord Activities](https://discord.com/developers/docs/activities/overview).

<Steps>
<Step title="Set up Discord SDK">
Set up the Discord SDK ([docs](https://discord.com/developers/docs/activities/building-an-activity#step-3-installing-the-embedded-app-sdk)):

```js
// Import the SDK
import { DiscordSDK } from "@discord/embedded-app-sdk";

// Instantiate the SDK
const discordSdk = new DiscordSDK(process.env.DISCORD_CLIENT_ID);

setupDiscordSdk().then(() => {
console.log("Discord SDK is ready");
});

async function setupDiscordSdk() {
await discordSdk.ready();
}
```
</Step>

<Step title="Update lobbies code">
Update your Rivet matchmaking code to include tags:
```js
const res = await backend.lobbies.findOrCreate({
tags: {
// Discord SDK set up in previous step
instanceId: discordSdk.instanceId,
},
// ...
});
```
</Step>

<Step title="Set up route mapping">
After following the [activity tutorial](https://discord.com/developers/docs/activities/building-an-activity), access the [URL mapping](https://discord.com/developers/docs/activities/development-guides#url-mapping) for your Discord app and configure it like so:

| Prefix | Target |
|--------|--------|
| /gstatic | fonts.gstatic.com/ |
| /ws | lobby.rivet.run/ |
| /api | api.rivet.gg/ |
| / | asteroids-xxx.rivet.game/ |

<Note>
The URL used for the "Root Mapping" will be printed in the console when you deploy to Rivet via `rivet deploy`.
</Note>
</Step>

<Step title="Run activity">
Run activity (read docs [here](https://discord.com/developers/docs/activities/building-an-activity#step-4-running-your-app-locally-in-discord))
</Step>
</Steps>

## Example repo

A fully integrated example can be found [here](https://github.com/rivet-gg/discord-embedded-app-sdk/tree/main/examples/asteroids-rivet). (This is using a slightly dated API, but is lagely identical.)
10 changes: 10 additions & 0 deletions modules/discord_activity/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Discord Activities",
"description": "Activities are a way to enjoy shared experiences with friends, such as games and media, on Discord itself. ",
"icon": "discord",
"tags": ["platform", "integration"],
"authors": ["discord", "rivet-gg"],
"status": "coming_soon",
"scripts": {},
"errors": {}
}
3 changes: 3 additions & 0 deletions modules/eos/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Epic Online Services

See [Epic Online Services](https://dev.epicgames.com/docs/en-US/api-ref) for more details.
10 changes: 10 additions & 0 deletions modules/eos/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Epic Online Services",
"description": "Epic Online Services (EOS) is a cross-platform SDK that provides essential online services such as authentication, friends, matchmaking, and more for games.",
"icon": "e",
"tags": ["platform", "integration"],
"authors": ["rivet-gg"],
"status": "coming_soon",
"scripts": {},
"errors": {}
}
3 changes: 3 additions & 0 deletions modules/idem/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Idem

See [IDEM](https://www.idem.gg/) for more details.
10 changes: 10 additions & 0 deletions modules/idem/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "IDEM",
"description": "Matchmaking for multi-player games – as an API. Be sure your game's matchmaking will be loved by players.",
"icon": "i",
"tags": ["service", "integration"],
"authors": ["idem-matchmaking"],
"status": "coming_soon",
"scripts": {},
"errors": {}
}
22 changes: 22 additions & 0 deletions modules/infisical/README.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Infisical

[Infisical](https://infisical.com/) is an easy to use tool for managing secrets. This is helpful for when dealing with API keys in development.

<Steps>
<Step title="Install Infisical">
[Documentation](https://infisical.com/docs/cli/overview)
</Step>
<Step title="Login">
```sh
infisical login
```
</Step>
<Step title="Populate environment variables">
[Documentation](https://infisical.com/docs/documentation/platform/project#secrets)
</Step>
<Step title="Run dev server with Infisical">
```sh
infisical run -- opengb dev
```
</Step>
</Steps>
10 changes: 10 additions & 0 deletions modules/infisical/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Infisical",
"description": "All-in-one platform to securely manage application configuration and secrets across your team and infrastructure.",
"icon": "infinity",
"tags": ["security", "integration"],
"authors": ["infisical", "rivet-gg"],
"status": "stable",
"scripts": {},
"errors": {}
}
Loading