conduit-full — system architecture
In production, Express serves the built frontend directly
(express.static). In development, Vite's dev server owns port
3000 and proxies every /api request to Express on port 3001 —
the frontend never talks to Postgres, and the backend never renders
anything. See Auth & Request Flow for how a
single request actually moves through the middleware chain.
frontend/
backend/routes + controllers
verifyToken is soft-auth by default/api routebackend/models
sequelize.sync({ alter: true }) at boot
verifyToken is the one piece of middleware every route
touches, and it's deliberately permissive: no
Authorization header just means the request proceeds
anonymously, not a 401 — each controller decides for itself whether it
actually requires a logged-in user. That distinction is the source of a
real bug found while typing the frontend's
getComments service; see the
Auth & Request Flow diagram for the full
trace.