Skip to content

chore(legacy-split): move the self-hosted stack off dev and split surfsense_web into website - #2341

Merged
AnishSarkar22 merged 25 commits into
MODSetter:devfrom
AnishSarkar22:feat/legacy-split
Oct 24, 2026
Merged

AnishSarkar22 merged 25 commits into
MODSetter:devfrom
AnishSarkar22:feat/legacy-split

Conversation

@AnishSarkar22

@AnishSarkar22 AnishSarkar22 commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

What

Steps 3 and 4 of the legacy split: dev stops carrying the self-hosted stack, and surfsense_web becomes website/, the marketing site and nothing else.

The self-hosted stack leaves dev. It lives on the legacy branch, released as legacy-v0.0.41 (#2339).

  • Deleted: surfsense_backend/, surfsense_mcp/, docker/ except docker/keygen/ (production's Keygen CE images), the root VERSION and scripts/bump-version.{sh,ps1}.
  • Repointed at legacy: hooks, CODEOWNERS, .gitignore, launch.json, AGENTS.md, CONTRIBUTING.md, SECURITY.md, the fastapi skill link and every doc link into the deleted trees.
  • The install URLs are kept for the new stack. docker/scripts/install.sh and install.ps1 leave with the rest, with no stubs forwarding to legacy. The same paths on main will later serve the installer for the new Docker image, so …/main/docker/scripts/install.sh installs the new stack, not the legacy one. Until then that URL answers 404 once this reaches main. Legacy installs use …/legacy/docker/scripts/install.sh, which the legacy README and docs already give.

surfsense_web is now website/. 454 files move unchanged and 1,141 hosted-app files go.

  • Removed: the dashboard, auth, chat, Zero, the API proxies, the e2e suite, the Dockerfile and about 100 app-only dependencies.
  • /sunset is gone. The homepage pill points to the SurfSense 2.0 announcement.
  • Light by default through fumadocs' theme, so the docs and the 404 page are light. The marketing pages keep their own palette.
  • The global banner sits at the top of every page, with an info or warning tone.
  • One font (Instrument Sans), one button (HomeButton) and one icon set (Hugeicons) across the site. ESLint, lucide, Tabler, sonner and the unused app packages are dropped, and Biome is the only linter.
  • The legacy docs are titled SurfSense Legacy and name 0.0.41 as the final release. Their install commands fetch from legacy.
  • New website.yml lints, tests and builds pull requests that touch website/.

PostHog sends the same events and properties as before. That covers platform: "web", ref_code, the referral landing event, funnel events and exception reports. Only events for pages that no longer exist are gone.

Why

The hosted service closed on 18 Oct 2026 and its data was purged. What still ships is the desktop app, backend/ and the marketing site. Keeping the legacy stack on its own branch leaves dev and main with only that.

Fixes # (none; follows the legacy-split proposal)

How to test

  • cd website && pnpm install && pnpm lint && pnpm test:unit && pnpm build. The build renders 106 pages. tsc --noEmit reports 3 errors, all present before this change.
  • cd website && pnpm dev, then open /, /docs, /pricing, /downloads, a missing page for the 404, and /announcements.
  • python scripts/check_docs.py reports 0 problems.

Before this reaches main:

  • Cutover. api.surfsense.com still runs from surfsense_backend, which this deletes. Move it to backend/ first (Cutover), or pin Coolify's hosted service to a commit before this one.
  • Vercel. Change the root directory from surfsense_web to website when this reaches the branch Vercel deploys from.
  • Desktop release. The desktop's cloud-import link still points to /sunset. Remove it in a desktop release before the website ships without /sunset.

…legacy Docker on dev

- Remove sunset entirely: /health stays plain ok, /sunset does not move,
  the legacy-update-bridge job and the sunset docs go, and the cutover no
  longer waits on a sunset /health.
- Rename the marketing app's folder from homepage/ to website/.
- Record 0.0.41 as the legacy branch's final release.
- Delete the install and migrate scripts from dev and main rather than
  keeping stubs; they live on legacy only.
The self-hosted stack lives on the legacy branch, released as
legacy-v0.0.41. Delete surfsense_backend/, surfsense_mcp/, docker/
except keygen/ (production's Keygen CE images), the root VERSION and
scripts/bump-version.{sh,ps1}. surfsense_web/ stays until the website
split.
…-hosted stack

- Drop the surfsense_backend ruff and bandit hooks, its proprietary
  path from code-quality.yml, and the legacy CODEOWNERS, .gitignore and
  launch.json entries.
- Repoint the fastapi skill link at surfsense_local/backend/.venv.
- AGENTS.md, CONTRIBUTING.md and SECURITY.md name the legacy branch for
  the self-hosted stack; drop the legacy commands, tests and boundaries.
- Start the SMTP contract test's Mailpit with docker run.
- Repoint dead doc links at the legacy branch, or at a permalink where
  legacy removed the file too.
- The legacy-split proposal records the branch as cut and the deletion
  as its own pull request before the website split.
surfsense_web now only serves www.surfsense.com, so it becomes website/.
The hosted app moves to the legacy branch with the rest of the
self-hosted stack: delete its routes (dashboard, auth, invite, public
chat, desktop login, login, register, sunset), the v1 and Zero API
proxies, the code only those routes import, the e2e suite, the
Dockerfile and the app-only assets. Every remaining file moves
unchanged; the edits that make the site build on its own follow.
… website/

- Root layout: only PostHog, fumadocs' RootProvider and the toaster.
  Light by default through fumadocs' theme, so the docs and the 404 page
  are light; the marketing pages keep their own palette.
- Drop the app's dependencies, i18n, the e2e scripts, the sunset links
  and the sitemap's login and register; the homepage pill points to the
  SurfSense 2.0 announcement.
- Trim .env.example, window.d.ts and env-config.ts to what the site
  reads; version 2.0.0; Biome 2.5.15 with the recommended preset.
- website.yml lints, tests and builds pull requests touching website/.
- Repoint the hooks, CODEOWNERS, launch.json, the desktop bump script,
  RELEASE.md, the README banners, AGENTS.md, CONTRIBUTING.md, SECURITY.md,
  the frontend-workflow skill and the doc links at website/.
- The legacy docs are titled SurfSense Legacy, described as the
  self-hosted Docker stack whose final release is 0.0.41, and open with a
  note that its code is on the legacy branch, which takes fixes only.
- The SurfSense 2.0 docs page names 0.0.41 and links to SurfSense Legacy.
- The Docker install and update commands fetch from the legacy branch,
  since main no longer carries docker/scripts/.
… info or warning tone

The banner was fixed to the bottom of the marketing pages only. It now
renders from the root layout as a sticky strip at the top, so the docs
and the 404 page show it too. It sets --fd-banner-height, which the docs
layout already offsets its sticky header by, and the site nav now does
the same.

NEXT_PUBLIC_GLOBAL_ANNOUNCEMENT_TONE picks the colour: info (the site's
notice blue, the default) or warning (amber, for downtime).
… analytics

lib/posthog/events.ts held 44 of the hosted app's events, and the site
called one. Move trackReferralLanding to lib/posthog/referral-landing.ts
and delete events.ts with the chain only it kept alive: the chat error
classifier, connector telemetry, the connector-popup constants and the
connector contract types.
…sts and bug-report link

- env-config.ts keeps only the license portal's URL and the announcement
  switches; the hosted app's auth, ETL, deployment-mode and server-backend
  settings and detectEnvironment go.
- Delete lib/error.ts and lib/error-toast.ts: nothing throws AppError any
  more, and nothing called showErrorToast. With no toast left on the site,
  the Toaster, components/ui/sonner.tsx and the sonner dependency go too.
- The error pages keep Try again and drop Report Issue; errors still
  reach PostHog.
…very icon with Hugeicons

- globals.css keeps only what the site uses: the Tailwind and fumadocs
  imports, the animate plugin, the shadcn palette, --notice, --brand and
  the docs surface. The hosted app's tokens (chart, rail, sidebar,
  popover-border, syntax-bg, highlight), its runtime-auth, scrollbar,
  approval-pulse, chat timeline, lazy-list and PDF viewer styles, and the
  chat-ui and streamdown @source lines go.
- home.css drops its unread --chart colours and the sign-in button styles.
- Drop the unused pdfjs-dist, streamdown, three, radix-ui and
  tailwind-scrollbar-hide packages.
- Replace every lucide-react icon with a Hugeicons wrapper from
  components/ui/icons.tsx, in the components, the legacy docs cards and
  the docs sidebar map (same names in frontmatter); drop lucide-react.
…te's GitHub mark

- The nav's dropdown chevron and the banner's info and warning icons use
  Hugeicons wrappers from components/ui/icons.tsx.
- The GitHub buttons on /external-mcp-connectors and /mcp-server use
  GithubLogo, the mark the nav's star button already draws.
- Drop @tabler/icons-react and its optimizePackageImports entry.
…atter

ESLint only ran through `next lint`, which Next 16 no longer ships, while
the hook, CI and `format` already use Biome. Delete eslint.config.mjs and
eslint, @eslint/eslintrc and eslint-config-next; `lint` runs `biome lint .`
and the duplicate `format:fix` script goes.

Its one custom rule kept BACKEND_URL behind buildBackendUrl; BACKEND_URL
is no longer exported, so TypeScript enforces that instead.
…p's badge used

useAnnouncements and MarkAnnouncementsRead wrote read markers to
localStorage for the unread badge in the hosted app's sidebar. Nothing on
the site reads them, so delete the hook, the component, the storage file,
auth-utils and public-routes, and trim announcements-utils to the two
helpers the pages and sitemap use. The announcement pages render the same.
…r and icon wrappers

- home-content.ts: PINNED_RELEASE_TAG ("v0.0.40", the retired legacy app)
  and RELEASE_URL, which nothing references.
- lib/utils.ts: copyToClipboard, which nothing calls.
- icons.tsx: eleven wrappers left from the port that no page draws.
… PostHog init

The 0.0.x desktop app no longer opens the site, so the check always
answered "web". platform stays a fixed "web" on every event and person,
so what PostHog receives is unchanged; the electronAPI window type, which
nothing uses now, goes too.
…s Roboto

The 404 page sat outside the marketing and docs layouts, so it was the
only page still on Roboto, a font no other page loads, and it arrived
after the page drew. Instrument Sans now sits on <body> in the root
layout, so every page shares one @font-face; the marketing and docs
layouts drop their own copies, and the Roboto loader and --font-roboto
mapping go.
Go Home is a primary HomeButton and Browse Docs and Read Blog are
secondary, so they press, hover and focus like every other button on the
site instead of carrying hand-written link styles.
…adcn to Hugeicons

- The error pages, the global error page and the MCP setup tabs use
  HomeButton, and /free/<model> uses HomeDownloadButton, the download call
  to action the homepage uses. Delete components/ui/button.tsx and
  components/ui/flow-button.tsx.
- components.json: iconLibrary is hugeicons, and the hosted app's @plate
  registry goes.
@vercel

vercel Bot commented Oct 24, 2026

Copy link
Copy Markdown

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Walkthrough

Warning

Review details and warnings were omitted to fit the comment limit.

AnishSarkar22 and others added 7 commits October 25, 2026 01:07
…pped, and what is left

- Cutting it: MODSetter#2339 also removed sunset mode and the account export on
  legacy; MODSetter#2341 deleted the legacy code on dev and split surfsense_web
  into website.
- legacy's docker-build.yml builds on every pull request and push without
  pushing, and publishes only from a legacy-v tag.
- The website was renamed and pruned, not copied, and keeps one font, one
  button and one icon set; the "shared pieces are copied" note goes.
- Order: the desktop release that drops /sunset and the update bridge,
  then the website restructure, then the Docker steps.
…alse positive

Moving the file to website/ made detect-secrets scan it as new. The value is the ss_pat_your_key_here placeholder the /mcp-server snippets show, not a key.
…sense.com is off

The page sells the hosted MCP server the cutover switches off. It goes with components/mcp/ and lib/mcp/, and /mcp-server redirects to /plugins.
… import

The hosted service and its export page are gone, so Settings > General no longer links to surfsense.com/sunset. Uploading an export ZIP works as before. The settings_general_cloud_import_link message goes from every language; the URL allowlist test uses /downloads as its example instead.
Tags are repo-wide and the legacy stack used v0.*, so a v0.* tag no longer starts release-local.yml. Desktop tags such as v2.2.4 or v20.2.1 still do.
sunset.md, contract 4 and the sunset and purge runbooks describe a wind-down that ended on 18 Oct 2026. The indexes and the roadmap drop them; updates.md, ADR 0023 and the proposal keep their text with permalinks. The proposal also records that the legacy-update-bridge stays until 0.0.x update checks are near zero.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnishSarkar22
AnishSarkar22 merged commit 9cf3398 into MODSetter:dev Oct 24, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant