Monorepo: Next.js control plane (web/) + Chrome extension (extension/).
| Layer | Choice |
|---|---|
| Control plane | Next.js App Router (TypeScript), Tailwind CSS |
| Auth | NextAuth.js (GitHub OAuth) + extension device token |
| Cursor | @cursor/february TypeScript SDK for cloud agents (docs) |
| Data | Prisma + SQLite (swap DATABASE_URL for Postgres in production) |
| Secrets | Cursor API keys encrypted at rest (AES-256-GCM) |
| Extension | Chrome MV3, TypeScript, Vite |
Running the web/ Next.js control plane on a VM (or other always-on server) is recommended for serious use—not only on your laptop. You get a stable origin for GitHub OAuth callbacks and VITE_EXTENSION_API_ORIGIN, uptime that does not depend on a dev machine, and a natural place for TLS termination (for example nginx or Caddy; see contrib/nginx/ for snippets).
- Copy env:
cp web/.env.example web/.envand fill NextAuth (NEXTAUTH_SECRET,NEXTAUTH_URL), GitHub OAuth (GITHUB_ID,GITHUB_SECRET), and encryption key (Prisma and Next both readweb/.env). npm installat repo root.npm run db:push -w webthennpm run dev:web -w web.npm run build -w extension(ornpm run dev -w extensionfor watch); in Chrome, Load unpacked → pickextension/dist.
The extension uses a device token: after signing in on the web app, open Settings → Extension and generate a token. Paste it once into the extension options.