Skip to content

Black Friday

Annual Pro is $90 for the first year, normally $120. Or start monthly at $6 for two months, then $12.

Ends Dec 4, 11:59 PM PT.

Create an account
← Public packages

@noah/mega-radio

MEGA Radio (the WAKE album) for members of the MEGA.dev Discord: sign in with Kody, verify with Discord, listen with repeat.

FollowForkOpen app

Files

config.ts

42 lines · 2.1 KB · TypeScript
/**
 * Fixed settings for the MEGA Radio app. Nothing here is secret: a Discord client ID is public, and the
 * app uses Discord's PKCE "Public Client" flow, so there is no client secret anywhere in this package.
 */

/** MEGA.dev Discord server (invite https://discord.gg/megadev, vanity `megadev`). */
export const GUILD_ID = '831056664123670539'
export const GUILD_NAME = 'MEGA.dev'
export const GUILD_INVITE = 'https://discord.gg/megadev'

/**
 * Client ID of Noah's Discord application (Developer Portal > OAuth2 > Client ID), with "Public Client"
 * turned on. Discord application "Mega.dev". If emptied, the Discord button explains that setup is pending.
 */
export const DISCORD_CLIENT_ID = '1565030809998458920'

/** `guilds.members.read` lets the app ask Discord about this one server only (`/users/@me/guilds/{id}/member`). */
export const DISCORD_SCOPES = 'identify guilds.members.read'

/** How long a verified membership counts before the visitor must re-check with Discord. */
export const MEMBERSHIP_DAYS = 30
export const MEMBERSHIP_TTL_MS = MEMBERSHIP_DAYS * 24 * 60 * 60 * 1000

/**
 * Kody referral share link. Any kody.codes request
 * with ?ref= sets a one-week `kody_ref` cookie and signup persists the referral from it. The platform
 * /-/auth/login route drops extra query params, so the Sign in with Kody redirect cannot carry ref itself.
 */
export const KODY_REFERRAL = 'noah'
export const SIGNUP_URL = `https://kody.codes/signup?ref=${KODY_REFERRAL}`

/** Noah's Kody user id; only this account may run the ./audio-store export. */
export const OWNER_KODY_ID = '8b6a3189642aeb7599fdcc0780e0058ee7644e4cc3eaef1b86139eb99dddf6f0'

/** URL leaf of the hosted app (the `app=` value for the platform /-/auth routes). */
export const APP_LEAF = 'mega-radio'
/**
 * Fallback public address, used only where packageContext.hostedUrl is unavailable (the ./status and
 * default exports). The app moved to its own origin; the old https://noah.kody.run/mega-radio/ address
 * redirects here from December 17, 2026. Inside the app, links always come from packageContext.hostedUrl.
 */
export const HOSTED_URL = `https://${APP_LEAF}--noah.kody.run`