refactor(server): strip Express to Supabase-ready shell#8
Merged
cH0NKIIs34L merged 2 commits intomainfrom Apr 13, 2026
Merged
Conversation
All auth, user, admin, and search logic previously handled by Express is now managed directly by Supabase on the client side. The server no longer owns any database access or auth concerns, so keeping those routes and controllers creates dead code and leaves unused dependencies in the bundle. This removes all route handlers, controllers, validators, Passport config, cookie utilities, and the Prisma/pg database layer, leaving a minimal Express app that serves a single GET /api/health endpoint.
Prisma config, migrations, schema, and the generated client output are no longer relevant now that Supabase owns the database. The CI pipeline still referenced a PostgreSQL service container and DATABASE_URL that no longer exist. The setup guide still walked through PostgreSQL local installation which is no longer the setup path for this project.
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
Remove all Express auth, CRUD, and database layers now superseded by
Supabase, leaving the server as a minimal shell with a health endpoint.
What Changed
app.js— removed Passport init, EJS view engine, static assetsindex.routes.js— replaced all route mounts with GET /api/healthapp.middleware.js— removed Passport, cookie-parser, static, EJSerror.middleware.js— removed clearAuthCookie dependency (auth is Supabase now)server/package.json— removed all Prisma scripts and dead dependencies.github/workflows/ci.yml— removed PostgreSQL service container, DATABASE_URL, and Prisma stepsWhat
This PR reduces the Express server to a minimal shell — CORS, body
parsing, error handling, and a single health check endpoint — with all
auth and CRUD concerns now owned by Supabase on the client side.
Why
The server previously owned auth (Passport/JWT), all database access
(Prisma/pg), and cookie management. With those concerns migrated to
Supabase in Epics 2 and 3, the remaining server code is dead weight
that would break on startup due to missing environment variables and
uninstalled packages.
How
nothing in the client imports from server routes or controllers
error.middleware.jsno longer callsclearAuthCookiesince thereis no cookie-based auth session to clear
app.middleware.jsretains only CORS and body parsing — the minimumneeded for a JSON API server
test-serverjob no longer provisions a PostgreSQLservice container or sets
DATABASE_URL/JWT_SECRET, since theserver has no database connection
server/package.jsonretains onlyexpress,cors,dotenv,@supabase/supabase-js, and the dev toolchain — all Prisma, Passport,bcrypt, JWT, pg, and express-validator packages removed
app.middleware.test.jsanderror.middleware.test.js) are updated to remove mocks for deleteddependencies so they pass cleanly
Testing
GET /api/healthreturns{ status: "ok" }with a 200npm testpasses inserver/with only middleware tests remainingnpm installruns clean after package.json cleanupPre-Merge Checklist
mainbefore opening this PRnpm testin bothclient/andserver/)console.logleft in production codenpm run lint)