Claude Code for Beginners: Build Your First App in 30 Minutes (2026)
A step-by-step beginner's guide to Claude Code: install it, configure your project, learn the essential commands, and build your first app in under 30 minutes.
#What You'll Build
By the end of this guide, you'll go from zero to a working app built with Claude Code. We'll cover:
- Installing Claude Code
- Configuring your first project
- Learning the essential commands
- Building a simple task tracker API
- Avoiding the most common beginner mistakes
No prior AI coding tool experience needed. If you can use a terminal, you can use Claude Code.
#Step 1: Install Claude Code
Claude Code is an npm package. You need Node.js 18+ installed.
npm install -g @anthropic-ai/claude-codeVerify it works:
claude --versionYou'll need to authenticate on first run. If you have a Claude Pro subscription, Claude Code is included. Otherwise, you'll connect an Anthropic API key.
claude# Follow the authentication promptsThat's it. No extensions, no IDE plugins, no configuration files to create.
Want step-by-step guides for this and more?
ClawDocx Pro includes 500+ curated prompts, setup guides, SKILL.md files, and templates — everything to make your AI agent unstoppable.
See plans & pricing#Step 2: Set Up Your Project
Create a new project directory and initialize it:
mkdir task-tracker && cd task-trackernpm init -yNow create a CLAUDE.md file. This is the single most important step for new Claude Code users — it tells Claude about your project before every session.
claudeOnce inside Claude Code, type:
Create a CLAUDE.md file for a Node.js task tracker API using Express and SQLite. We'll use TypeScript and store data in a local tasks.db file.Claude Code will create something like:
# CLAUDE.md## ProjectTask tracker REST API built with Express, TypeScript, and SQLite.## Stack- Runtime: Node.js 18+- Framework: Express- Database: SQLite (better-sqlite3)- Language: TypeScript- Package manager: npm## Commands- Dev server: `npx tsx src/index.ts`- Build: `npx tsc`- Test: `npx vitest`## Conventions- Use async/await for all async operations- Return proper HTTP status codes- Validate request bodies before processingEvery time you start a new Claude Code session in this directory, it reads CLAUDE.md first. This eliminates repetitive explanations.
#Step 3: Learn the Essential Commands
Before building anything, learn these five commands. They're the foundation of every Claude Code workflow.
/effort — Control Depth vs. Speed
/effort low # Quick, simple responses/effort medium # Balanced (default)/effort high # Deep reasoning, thorough implementationUse low for simple questions. Use high when building complex features or debugging tricky issues.
/compact — Free Up Context
As your conversation grows, Claude Code's context window fills up. When responses start degrading:
/compactThis summarizes the conversation history and frees up space. Use it proactively — don't wait until things break.
/model — Switch Models
/model opus # Most capable, best for complex tasks/model sonnet # Balanced, good for most work/model haiku # Fast and cheap, good for quick questionsStart with Opus for building features. Switch to Haiku when you just need quick answers.
/plan — Think Before Acting
/planEnters plan mode — Claude outlines an implementation plan before writing any code. Use this for any non-trivial feature. Review the plan, give feedback, then let Claude execute.
Shift+Tab — Accept Suggestions
When Claude proposes a command or action, press Shift+Tab to accept it immediately instead of typing "yes".
#Step 4: Build Your First App
Now let's build. Start a fresh Claude Code session:
cd task-trackerclaude#4a. Scaffold the Project
Type this prompt:
Set up this project with TypeScript, Express, and better-sqlite3. Install all dependencies, create the tsconfig.json, and set up a basic Express server in src/index.ts that listens on port 3000. Don't add any routes yet.Claude Code will:
- Run
npm install express better-sqlite3 typescript tsx @types/express @types/better-sqlite3 - Create
tsconfig.jsonwith appropriate settings - Create
src/index.tswith a basic Express server - Update
package.jsonscripts
Watch the terminal — you'll see every command Claude runs and every file it creates. Review as it goes.
#4b. Add the Database
Create a src/db.ts module that initializes a SQLite database with a tasks table.The table should have: id (auto-increment), title (text, required), completed (boolean, default false), createdAt (timestamp, default now).Export a db instance and a function to initialize the table.#4c. Add CRUD Routes
Add REST routes for tasks:- GET /tasks — list all tasks- POST /tasks — create a task (body: { title: string })- PATCH /tasks/:id — update a task (body: { title?, completed? })- DELETE /tasks/:id — delete a taskPut routes in src/routes/tasks.ts. Use proper status codes and error handling.#4d. Test It
Start the dev server and test all four endpoints with curl commands. Show me the results.Claude Code will run npx tsx src/index.ts, then execute curl commands against each endpoint, showing you the results. You'll see your API working in real time.
#4e. Add Tests
Add vitest tests for all four task endpoints. Use supertest for HTTP testing. Make sure each test uses a fresh in-memory database.Then:
Run the tests.You now have a working, tested API — built entirely through natural language prompts.
#Step 5: Common Beginner Mistakes
#Mistake 1: Not Using CLAUDE.md
Without CLAUDE.md, Claude Code starts every session blind. It might use the wrong package manager, wrong test framework, or wrong coding style. Always create one first.
#Mistake 2: Never Using /compact
Long conversations degrade quality. If you've been in a session for 20+ messages, run /compact. If you notice Claude repeating itself or losing track, run /compact immediately.
#Mistake 3: Using /effort High for Everything
High effort costs more tokens and takes longer. Use it for complex tasks. For simple file edits, quick questions, or straightforward changes, low or medium is fine.
#Mistake 4: Not Reviewing Code
Claude Code is capable but not infallible. Read what it writes. Check the diffs. Run the tests. Trust but verify — especially for security-sensitive code, database migrations, and auth logic.
#Mistake 5: Giant Prompts
Don't try to build everything in one prompt. Break work into steps: scaffold, then database, then routes, then tests. Claude Code handles focused tasks better than massive, multi-requirement prompts.
#What's Next
You've got the basics. Here's where to go from here:
- Deeper Claude Code features: The Ultimate Claude Code Guide covers everything from sub-agents to dispatch
- Master the commands: Effort, Context & Slash Commands
- Set up memory properly: Claude Code Memory & CLAUDE.md Guide
- Automate workflows: Claude Code Hooks Beginner's Guide
- Use with OpenClaw: Getting Started with Claude Code & OpenClaw
- Optimize your setup: Best Claude Code Settings & Configuration
#FAQ
Do I need to know how to code to use Claude Code?
Some programming knowledge helps — you'll need to understand what Claude is building in order to review it effectively. Complete beginners can use Claude Code to learn, but you should understand basic concepts like variables, functions, and HTTP requests. Claude Code is most powerful when you can evaluate its output critically.
How much does Claude Code cost for a beginner?
The Claude Pro subscription ($20/month) includes Claude Code with usage limits — this is the best option for beginners. API pay-as-you-go pricing is available but can get unpredictable. Start with Pro and upgrade to Team or API billing if you outgrow the limits.
Can Claude Code build a full-stack app?
Yes. Claude Code can build frontend (React, Next.js, Vue), backend (Express, FastAPI, Go), databases (Postgres, SQLite, MongoDB), and infrastructure (Docker, CI/CD). It handles full-stack projects across multiple languages and frameworks. The key is breaking work into focused steps rather than asking for everything at once.
What if Claude Code writes buggy code?
This happens. The best defense is: always run tests, review diffs before accepting, and use /plan for complex features so you can catch design issues early. If Claude introduces a bug, describe the symptoms and it will usually fix it quickly. For persistent issues, try /compact to clear context and re-explain the problem.
Is Claude Code better than just using ChatGPT for coding?
For coding tasks, significantly yes. ChatGPT is a chat interface — you copy-paste code back and forth. Claude Code operates directly in your project: it reads your files, writes code, runs tests, manages git, and executes commands. It's the difference between texting a developer and having one sit at your machine.