Setting up to build with AI
9 minSet up the studio you'll build in for this module, with one AI coding tool, a project on your computer and git to save your work. You finish with a hello page saved in git.
Lesson video
Tastebud · 8:39 · Captions on screen
Direct the AI to write the code, commit each version that works, and any bad change is one step back.
- Why. An AI tool can change several files in seconds, and you won't read most of them. A commit is a restore point, so a breaking change costs one step back.
- Real example. Rewind lists your prompts and offers Restore code, Restore conversation, or both. It covers one session, and files changed only by commands it ran aren't tracked, so keep using git. (Claude Code, Nov 2026)
- When to break it. For a throwaway idea, skip all of it. Vibe coding, named in February 2025 for weekend projects, means accepting every change unread and pasting errors straight back in.
- Common mistake. An hour of changes and no commit of your own. When the page breaks, git log shows only 'Initial commit from Create Next App', and going back there loses everything.
Our take. Git matters more than the AI tool you pick. Tools change every few months and their undo covers one session, but a commit after each working change is an undo in any tool.
When vibe coding is enough, and when to steer
Vibe coding means directing an AI that writes the code for you. At its loosest you accept every change unread, which suits a throwaway idea. For a prototype you'll explain in an interview, steer, and ask why before you keep a change.
Steer far enough to explain every change you keep
- Pure vibe coding. Fine for a throwaway idea. When it breaks, you can't say why, and your next prompt can only guess.
- Steer and ask why. This module works here. The AI writes, and you read its plan, check the page and ask about any change you can't follow.
- Read and tweak. Practice gets you here. You change a colour or a word yourself, because that's faster than asking.
- Write it all by hand. You don't need this to build a working prototype in this course.
Three tools that work on your project folder
Claude Code, Cursor and Codex all read your project, edit its files and run commands for you. They differ in where you talk to them and what they cost. Tap each one, pick one, and stay with it for this module.
All three work on the same folder, so switching later costs nothing
- Claude Code. Anthropic's coding agent. Use it in the Claude desktop app's Code tab with no terminal, or in a terminal, VS Code or Cursor. It needs a paid Claude plan, and Pro is $20 a month.
- Cursor. A code editor with an agent built in, which suits anyone who wants to watch the code change. A diff shows each edit as the agent makes it. The free plan has limited agent use, and paid plans start at $8 a month as part of the X Subscription.
- Codex. OpenAI's coding agent. In the ChatGPT desktop app, choose Codex and open a folder. The free plan includes it there as it rolls out, and Plus, at $20 a month, adds the terminal, editors and the web.
Git is your undo history and your proof of work
Git saves snapshots of your project called commits, each with a short message on what changed, like named versions in Figma's version history. Pushing sends them to GitHub, which keeps them online for you and anyone hiring. Push after each session.
Your work goes into git, and .gitignore keeps bulky and secret files out
- Saved in git. Your own work, and what it takes to rebuild the project. Every commit keeps a copy.
- app/page.tsx. Your home page. It's your work, so every change to it should be saved.
- package.json. The list of building blocks the project uses. Anyone can rebuild the project from it.
- README.md. A note on what the project is. It tells visitors and hiring teams what they're looking at.
- Kept out by .gitignore. Files that are huge, or secret.
- node_modules. The folder of installed building blocks. It's huge, and npm rebuilds it from package.json in one command.
- .env.local. Where your API key will live. A key pushed to GitHub can be found and misused, so the starter's .gitignore already skips .env files.
Try it
Set up your studio, one tick at a time
Make an empty folder called hello-page (lowercase, no spaces) and open it in your coding tool. For each step, ask the tool and paste what it shows. You never have to type a command yourself. Each box ticks when it recognises real output.
- Node.js 20.9 or newer, which Next.js 16 needs (not yet)
- Git is installed (not yet)
- The dev server is running at a local address (not yet)
- The page shows your heading, not the starter's 'To get started, edit the page.tsx file.' (not yet)
- The latest commit is yours, not 'Initial commit from Create Next App' (not yet)
- Its message says what changed, in three words or more (not yet)
- Everything you changed is saved in a commit (not yet)
Quick check
Your hello page works. Before you ask the AI for a bigger change, what should you do?
Watch next
Watch it for Why you read the plan and say what done looks like before an agent changes any files, then commit at the end.
Watch it for Staging and committing, the two steps your coding tool runs when you ask it to commit. Branching and merging can wait for later.
Connects to: 2.5 Figma prototyping and plugins · 4.1 Writing prompts · 11.5 Designing a full AI workflow · 14.4 Design systems with AI tools · 16.4 Prototyping the key moment · 17.6 Learning in public
Sources · checked Nov 2026
- Next.js Docs: Installation (last updated 2 Oct 2026)Minimum Node.js 20.9, npx create-next-app@latest and its recommended defaults, npm run dev, http://localhost:3000, and editing app/page.tsx to see the page update
- npm registry: next, latest versionThe latest Next.js is 16.4.6 and needs Node.js 20.9.0 or newer
- Next.js source: create-next-app git helpercreate-next-app runs git init and commits 'Initial commit from Create Next App', and removes the repository if that commit fails
- Next.js source: dev server start-up logThe dev server prints '▲ Next.js <version>' and '- Local:' with the address, then 'Ready in', and moves to the next free port if 3000 is in use
- Next.js source: create-next-app starter page and .gitignoreThe starter heading 'To get started, edit the page.tsx file.', and a .gitignore that leaves out /node_modules and .env* files
- Claude Code Docs: OverviewClaude Code runs in the terminal, VS Code and Cursor, the web and the Claude desktop app's Code tab, and the desktop app needs a paid subscription
- Claude Code Docs: Checkpointing/rewind or Esc twice opens the rewind menu with Restore code and Restore conversation, files changed only by Bash commands aren't tracked, and checkpoints are not a replacement for git
- Claude: Plans and pricingClaude Code is not on the Free plan, and Pro is $20 a month billed monthly
- Cursor Docs: Models and pricingCursor's Free plan has Agent with limited usage, Plus is $8 a month, and Cursor is sold as part of the X Subscription
- Cursor Docs: QuickstartCursor opens a folder, its diff view shows the agent's changes as it works, and Plan Mode waits for approval before building
- Cursor Docs: CheckpointsCursor's checkpoints are stored locally, separate from Git, and meant only for undoing Agent changes
- OpenAI Developers: Codex pricingChatGPT Free includes Codex in the desktop app, subject to rollout, and Plus at $20 a month adds Codex in the CLI, IDE extension and web
- OpenAI Learn: ChatGPT desktop appIn the ChatGPT desktop app you choose Codex and can open a folder to work in
- Node.js release indexNode.js 24 and 26 are the long-term support lines in Nov 2026, so a fresh install prints v24 or v26
- Git: Install for macOSApple ships git with the Xcode Command Line Tools, and the latest git is 2.56.1
- GitHub: PricingGitHub Free costs $0 and includes unlimited public and private repositories
- Wikipedia: Vibe codingThe term was coined in February 2025 for accepting every change without reading the diffs, and was meant for throwaway weekend projects