PEAKK PPS

CONNECT THE REAL THING

Setup & environment variables

What you need to configure, what works now, and what this hosting environment cannot run on its own.

Important: deployment is not complete

GenMB Functions run when invoked by the website; they do not keep a Discord Gateway WebSocket open after the page closes, nor provide an incoming event endpoint or a protected relational PPS database here. Discord member joins, message and voice events therefore cannot execute automations yet. Connecting a bot by REST is real, but is not an event listener.

Functions / Secrets

Five values to enter as backend-only secrets

DISCORD_CLIENT_ID

Application ID from Discord Developer Portal → General Information.

DISCORD_CLIENT_SECRET

OAuth2 client secret from Developer Portal → OAuth2. Never place in browser code.

DISCORD_REDIRECT_URI

Exact public app URL (including / and before the # hash). Add the identical URL under OAuth2 Redirects.

DISCORD_BOT_TOKEN

Bot token from Developer Portal → Bot. Keep as a backend secret.

DISCORD_SESSION_SECRET

A random, high-entropy secret (32+ characters) generated by you for encrypting short-lived login sessions.

Also allow discord.com in Functions → Outbound Domains. Discord avatar and icon images load from Discord’s CDN in the browser.

Discord Developer Portal

  1. Create an application and a bot.
  2. Add your exact redirect URI in OAuth2 → Redirects.
  3. Enable Server Members Intent and Message Content Intent under Bot → Privileged Gateway Intents for future event processing.
  4. Grant the bot the requested permissions during installation; grant Manage Server if reading invites.
  5. Authorize with a Discord account that has Manage Server permission in The Peak Community.
Open Discord Developer Portal

Security model

OAuth code exchange and bot requests happen in a server function. The browser keeps an encrypted, short-lived session token in memory only; reloading signs you out. JavaScript on this page can still access the token during the session. HttpOnly cookie sessions require a dedicated backend. The function checks Manage Server permission before reading guild data. Drafts saved in built-in key-value storage are publicly readable/writable and must never contain credentials, member balances or private information.

Architecture & milestone status

FRONTEND

Responsive block composer, Discord login, live guild and member directory.

BACKEND

OAuth and authenticated bot REST reads are implemented. Persistent Gateway listening and event execution are not available on this hosting surface.

DATABASE

Built-in public key-value store saves non-sensitive drafts only. A protected database is needed for PPS, ranks, transactions, automations and logs.

To reach the requested join → +20 PPS milestone, deploy a separate always-on Discord Gateway bot worker plus a secure server-side database, then implement event dispatch, atomic PPS transactions and authenticated automation management. This app does not claim that milestone is live.
PEAKK PPS BUILDER · The Peak Community · Discord connection is verified live; drafts are not deployed automations.
⚡Remix on GenMB