Chapters
1. Getting Started

Getting Started: Just Build It

Learning Objectives

  • Understand what vibe coding is and how it differs from traditional coding
  • Set up your development environment and use Claude Code
  • Create a working web page using only prompts
  • Handle errors without panicking

1.1 What is Vibe Coding?

A New Coding Paradigm

Vibe Coding is a way of creating code by explaining to AI in natural language. While traditional coding requires memorizing programming language syntax and typing it yourself, vibe coding is simply saying "make this for me."

Traditional CodingVibe Coding
Must memorize syntaxIntent communication is key
Days stuck on one errorThrow errors to AI
6+ months learning requiredStart immediately

What We're Building: LinkHub

In this book, we'll build a link-in-bio service called LinkHub together. It's a service like Linktree that lets you collect all your links on a single page and share them.

What is LinkHub?

On platforms like Instagram, YouTube, and X (Twitter), you can only put one link in your profile. LinkHub creates a page behind that single link where all your other links are collected.

💡

LinkHub Core Features

From the user's perspective

  • Create your own profile page (linkhub.com/yourusername)
  • Add, edit, delete, and reorder links
  • Customize themes and designs
  • View click analytics

What you'll learn technically

  • Database (storing profiles and links)
  • Authentication (login/signup)
  • Real-time features (live preview, analytics dashboard)
  • Security (protecting user data)
  • Deployment (shipping to the world)
  • Monetization (premium themes, custom domains)

Why Link-in-Bio?

ReasonExplanation
Simple structureA textbook CRUD (Create/Read/Update/Delete) app
Actually usableYou can link it in your social profiles right away
Natural scalabilityThemes, analytics, payments -- features grow organically
Clear monetizationPremium features as a revenue model is proven

1.2 LinkHub User Journey Preview

Let's preview what the finished service will look like. This is the goal we'll build toward step by step.

Step 1: Sign Up / Log In

  1. Go to linkhub.com
  2. Sign up via email or social login
  3. Navigate to your dashboard

Step 2: Set Up Your Profile

From the dashboard, configure your page:

  • Add profile picture, name, and a short bio
  • Choose a theme (minimal, dark, colorful, etc.)
  • Add links: title + URL + icon

Step 3: Share It

Once your page is ready, you get a unique URL:

linkhub.com/yourusername

Drop this link in your Instagram, YouTube, or any other profile and you're done!

Chapter-by-Chapter Roadmap

ChapterWhat We BuildResult
Ch 1Landing pageService introduction page
Ch 2DatabaseStoring profiles and links
Ch 3AuthenticationSignup / Login
Ch 4Real-time featuresLive preview, click analytics
Ch 5SecurityProtecting user data
Ch 6DeploymentShipping to the world
Ch 7MonetizationPremium themes, custom domains

1.3 Checking Your Development Environment

If you haven't installed VS Code, Node.js, Git, and Claude Code yet, check Chapter 0 for installation instructions.

Run the following command in your terminal to verify all tools are ready:

node --version && git --version && claude --version

If all three lines show version numbers, you're good to go.


1.4 First Project: Building a Landing Page

Now let's actually build something! We're making LinkHub's landing page.

Step 1: Create Project

Open your terminal, run Claude Code, then say:

Create a Next.js project. Use TypeScript and set up Tailwind CSS.

Claude will create the project for you.

Step 2: Build the Landing Page

Describe what you want in detail:

Create a landing page for a link-in-bio service called LinkHub.
- Header: logo, login button
- Hero section: a one-liner like "All your links in one place", CTA button
- Feature section: 3 core features (link collection, customization, analytics)
- Pricing: two plans - Free / Pro
- Footer

Make it modern and clean.

Step 3: Run and Check

npm run dev

Open http://localhost:3000 (opens in a new tab) in your browser to see the landing page you just created!

💡

Prompt Writing Essentials

  1. Be specific -- specify colors, layout, components
  2. Reference examples -- "Notion style", "Linear vibe"
  3. Request in stages -- don't try to do everything at once

1.5 Advanced Prompt Engineering

It's most frustrating when AI misunderstands your intent. In this section, you'll learn 'technical communication skills.'

Lego-Style Buildup: Iterative Improvement Strategy

Don't try to get perfect code in one go. The key is splitting features into small pieces and adding them one by one.

💡

Bad Example vs Good Example

Bad Example (Request everything at once)

"Make an app with real-time chat, login, payments, and notifications"

Good Example (Step-by-step requests)

  1. "First, just make the chat UI layout"
  2. "Make messages appear on screen when typed"
  3. "Connect WebSocket to make it real-time"
  4. "Save messages to DB"

When AI Misunderstands

If results don't match expectations, use these strategies:

  • Request rollback -- "Undo what you just made, let's try differently"
  • Provide feedback -- "Let me tell you what's wrong with this result. [problems]. Consider this and redo it"
  • Partial modification -- "Only modify this part to [desired direction]. Keep everything else"

Context Management: When Projects Get Big

As projects grow, Claude's Context Window fills up and performance degrades.

.claudeignore Setup

Like Git's .gitignore, specify files Claude shouldn't read:

# .claudeignore
node_modules/
.next/
dist/
*.log
*.lock
coverage/
.env*

Summary Delivery Technique

Instead of long files, summarize and deliver the essentials:

Let me summarize the current project status:
1. Tech stack: Next.js, Supabase, Tailwind CSS
2. Completed features: Login, profile page, link CRUD
3. Current work: Click analytics dashboard
4. Problem: Click counts aren't saving to DB

