AI coding workflow for Next.js SaaS
A practical AI coding workflow for Next.js apps with Server Components, actions, auth, tests and deployment checks.

Put it into practice
What you will produce
A minimal change that follows the repository's App Router conventions, preserves existing UI and includes a route-level check.
- 01
Identify the route and installed version
Find the target App Router file and read the installed Next.js package version; open the matching local framework guide before choosing a data or rendering API.
Expected result: A change target and framework guidance that match this repository's actual version.
- 02
Trace current UI and data flow
Inspect the route, shared components, loading/error states and locale handling; identify the smallest component or route segment responsible for the requested behavior.
Expected result: A concise implementation boundary that preserves surrounding page conventions.
- 03
Make one minimal route change
Implement only the requested behavior, retain existing navigation and accessibility patterns, and avoid introducing client state or fetching where the current architecture does not need it.
Expected result: A focused App Router diff with no unrelated layout or metadata changes.
- 04
Check framework and rendered behavior
Run the project's type/build check and open the target route at the relevant viewport and each supported locale; inspect the visible result and console/network failures.
Expected result: Evidence that the version-correct implementation compiles and the route works in its supported contexts.
Acceptance checks
- The installed Next.js version and matching local guidance were checked.
- The changed route and component follow the repository's current App Router pattern.
- The project type/build check passes for the changed code.
- The rendered route is inspected in each supported locale when localization applies.
Limits and trade-offs
Next.js APIs and conventions vary by version. Do not paste examples from another major version without checking installed documentation.
Official sources
Read the Next.js workflow
Related guides
CLAUDE.md: A Guide for Every Developer
One markdown file that makes AI coding assistants actually understand your codebase. Here's what to put in it.
There's a reason Claude Code writes great code in some projects and generic boilerplate in others. It's not the model. It's CLAUDE.md . It is one part of my Claude Code workflow: project conventions reduce guesswork, but they do not guarantee a speedup or remove the need to review the change. What it is CLAUDE.md is a plain markdown file that Claude Code reads at the start of every session. Think of it as the onboarding doc you'd give a senior contractor on day one: stack, conventions, rules, context. Without it, Claude infers patterns from what it sees in the codebase. Sometimes it infers correctly. Often it doesn't especially for implicit conventions your team just "knows". A CLAUDE.md makes your rules available without repeating them, but does not guarantee compliance: review the diff and run the checks. What to put in it 1. Stack and versions Simple but important. These…
Read the guide5 Claude Code Hooks I Use Daily
Claude Code hooks run shell commands on session start, file writes, and tool calls. Here are the 5 I use daily and how to configure them.
Most people discover Claude Code for the AI. They miss the hooks. Hooks are shell commands that execute automatically when something happens in your Claude Code session: a session starts, a tool runs, Claude stops. You define them in .claude/settings.json . They run silently in the background. Here are the 5 I use every day. What hooks look like The available events: SessionStart , UserPromptSubmit , PreToolUse , PostToolUse , Stop . Hook 1 Auto inject date on every prompt Event : UserPromptSubmit Claude doesn't have real time awareness. Every prompt gets the current date injected automatically. Useful for anything time sensitive: changelogs, deadlines, scheduling logic. Hook 2 Push notification when Claude stops Event : Stop Long tasks (refactors, test runs, analysis) can take 2–5 minutes. Without a notification I'd either stare at the screen or miss the result. This fires whenever Claude finishes a task, whether it succeeded or…
Read the guideMy Claude Code Vibe Coding Setup
Vibe coding isn't sloppy coding. It's a flow-state workflow where you direct and Claude executes. Here's my full setup: Claude Code, hooks, CLAUDE.md, and Plan Mode.
"Vibe coding" gets a bad reputation because people assume it means shipping without thinking. That's not what it is or at least not how I use it. For me, vibe coding is a specific working state: high intent, low friction. You know what you want to build. You stop fighting the tools to get there. Claude Code is the piece that made this possible for me. (If you're still weighing tools, I broke down Claude Code vs Cursor vs Copilot separately this post assumes you've landed on Claude Code.) The mental model shift Before: I'd open my editor, think about the implementation, write the code, realize the types were wrong, fix the types, realize the pattern was wrong, refactor. Now: I describe the outcome, Claude proposes a plan, I approve or redirect, it executes, I review. The decision making is mine. The typing is Claude's. This isn't automation it's delegation.…
Read the guide