7 months ago
47739c6Implement server.mjs as the unified backend: serves Vite in dev via createServer middleware, handles production static files, and provides the full GitHub OAuth flow (/auth/github, /auth/github/callback, /auth/logout, /api/me). Session state is stored in a signed cookie so no external session store is needed. The callback redirects to /#authenticated so the frontend can detect a successful login. Also exposes /api/repos (list user repos via GitHub API), /api/parse (clone + parse a repo into a graph), and /api/detect-src (auto-detect source directory). This is the minimal backend needed to support authenticated repo visualization.
Parent925f955