supermemory/apps/web/console-origin.ts
MaheshtheDev 5258cb74c8 chore(web): reduce the app to a redirect shell, drop the browser extension (#1651)
chore(web): reduce the app to a redirect shell, drop the browser extension

app.supermemory.ai now forwards everything to the console: plugin, OAuth and invite paths get an immediate 308 with the query intact, everything else shows a short notice first. Removes the browser extension workspace.

chore(web): give the moved notice a proper design

Hostnames become the headline, one primary action, a draining line for the countdown, DM Sans and the dot-grid backdrop from the brand.

chore(docs): point docs and README at the console, drop stale sections

Docs and both READMEs now link to console.supermemory.ai for API keys. Removed the company-brain docs tab with a redirect, and trimmed the README app section.

chore(web): give the redirect five seconds
2026-09-07 19:56:46 +00:00

12 lines
483 B
TypeScript

// Portless hosts carry the branch as a prefix, so swap the label instead of rewriting the string.
export function consoleOrigin(hostname: string, protocol = "https:"): string {
const override = process.env.NEXT_PUBLIC_CONSOLE_URL
if (override) return override.replace(/\/+$/, "")
const labels = hostname.split(".")
const i = labels.indexOf("app")
if (i !== -1) {
labels[i] = "console"
return `${protocol}//${labels.join(".")}`
}
return "https://console.supermemory.ai"
}