chore: consolidate repo structure; delete stale apps/backend fork - #7
Merged
Merged
Conversation
apps/backend/ was a stale fork of root app/ with diverged code: - UnQuestRequest class name (pre-rebrand) vs UnSearchRequest at root - Different import paths (app.services.searxng vs app.services.core.searxng) - 2 Alembic migrations vs 5 at root - pytest.ini pointing at sqlite vs the live root postgres - Independent Dockerfile, docker-compose, requirements.txt, pyproject.toml that nothing live referenced - A 2841-line production SearXNG settings.yml that was never mounted (the live mount path searxng/settings.yml was a 40-line stub falling back to upstream defaults — a real bug) All live references (ci-cd.yml, deploy-cf.yml, Dockerfile.cloudflare, docker-compose.yml, Makefile, ecosystem.config.js, scripts/manage.sh) already targeted root app/. apps/backend/ existed only as documentation debt promised by ADR-0006 to be collapsed in a future PR. This PR collapses it. Specifically: - Salvage the production SearXNG settings.yml from apps/backend/searxng/ to searxng/settings.yml (fixes the SearXNG default-config bug). - git rm -r apps/backend/ (130+ files of stale code). - Delete .github/workflows/deploy.yml — Railway deploy is sunset by ADR-0010 in favor of CF Containers GA. The active deploy is deploy-cf.yml which targets root. - Delete scripts/verify-setup.sh — describes a Turborepo monorepo this repo never was (packages/shared, vercel.json, src/ paths) and would fail 80% of its checks today regardless. - Delete setup_webhook_quick.sh — orphaned dev artifact, no references. - Delete unused Next.js scaffold SVGs in apps/web/public/. Housekeeping: - Add pnpm-workspace.yaml declaring apps/* + workers — SDK packages reference each other via workspace:* but the workspace was never declared at root. - Add apps/sdk-ts/tests/client.test.ts — first vitest test (vitest was configured but no test files existed). - Update ADR-0006 with an amendment noting the consolidation. Original "Two backend layouts" Con line resolved. - Update docs/architecture.md, docs/configuration/env-variables.md to remove the dual-backend references. apps/backend/.env was left in working tree (gitignored, contains secrets); the user should manually compare against root .env and remove if redundant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Collapses the dual-backend layout ADR-0006 had been promising to fix.
apps/backend/was a stale fork of rootapp/with diverged code: pre-rebrandUnQuestRequestclass names, different import paths (app.services.searxngvsapp.services.core.searxng), 2 Alembic migrations vs 5 at root, and (critically) a 2,841-line production SearXNGsettings.ymlthat was never mounted — the live mount pathsearxng/settings.ymlwas a 40-line stub falling back to upstream defaults. That's a real bug this PR fixes by salvaging the production config to the live mount path before deleting the fork.All live deployment paths (
ci-cd.yml,deploy-cf.yml,Dockerfile.cloudflare,docker-compose.yml,Makefile,ecosystem.config.js,scripts/manage.sh) already targeted rootapp/.apps/backend/existed only as documentation debt promised by ADR-0006 to be collapsed in a future PR.What changed (134 files)
Phase 1 — Salvage
apps/backend/searxng/settings.yml(2,841 lines, production-tuned) →searxng/settings.yml. Replaces the 40-line stub at the live mount path.Phase 2 — Delete
git rm -r apps/backend/— 130+ files of stale code (Procfile, Dockerfile, alembic, scripts, tests, etc.)..github/workflows/deploy.yml— Railway deploy viacd apps/backendsunset by ADR-0010 (CF Containers GA). Active deploy isdeploy-cf.yml.scripts/verify-setup.sh— described a Turborepo monorepo this repo never was (packages/shared/,vercel.json,apps/web/src/...). Would have failed 80% of its own checks today.setup_webhook_quick.sh— orphaned dev artifact, no references inmanage.shor any deployment script.apps/web/public/{file,globe,next,vercel,window}.svg— unreferenced Next.js scaffold SVGs.Phase 3 — Healthy housekeeping
pnpm-workspace.yaml— SDK packages reference each other viaworkspace:*but workspace was never declared at root.apps/sdk-ts/tests/client.test.ts— first vitest test (vitest was configured but no test files existed). Smoke-tests constructor +search()header construction.Docs reconciled
docs/adr/0006-monorepo-with-apps-and-workers.md— Amendment section documenting the consolidation; resolved the "Two backend layouts" Con line.docs/architecture.md— "Backend Container —app/andapps/backend/" →app/only; removed the technical-debt row about dual backend.docs/configuration/env-variables.md—apps/backend/.env→.env.Risk
deploy-cf.ymlandci-cd.ymlboth target rootapp/already. The deleteddeploy.ymlhad not been the active path since CF Containers GA in April 2026..github/workflows/deploy.ymlwas the only workflow targetingapps/backend. Removed in this PR.apps/backend/.env(gitignored, contains secrets) is left in the working tree. Manually compare with root.envand remove if redundant.Test plan
git pull origin main && ls apps/shows nobackend/(after manual removal of the gitignored.env).wc -l searxng/settings.ymlreturns 2841.pnpm installat root succeeds with the newpnpm-workspace.yaml.cd apps/sdk-ts && pnpm testpasses the new smoke test.ci-cd.ymlquality check +deploy-cf.ymlworker + container jobs run green on this PR.docker compose up -d searxngmounts the 2,841-line config (verify viadocker logs unsearch-searxng | head— should not show "using default settings" warning).Follow-ups (not in this PR)
apps/sdk-ts/andworkers/src/lib/(e.g.VectorMatch) to apackages/sdk-types/workspace..github/workflows/sdk-ts.ymlso the new vitest test runs in CI.CONTRIBUTING.md.apps/web/public/Next.js scaffold with UnSearch branding (favicon, OG image, logo).