In this context, look at the logic for saving to the clicks table.

Asking AI Counter-Questions (Using as QA)

Code 'working' and code 'working properly' are different. Use AI as a QA tool:

Review the feature I just made:
1. 5 possible error cases
2. Security vulnerabilities
3. Edge cases (empty input, special characters, long text, etc.)
4. Potential performance issues

Pro Tip

Asking "Assume this code is deployed to production. Review it from a senior developer's perspective" gets you stricter feedback.


1.6 Handling Errors

Errors are normal. Even professional developers encounter errors daily. What matters is how you handle them.

3 Steps to Error Resolution

  1. Copy the entire error message
  2. Throw it directly to Claude
  3. Say "Explain why this error happened and fix it"

Common Error Situations

Error SituationSolution
Module not foundRun npm install
Port already in useClose other terminal or change port
Syntax ErrorAsk Claude to fix
Type ErrorSend error message to Claude
⚠️

If an error isn't getting fixed, don't repeat the same prompt. Explain differently or break it into smaller requests.


1.7 Leveling Up Claude Code: Various Uses

Claude Code can be used in many ways beyond just entering prompts. Let's explore by level.

Level 1: Basic Prompt Input

The most basic method. Run Claude Code in terminal and request conversationally.

claude "Create a Next.js project"
  • Pros: No barrier to entry, start immediately
  • Cons: Repeat same explanations, hard to maintain per-project context

Level 2: Using CLAUDE.md File

Create a CLAUDE.md file in the project root and Claude automatically reads it for context.

# CLAUDE.md Example
 
## Project Overview
This project is LinkHub - a link-in-bio service.
 
## Tech Stack
- Frontend: Next.js 14, TypeScript, Tailwind CSS
- Database: Supabase (PostgreSQL)
- Hosting: Vercel
 
## Coding Conventions
- Use functional components
- TypeScript strict mode
- Use Tailwind CSS (no inline styles)
 
## Main Folder Structure
/app - Pages
/components - Reusable components
/lib - Utility functions
  • Pros: Automatic project context recognition
  • Cons: Requires setup per project

Level 3: .claude Folder Structure

Store settings in the ~/.claude folder to use across all projects.

~/.claude/
├── settings.json    # Global settings
├── CLAUDE.md        # Global instructions
├── rules/           # Rules to always follow
│   ├── security.md
│   ├── coding-style.md
│   └── testing.md
├── skills/          # Domain knowledge/workflows
│   ├── frontend-patterns.md
│   └── backend-patterns.md
├── commands/        # Slash commands
│   ├── tdd.md       # /tdd
│   └── plan.md      # /plan
└── agents/          # Specialized sub-agents
    ├── code-reviewer.md
    └── architect.md

Main Components

ComponentRoleExamples
RulesRules to always followSecurity rules, coding style
SkillsDomain knowledge/workflowsTDD methodology, frontend patterns
CommandsSlash commands/tdd, /plan, /review
AgentsSpecialized sub-agentsCode reviewer, architect

Level 4: Hooks (Automation)

Scripts that run automatically when specific events occur.

// ~/.claude/settings.json
{
  "hooks": {
    "PreToolUse": [{
      "matcher": "tool == 'Edit'",
      "command": "echo 'Backing up before file edit...'"
    }],
    "PostToolUse": [{
      "matcher": "tool == 'Edit'",
      "command": "npm run lint"
    }],
    "Stop": [{
      "command": "echo 'Session ended. Saving learnings...'"
    }]
  }
}
  • PreToolUse: Run before tool use
  • PostToolUse: Run after tool use
  • Stop: Run when session ends

Level 5: MCP (Model Context Protocol)

Connect external tools and services to Claude Code.

// ~/.claude.json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "your-token" }
    },
    "supabase": {
      "command": "npx",
      "args": ["-y", "@supabase/mcp-server"],
      "env": { "SUPABASE_URL": "...", "SUPABASE_KEY": "..." }
    }
  }
}

Services you can connect:

  • GitHub - Manage issues, PRs
  • Supabase - Direct DB operations
  • Vercel/Railway - Deployment management
  • Slack - Send messages
  • Notion - Document management
⚠️

Warning: Context Window

Enabling too many MCPs reduces your Context Window. It can drop from 200k to 70k. Keep it under 10 per project.

Level 6: Using Community Resources

Leverage configurations shared by other developers.

Recommended Resource: everything-claude-code

A Claude Code configuration collection from an Anthropic hackathon winner. A verified resource with 11,000+ stars.

github.com/affaan-m/everything-claude-code

Installation:

# Clone repository
git clone https://github.com/affaan-m/everything-claude-code.git
 
# Copy desired configurations
cp everything-claude-code/agents/*.md ~/.claude/agents/
cp everything-claude-code/rules/*.md ~/.claude/rules/
cp everything-claude-code/commands/*.md ~/.claude/commands/
cp -r everything-claude-code/skills/* ~/.claude/skills/

Recommended Levels by Stage

StageRecommended LevelReason
Just startingLevel 1-2Learn basics
Project in progressLevel 2-3Increase efficiency
Getting comfortableLevel 3-5Automation and expansion
Power userLevel 4-6Maximum efficiency

Chapter Summary

  • Understood the difference between vibe coding and traditional coding
  • Installed VS Code, Node.js, Git, and Claude Code
  • Created the LinkHub landing page
  • Learned prompt engineering techniques
  • Learned error handling methods
  • Discovered Claude Code usage levels

In the next chapter, we'll connect a database.

Chapter 2: Database →