# Claude Code for Beginners: Build Your First App in 30 Minutes (2026)

Canonical: https://clawdocx.com/blog/claude-code-beginners-guide-2026
Author: Theo Marsh
Published: 2026-03-24
Updated: 2026-03-24

> 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:

1. Installing Claude Code
2. Configuring your first project
3. Learning the essential commands
4. Building a simple task tracker API
5. 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.

```bash
npm install -g @anthropic-ai/claude-code
```

Verify it works:

```bash
claude --version
```

You'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.

```bash
claude
# Follow the authentication prompts
```

That's it. No extensions, no IDE plugins, no configuration files to create.

---

## Step 2: Set Up Your Project

Create a new project directory and initialize it:

```bash
mkdir task-tracker && cd task-tracker
npm init -y
```

Now 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.

```bash
claude
```

Once 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:

```markdown
# CLAUDE.md

## Project
Task 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 processing
```

Every 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 implementation
```

Use `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:

```
/compact
```

This 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 questions
```

Start with Opus for building features. Switch to Haiku when you just need quick answers.

### `/plan` — Think Before Acting

```
/plan
```

Enters 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:

```bash
cd task-tracker
claude
```

### 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:
1. Run `npm install express better-sqlite3 typescript tsx @types/express @types/better-sqlite3`
2. Create `tsconfig.json` with appropriate settings
3. Create `src/index.ts` with a basic Express server
4. Update `package.json` scripts

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 task

Put 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](/blog/claude-code-ultimate-guide) covers everything from sub-agents to dispatch
- **Master the commands:** [Effort, Context & Slash Commands](/blog/claude-code-effort-context-slash-commands-2026)
- **Set up memory properly:** [Claude Code Memory & CLAUDE.md Guide](/blog/claude-code-memory-claude-md-guide)
- **Automate workflows:** [Claude Code Hooks Beginner's Guide](/blog/claude-code-hooks-beginners-guide)
- **Use with OpenClaw:** [Getting Started with Claude Code & OpenClaw](/blog/getting-started-claude-code-openclaw)
- **Optimize your setup:** [Best Claude Code Settings & Configuration](/blog/best-claude-code-settings-configuration-2026)

---

## FAQ

<details>
<summary>Do I need to know how to code to use Claude Code?</summary>
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.
</details>

<details>
<summary>How much does Claude Code cost for a beginner?</summary>
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.
</details>

<details>
<summary>Can Claude Code build a full-stack app?</summary>
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.
</details>

<details>
<summary>What if Claude Code writes buggy code?</summary>
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.
</details>

<details>
<summary>Is Claude Code better than just using ChatGPT for coding?</summary>
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.
</details>