chore: move the admin dashboard to the private superset-sh/admin repo

Merged
KI
1mo ago
+21-26238

Summary

The admin dashboard shows revenue, burn, cash and ARR. This moves it, and the server code only it used, out of this public repo into the private superset-sh/admin repo.

  • Already live: admin.superset.sh is served by the new Vercel project superset-admin. Every URL needs a Vercel team login (Vercel Authentication on all deployments), and the app also checks for an @superset.sh session.
  • Own API: the new app serves its own tRPC, so nothing calls business.*, growth.* or analytics.getInsightResults any more. Desktop, mobile and CLI never called them.

What this PR removes

  • apps/admin
  • The business and growth routers, analytics.getInsightResults, and their clients: PostHog insights and HogQL, Mercury, Stripe Sigma, Search Console, Discord and GitHub stats, the metric cache.
  • The API's /api/analytics/jobs/refresh-mrr job. The new repo runs it as an hourly Vercel cron.
  • The deploy-admin jobs in production and preview, the admin row in the preview comment, and the Mercury and Search Console env the API no longer reads.
  • apps/admin from Lingui extraction. The catalogs lose only admin strings: 9,724 lines deleted, nothing added, no missing translations.

Hiring

#8367, #8368 and #8369 landed the hiring pipeline while this was open. Its UI, its router (hiring.*), the Notion import script and bun hiring move to superset-sh/admin too (superset-sh/admin#3). bun hiring now calls admin.superset.sh with an API key. The verified-email rule (hasAdminAccess) stays here in adminProcedure. The hiring_* tables stay in packages/db.

What stays

  • star-history, used by marketing's starchart (moved to lib/star-history.ts).
  • fetchWithTimeout, used by account purge (lib/fetch-with-timeout.ts).
  • admin.deleteUser and admin.setMyPassword.
  • NEXT_PUBLIC_ADMIN_URL, because auth still trusts the admin origin.

After merge

  • Delete the QStash schedule for /api/analytics/jobs/refresh-mrr.
  • Delete the old admin Vercel project and the VERCEL_ADMIN_PROJECT_ID and NEXT_PUBLIC_SENTRY_DSN_ADMIN secrets.

Checks

  • Lint, sherif and check:i18n pass.
  • Tests pass: trpc 557, i18n 164, api 236.
  • Locally, typecheck of trpc, api and marketing shows the same better-auth plugin type errors in untouched auth and organization files that this machine's install produces on main. CI typecheck on main passes, so CI on this PR is the real check.

Removing these files from main does not remove them from git history.


Summary by cubic

Moves the admin dashboard and the server code only it used out of this public repo into the private superset-sh/admin repo. admin.superset.sh is already live from the new Vercel project superset-admin, which serves its own tRPC, so nothing here calls business.*, growth.*, or analytics.getInsightResults any more.

Removed

  • apps/admin, the business, growth, and hiring routers, analytics.getInsightResults, their PostHog, Mercury, Stripe Sigma, Search Console, Discord and GitHub clients, and the metric cache.
  • The bun hiring script, its args helper, and the web-url check, which now call admin.superset.sh with an API key.
  • The /api/analytics/jobs/refresh-mrr job, now an hourly Vercel cron in the new repo.
  • The deploy-admin jobs, the admin preview-comment row, and the Mercury and Search Console env vars.
  • Admin and hiring strings from Lingui extraction; the catalogs lost only those strings, with no missing translations.

Kept: star-history for marketing's starchart, fetchWithTimeout for account purge, admin.deleteUser and admin.setMyPassword, the verified-email rule in adminProcedure, and NEXT_PUBLIC_ADMIN_URL.

After merge

  • Delete the QStash schedule for /api/analytics/jobs/refresh-mrr, the old admin Vercel project, and the VERCEL_ADMIN_PROJECT_ID and NEXT_PUBLIC_SENTRY_DSN_ADMIN secrets.

Summary by CodeRabbit

  • Removals
    • The Admin app is no longer available, including its dashboards, growth and business reports, and hiring tools.
    • Admin-specific preview and production deployments have been removed; other preview services and the marketing deployment remain.
    • Related analytics and hiring capabilities are no longer available through the API.
    • Google Search Console settings and several finance and analytics credentials have been removed from environment templates and deployment settings.
    • Translations associated with removed Admin features have also been removed.