What you'll build
A real web app β a page you can open in any browser β built with Next.js, without writing the code by hand. You'll describe what you want in plain English and let Claude Code do the typing. This part takes you from nothing to the app running on your own machine. Putting it online comes next, in Part 3.
Install a few tools β describe your app to Claude Code β preview it locally β iterate. That's this whole part. Deploy is Part 3.
The tools you'll meet
Claude Code
An AI coding assistant in your terminal. You talk; it writes and edits files.
Next.js
The framework your app is built with. Claude Code sets it up for you.
Node.js
The engine that runs your app while you build. You install it once.
Git & GitHub
Where your code lives. You'll need it when you deploy in Part 3.
Before you start
- A Claude account at claude.ai (Pro or Max includes Claude Code).
- A GitHub account at github.com β for later.
Install Node.js
Install the LTS build from nodejs.org, then check it in your terminal (Mac: β+Space β "Terminal"; Windows: PowerShell):
node --version # should print v22.x.x or similar
Step 2
Install Claude Code
npm install -g @anthropic-ai/claude-code
mkdir my-first-app && cd my-first-app
claude # follow the login link the first time
The terminal isn't scary. It's a text box for commands β and Claude Code can run most of them for you when you ask.
Ask Claude Code to build your app
Describe the purpose and the vibe; let it make the technical choices:
> Create a new Next.js app in this folder using TypeScript and the
App Router. Build a one-page personal site with a hero, an "about"
section, a list of projects as cards, and a contact footer. Clean
dark theme, blue accent. Then start the dev server so I can see it.
It creates the files, installs what it needs, and asks before running commands β say yes.
What Claude Code actually runs
Behind that one request, it runs the same commands a developer would type by hand β and asks before each:
npx create-next-app@latest . --typescript --app # scaffold the Next.js project here
npm install # download the libraries it needs
npm run dev # start the dev server
# β Local: http://localhost:3000
You don't have to remember any of these β Claude Code picks and runs them. Seeing them helps you follow along, and recognize them when it asks for permission.
Step 4Run it locally β and stop here
npm run dev
# β Local: http://localhost:3000
Open http://localhost:3000. Leave it running β
the page refreshes on every edit. Keep asking for changes until you like it.
This is the finish line for Part 1: a working app on your
machine. You don't need to deploy anything yet.
What all these files are: the Next.js layout
my-first-app/
ββ app/ # your pages live here
β ββ layout.tsx # shared shell around every page
β ββ page.tsx # the homepage β "/"
β ββ globals.css # site-wide styles
β ββ about/
β ββ page.tsx # the about page β "/about"
ββ public/ # images & static files, served as-is
ββ package.json # dependencies + dev/build scripts
ββ node_modules/ # installed libraries (never edit)
- Folders in
app/become URLs. A folder with apage.tsxis a page. layout.tsxis the frame β nav, footer, fonts on every page.public/is for assets β droplogo.pngthere, use it at/logo.png.
Don't memorize it. Ask Claude Code "give me a tour of my project."
npm, yarn, pnpm β what are these?
You keep typing npm. It's a package
manager β it downloads the open-source libraries your app depends on
(into node_modules/) and runs your project's
scripts. There are three common ones; they do the same job, just faster or
tidier:
| Tool | What it is | Install a package | Run a script |
|---|---|---|---|
npm | Ships with Node.js β the default, always there. | npm install x | npm run dev |
yarn | An early faster alternative; still widely used. | yarn add x | yarn dev |
pnpm | Fastest, saves disk space (shared package store). | pnpm add x | pnpm dev |
Which should you use? As a beginner, stick with npm β it's built in and every tutorial assumes it. Pick one per project and don't mix them (each writes its own lock file β package-lock.json, yarn.lock, or pnpm-lock.yaml β that pins exact versions so everyone gets the same install).
What's in package.json?
package.json is your project's ID card β the one
file that says what your app is called, what it depends on, and what commands
it can run. Every package manager reads it:
// package.json
{
"name": "my-first-app",
"scripts": { // the commands you can run
"dev": "next dev", // npm run dev β start locally
"build": "next build", // npm run build β production build
"start": "next start",
"lint": "eslint"
},
"dependencies": { // libraries your app needs to run
"next": "^15.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": { // tools needed only while developing
"typescript": "^5",
"eslint": "^9"
}
}
- scripts β shortcuts you run with
npm run <name>(that's wherenpm run devcomes from). - dependencies β packages shipped with your app; devDependencies β tools only used while building (linters, types).
- The
^means "compatible newer versions are OK"; the lock file records the exact versions actually installed.
You rarely edit it by hand. npm install some-lib adds the dependency for you β or just ask Claude Code, "add and set up <library>."
Make it look designed, not default
Claude Code has Skills for design β ask for them by name so your app doesn't look templated:
frontend-design
Distinctive typography, spacing, and visual identity.
shadcn
Ready-made, accessible UI components that already look sharp.
> Use your frontend-design skill to give this a stronger visual
identity β deliberate type, generous spacing, one accent color.
Avoid a generic "AI landing page" look.
Start from a template β especially for dashboards
You don't have to build the layout from scratch. A template is a ready-made skin β the sidebar, top bar, cards, tables, and charts already arranged β so you just drop in your content and data. Dashboards are mostly the same furniture every time, which is exactly where a template saves the most work.
And yes β there are gallery pages you browse exactly like PrimeVue's templates showcase: preview a design, then clone it and start editing. The best for a Next.js + React app:
shadcn/ui blocks β
A gallery of copy-in "blocks" β including full dashboard layouts (sidebar, cards, data tables).
Tremor β
React components built for dashboards: KPI cards, charts, and tables, consistent out of the box.
Vercel Templates β
Clone a whole admin/SaaS starter β many are one-click deploy β and start editing.
Coming from PrimeVue? Its React sibling PrimeReact has the same templates gallery, and it works in Next.js too. Other free galleries worth a browse: Flowbite, Preline, and MUI templates.
Tell Claude Code to build on one instead of starting from a blank page:
> Set up shadcn/ui and use its dashboard block as the skin: a left
sidebar, a top bar, and a main area with four stat cards, a line
chart (use Tremor), and a recent-activity table. Fill it with
placeholder data for now β I'll wire real data in Part 4.
Why start from a skin: the fiddly part of a dashboard is the responsive layout and consistent spacing. Let a template own that, and spend your time on the content and data that make it yours. Ask Claude Code "what dashboard templates fit this?" and it'll pick one and wire it up.
How to prompt for web development
Good prompts answer four things β goal, context, style, constraints:
> Build a homepage for a coffee roaster called "Ember". Sections:
hero with tagline, short "our story", three product cards with
price, footer with address + Instagram. Warm palette (browns,
cream), rounded corners. Must look great on a phone.
- Show, don't just tell: "make it feel like stripe.com β clean, lots of air."
- Describe problems, not CSS: "the text is too close to the edge on mobile."
- One change at a time, and ask for options when exploring.
Give the project a CLAUDE.md
Drop a CLAUDE.md at the repo root so Claude Code
knows your conventions every session (/init
scaffolds one for you):
# CLAUDE.md
## What this is
Personal / marketing site. Next.js (App Router) + TypeScript. No backend yet.
## Commands
- Dev / Build / Lint: npm run dev / build / lint (dev on :3000)
## Structure
- app/ routes (folder + page.tsx = a URL)
- app/layout.tsx shared shell (nav, fonts)
- public/ static assets, served at /
- components/ reusable UI
## Conventions
- Dark theme, blue accent. Reuse tokens in app/globals.css β don't hardcode colors.
- One component per file; keep them small.
## Verify
Run the dev server; check the changed page on desktop + mobile.
Tips for working with Claude Code
- Work in small steps β one change, look, next.
- Commit often β ask Claude Code to save progress to git; it's your undo.
- Give it the error β paste error messages; fixing them is what it's best at.
- Ask it to explain β "what does this file do?" is how you learn while building.
Next up β Part 3: Platforms: Vercel, Supabase & the AWS Alternatives β now get your local app online. (Want to level up how you drive Claude Code? That's the capstone, Part 8.)