Migrate dashboard auth to NextAuth.js and generate tests
Author used Cursor Agent to migrate a SaaS dashboard to NextAuth.js across 14 files with three manual fixes, and a background agent wrote 34 tests, 28 passing at first.
Done withCursor
- What they did
- The author described the move from a custom auth system to NextAuth.js in Cursor's Agent chat. The migration touched 14 files: route handlers, middleware, session management, page wrappers and environment config. Separately, a background agent on its own branch wrote unit tests for a Python data pipeline and opened a PR while the author kept working on the dashboard.
- How it went
- The migration needed three manual fixes (a missing env variable, a wrong callback URL pattern, a session type mismatch) and took about 90 minutes, against an estimated 4 hours. The agent's PR had 34 tests; 28 passed, and six needed fixture tweaks.
- Worth knowing
- Heavy agent use burned through Pro credits by about day 22, and the author bought extra credits twice, so the effective cost was closer to $35 a month.
Try it yourself with Cursor
In my project [project name], migrate authentication from [current auth approach] to [target library, e.g. NextAuth.js], updating every file that depends on it. Then start a background agent to write tests for the new auth flow and run them. When done, give me a list of changed files, the test results, and anything that failed or needs my manual review. Pause and show me the plan before editing files.
Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.
Source: dev.to · Undated
Related use cases
Keep coding agents running autonomously for long stretches
Cursor's write-up on scaling long-running autonomous coding.
Upgrade site dependencies and frameworks with Cursor
Kent C. Dodds had Cursor's agent look up migration docs, plan and upgrade Remix v2 to React Router v7 and xstate in his site.
Migrate a website from a CMS to raw code and Markdown
Lee Robinson used Cursor agents to move cursor.com off its CMS in three days for $260 in tokens, with subagents handling a broad refactor.
Build a C compiler with a team of parallel agents
Anthropic's engineering write-up on tasking Opus 4.6 agent teams with building a C compiler.
Take ideas to implementation with a planning-command pipeline
A solo SaaS founder uses a custom five-command agent flow (intent, impact analysis, planning, execution, review) with lint guardrails to ship features in a production product.
Build and deploy a blog aggregator website in a day
An author used Claude Code to turn a year-old requirements doc into a live Vue 3 site on Netlify that pulls their posts from several platforms.
Submitted by from search gap: 网站
Get 5 like this every morning
The best things people got an AI agent to do, each with the prompt to try it.