Skip to content

Dashboard setup

Generate the encryption key:

Terminal window
popii secret generate web

Store it as POPII_WEB_ENCRYPTION_KEY. Configure the exact callback URL in Discord’s developer portal, then add the plugin:

import { webPlugin } from "popii-framework";
webPlugin({
publicUrl: "https://bot.example.com",
oauth: {
clientId: process.env.DISCORD_CLIENT_ID!,
clientSecret: process.env.DISCORD_CLIENT_SECRET!,
},
branding: {
name: "My Bot",
description: "Your community, mixed just right.",
accentColor: "#ff66a3",
},
});

The callback defaults to /auth/discord/callback. Production publicUrl values must use HTTPS. Run popii web check before deployment.

OAuth tokens are encrypted in SQLite. Session cookies contain opaque random tokens whose hashes are stored server-side.

After signing in, ordinary members receive a personal hub. Manage Server and Administrator permissions unlock the selected server’s /admin workspace. Configured Popii owners receive a separate /operator workspace.