惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
L
LangChain Blog
Jina AI
Jina AI
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
S
Secure Thoughts
T
The Exploit Database - CXSecurity.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
C
Cyber Attacks, Cyber Crime and Cyber Security
Project Zero
Project Zero
T
Threat Research - Cisco Blogs
量子位
G
GRAHAM CLULEY
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
C
CERT Recently Published Vulnerability Notes
The Hacker News
The Hacker News
C
Cisco Blogs
Scott Helme
Scott Helme
Spread Privacy
Spread Privacy
宝玉的分享
宝玉的分享
V
V2EX
博客园 - 三生石上(FineUI控件)
T
Tor Project blog
P
Proofpoint News Feed
雷峰网
雷峰网
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Vulnerabilities – Threatpost
PCI Perspectives
PCI Perspectives
博客园_首页
L
LINUX DO - 最新话题
IT之家
IT之家
有赞技术团队
有赞技术团队
博客园 - Franky
Hacker News: Ask HN
Hacker News: Ask HN
Last Week in AI
Last Week in AI
The Cloudflare Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
美团技术团队
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
AWS News Blog
AWS News Blog
S
Security Affairs
T
Tailwind CSS Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Building a Full-Stack Habit Tracker with Claude Code - Part 2: Polish, Testing & Deployment
Anirban Maju · 2026-05-04 · via DEV Community

Building a Full-Stack Habit Tracker with Claude Code - Part 2: Polish, Testing & Deployment

Taking the habit tracker from MVP to production-ready with categories, analytics, comprehensive testing, and Vercel deployment

Welcome Back!

In [Part 1], we built a fully functional habit tracker MVP in about 6-8 hours using Claude Code as our AI pair programmer. We had:

  • ✅ Basic CRUD operations for habits
  • ✅ Date-based tracking
  • ✅ Dark/light theme toggle
  • ✅ localStorage persistence
  • ✅ Simple analytics

So continuing my learning journey with Claude as I will be covering below topics and how I used claude to plan and work on them

  • Improving the Site An 8-category organization system
  • Improving the Site Real-time summary cards with progress bars
  • Improving the Site Advanced analytics with streak tracking
  • Improving the Site Smart category filtering
  • Testing of the App using Playwright 170+ automated test cases
  • Deployment of the app Production deployment to Vercel

Let's ship this! 🚢

Phase 9: The Category System (Organization FTW)

After using the app for a few days, I realized tracking "Morning workout" and "Finish quarterly report" in the same list felt... wrong. They're completely different types of habits.

I asked Claude: "Help me add a category system to organize habits better."

Step 1: Define the Categories

Claude suggested creating a constants file:

// src/constants/categories.js
export const CATEGORIES = [
  { id: 'health', name: 'Health & Fitness', emoji: '💪' },
  { id: 'work', name: 'Work & Productivity', emoji: '💼' },
  { id: 'learning', name: 'Learning & Growth', emoji: '📚' },
  { id: 'personal', name: 'Personal Care', emoji: '🧘' },
  { id: 'social', name: 'Social & Family', emoji: '👥' },
  { id: 'finance', name: 'Finance & Money', emoji: '💰' },
  { id: 'hobbies', name: 'Hobbies & Fun', emoji: '🎨' },
  { id: 'other', name: 'Other', emoji: '📌' }
];

Enter fullscreen mode Exit fullscreen mode

Why this approach?

  • Centralized: One source of truth
  • Extensible: Easy to add more categories later
  • Type-safe: Could convert to TypeScript easily
  • Visual: Emojis make categories instantly recognizable

Step 2: Category Selector Component

// src/components/CategorySelector.js
import { CATEGORIES } from '../constants/categories';

function CategorySelector({ value, onChange }) {
  return (
    <div className="form-group">
      <label htmlFor="category">Category</label>
      <select
        id="category"
        value={value}
        onChange={onChange}
        className="form-select"
      >
        {CATEGORIES.map(cat => (
          <option key={cat.id} value={cat.name}>
            {cat.emoji} {cat.name}
          </option>
        ))}
      </select>
    </div>
  );
}

export default CategorySelector;

Enter fullscreen mode Exit fullscreen mode

Step 3: Update the Data Model

Our habit objects now include category:

{
  id: "1712345678901",
  habit: "Morning workout",
  date: "2026-04-08",
  category: "Health & Fitness",  // NEW!
  status: "Completed"
}

Enter fullscreen mode Exit fullscreen mode

Step 4: Category Filtering on Home Page

Here's where it got fun. I wanted users to filter habits by category:

// src/pages/Home.js
import { CATEGORIES } from '../constants/categories';

function Home({ habits, onAddHabit, onUpdateHabit, onDeleteHabit }) {
  const [selectedCategory, setSelectedCategory] = useState('All');

  // Filter habits based on selected category
  const filteredHabits = selectedCategory === 'All'
    ? habits
    : habits.filter(h => h.category === selectedCategory);

  return (
    <div className="home-page">
      {/* Add Habit Form */}
      <HabitForm onAddHabit={onAddHabit} />

      {/* Category Filter Buttons */}
      <div className="category-filter">
        <h3>Filter by Category:</h3>
        <div className="filter-buttons">
          <button
            className={selectedCategory === 'All' ? 'active' : ''}
            onClick={() => setSelectedCategory('All')}
          >
            🌐 All
          </button>

          {CATEGORIES.map(cat => (
            <button
              key={cat.id}
              className={selectedCategory === cat.name ? 'active' : ''}
              onClick={() => setSelectedCategory(cat.name)}
            >
              {cat.emoji} {cat.name}
            </button>
          ))}
        </div>
      </div>

      {/* Habit List (now filtered) */}
      <HabitList
        habits={filteredHabits}
        onEdit={onUpdateHabit}
        onDelete={onDeleteHabit}
      />
    </div>
  );
}

Enter fullscreen mode Exit fullscreen mode

The UX touches that made it feel polished:

  • Active button gets a different background color
  • Smooth transitions between filter states
  • Count updates automatically when filtering
  • Empty state shows helpful message

💡 Learning #6: Small UX touches (active states, smooth transitions) make a huge difference in perceived quality.

Phase 10: Summary Cards (At-a-Glance Progress)

I wanted users to see their progress immediately when opening the app. Claude helped me create a beautiful summary system.

The Vision

Four cards showing:

  1. 📅 Today's Progress (completed/total)
  2. 📊 This Week's completion rate
  3. 🔥 Active streaks count
  4. 🎯 Total unique habits

Step 1: Analytics Utility

// src/utils/homeSummaryAnalytics.js

// Get today's habits and completion
export const getTodayProgress = (habits) => {
  const today = new Date().toISOString().split('T')[0];
  const todayHabits = habits.filter(h => h.date === today);
  const completed = todayHabits.filter(h => h.status === 'Completed').length;

  return {
    completed,
    total: todayHabits.length,
    percentage: todayHabits.length > 0
      ? Math.round((completed / todayHabits.length) * 100)
      : 0
  };
};

// Get this week's completion rate
export const getWeekProgress = (habits) => {
  const now = new Date();
  const weekAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000);

  const weekHabits = habits.filter(h => {
    const habitDate = new Date(h.date);
    return habitDate >= weekAgo && habitDate <= now;
  });

  const completed = weekHabits.filter(h => h.status === 'Completed').length;

  return weekHabits.length > 0
    ? Math.round((completed / weekHabits.length) * 100)
    : 0;
};

// Count habits with active streaks
export const getActiveStreaks = (habits) => {
  // Group habits by name
  const grouped = groupHabitsByName(habits);

  // Count how many have current streaks > 0
  let activeStreaks = 0;

  for (const habitName in grouped) {
    const streak = calculateCurrentStreak(grouped[habitName]);
    if (streak > 0) activeStreaks++;
  }

  return activeStreaks;
};

// Count unique habit names
export const getTotalUniqueHabits = (habits) => {
  const uniqueNames = new Set(
    habits.map(h => h.habit.toLowerCase())
  );
  return uniqueNames.size;
};

Enter fullscreen mode Exit fullscreen mode

Step 2: StatCard Component

// src/components/StatCard.js
function StatCard({ icon, value, label, children }) {
  return (
    <div className="stat-card">
      <div className="stat-icon">{icon}</div>
      <div className="stat-content">
        <div className="stat-value">{value}</div>
        <div className="stat-label">{label}</div>
        {children}
      </div>
    </div>
  );
}

Enter fullscreen mode Exit fullscreen mode

Step 3: Progress Bar Component

For today's progress, I wanted a visual bar:

// src/components/ProgressBar.js
function ProgressBar({ percentage }) {
  return (
    <div className="progress-bar-container">
      <div
        className="progress-bar-fill"
        style={{ width: `${percentage}%` }}
      >
        <span className="progress-percentage">{percentage}%</span>
      </div>
    </div>
  );
}

export default ProgressBar;

Enter fullscreen mode Exit fullscreen mode

With some beautiful CSS:

/* src/styles/progress-bar.css */
.progress-bar-container {
  width: 100%;
  height: 24px;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid var(--border-color);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4a90e2 0%, #63b3ed 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.5s ease;
  min-width: 30px;
}

.progress-percentage {
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

Enter fullscreen mode Exit fullscreen mode

Step 4: Putting It All Together

// src/components/SummaryCards.js
import StatCard from './StatCard';
import ProgressBar from './ProgressBar';
import {
  getTodayProgress,
  getWeekProgress,
  getActiveStreaks,
  getTotalUniqueHabits
} from '../utils/homeSummaryAnalytics';

function SummaryCards({ habits }) {
  const todayProgress = getTodayProgress(habits);
  const weekProgress = getWeekProgress(habits);
  const activeStreaks = getActiveStreaks(habits);
  const totalHabits = getTotalUniqueHabits(habits);

  return (
    <div className="summary-cards">
      <StatCard
        icon="📅"
        value={`${todayProgress.completed}/${todayProgress.total}`}
        label="Today's Progress"
      >
        <ProgressBar percentage={todayProgress.percentage} />
      </StatCard>

      <StatCard
        icon="📊"
        value={`${weekProgress}%`}
        label="This Week"
      />

      <StatCard
        icon="🔥"
        value={activeStreaks}
        label="Active Streaks"
      />

      <StatCard
        icon="🎯"
        value={totalHabits}
        label="Total Habits"
      />
    </div>
  );
}

Enter fullscreen mode Exit fullscreen mode

The Result:

Users now see their progress the instant they open the app. No scrolling, no clicking - just immediate feedback.

💡 Learning #7: Summary metrics should answer the question "How am I doing?" in under 2 seconds.

Phase 11: Restructuring for Deployment

After building all these features, my project structure was getting messy. Claude suggested reorganizing:

# Before: Everything in a subdirectory
habit-tracker/
  habit-tracker/
    src/
    public/
    package.json
  README.md

# After: Clean root structure
habit-tracker/
  src/
  public/
  package.json
  README.md
  vercel.json    # NEW!

Enter fullscreen mode Exit fullscreen mode

Why? Deployment platforms like Vercel expect your project at the repository root.

The migration:

# Move everything up one level
mv habit-tracker/* .
mv habit-tracker/.gitignore .
rmdir habit-tracker

# Commit the restructure
git add .
git commit -m "Restructure repository for easier deployment"

Enter fullscreen mode Exit fullscreen mode

💡 Learning #8: Plan your folder structure with deployment in mind from day one.

Phase 12: Deploying to Vercel

Time to ship! 🚀

Step 1: Create vercel.json

This crucial file tells Vercel how to handle React Router:

{
  "rewrites": [
    {
      "source": "/(.*)",
      "destination": "/index.html"
    }
  ]
}

Enter fullscreen mode Exit fullscreen mode

Why is this needed?

Single-page apps (SPAs) need all routes to point to index.html so React Router can handle them. Without this, direct navigation to /trends would 404.

Step 2: Deploy via Vercel CLI

# Install Vercel CLI
npm install -g vercel

# Login to Vercel
vercel login

# Deploy!
vercel

# Follow the prompts:
# - Set up new project? Yes
# - Link to existing project? No
# - Project name: habit-tracker
# - Which directory? ./
# - Override settings? No

# Deploy to production
vercel --prod

Enter fullscreen mode Exit fullscreen mode

30 seconds later: My app was live at habit-tracker.vercel.app 🎉

Step 3: Configure Auto-Deploy

Connected my GitHub repo to Vercel:

  1. Went to vercel.com dashboard
  2. Connected GitHub account
  3. Imported the repository
  4. Set build settings:
    • Build Command: npm run build
    • Output Directory: build
    • Install Command: npm install

Now every push to main automatically deploys. Every PR gets a preview URL. Magic! ✨

💡 Learning #9: Vercel's free tier is ridiculously good for React apps. No excuses not to ship!

Phase 13: Comprehensive Testing with Playwright MCP

Here's where things got really interesting. I wanted to make sure the app actually worked before sharing it with the world.

I asked Claude: "Help me create a comprehensive testing strategy for this app."

What is Playwright MCP?

Playwright is a browser automation tool, and MCP (Model Context Protocol) integrates it directly with Claude Code. This means Claude can:

  • Navigate the actual running app in a browser
  • Take screenshots and accessibility snapshots
  • Interact with UI elements
  • Capture console logs and network requests
  • Generate detailed test reports

The Testing Process

# Start the dev server
npm start
# App running at http://localhost:3001

# Claude Code connects via Playwright MCP
# Opens browser, starts analyzing...

Enter fullscreen mode Exit fullscreen mode

Claude methodically:

  1. ✅ Navigated to every page
  2. ✅ Tested every form input
  3. ✅ Checked all filters
  4. ✅ Verified localStorage persistence
  5. ✅ Tested theme switching
  6. ✅ Validated responsive design
  7. ✅ Checked accessibility

The Generated Test Report

Claude produced UI_TEST_REPORT.md - a 2,270-line comprehensive test plan documenting:

  • 170+ test cases across 14 functional areas
  • Priority levels (High/Medium/Low)
  • Detailed test steps and expected results
  • Recommended testing strategies
  • Automation guidelines

Here's a sample:

**TC-FORM-013:** Verify habit is added when form is submitted with valid data
**Priority:** High | **Type:** Functional | **Automation:** Yes

**Steps:**
1. Enter "Morning workout" in habit field
2. Select category "Health & Fitness"
3. Select status "Completed"
4. Click "Add Habit"

**Expected Result:** Habit is created and appears in habit list

---

**TC-STORAGE-003:** Verify habits persist after page refresh
**Priority:** High | **Type:** Integration | **Automation:** Yes

**Steps:**
1. Add multiple habits
2. Press F5 to refresh
3. Verify all habits still appear

**Expected Result:** Habits remain after refresh

Enter fullscreen mode Exit fullscreen mode

Test Coverage Summary

Feature Area Test Cases Priority
Navigation 7 High
Theme Toggle 7 Medium
Add Habit Form 20 High
Habit List Display 18 High
Summary Cards 12 High
Category Filter 10 High
Edit Habit 11 High
Delete Habit 6 High
LocalStorage 8 High
Trends Page 14 Medium
Accessibility 7 High
Integration/E2E 6 High

Total: 170+ test cases

Generated Artifacts

Claude created a .playwright-mcp/ directory with:

  • Page snapshots (accessibility trees)
  • Console log captures
  • Network request logs
  • Screenshots at various breakpoints

💡 Learning #10: AI-powered testing can generate comprehensive test plans faster than any human.

Phase 14: Documentation

The final piece: making the project maintainable and shareable.

README.md

Claude helped me create a comprehensive README covering:

  1. Features overview - What the app does
  2. Tech stack - What it's built with
  3. Development journey - How we built it (perfect for blog posts!)
  4. Getting started - Installation and running
  5. Deployment guide - How to ship it
  6. Testing strategy - How to validate it
  7. Project structure - Where everything lives
  8. Future enhancements - What's next

CLAUDE.md

I also created project-specific instructions for future Claude Code sessions:

# CLAUDE.md

This file provides guidance to Claude Code when working with this repository.

## Project Structure
- React 19 with Create React App
- Client-side routing with React Router DOM
- localStorage for persistence (no backend)
- CSS custom properties for theming

## Key Conventions
- Components use functional components with hooks
- Styles use CSS modules, NOT Tailwind or styled-components
- Date format: ISO (YYYY-MM-DD)
- Always update Navigation.js when adding new pages

## Testing
- 170+ test cases documented in UI_TEST_REPORT.md
- Use React Testing Library for unit tests
- Playwright for E2E tests

## Deployment
- Vercel auto-deploys from main branch
- vercel.json is required for React Router support

Enter fullscreen mode Exit fullscreen mode

Why this matters: Future Claude sessions (or human developers!) can understand the project instantly.

💡 Learning #11: Good documentation is a gift to your future self.

The Final Stats

After two days of development with Claude Code:

What We Built:

  • ✅ Full-featured habit tracker
  • ✅ 8-category organization system
  • ✅ Real-time analytics and trends
  • ✅ Summary cards with progress bars
  • ✅ Category filtering
  • ✅ Dark/light themes
  • ✅ 100% responsive design
  • ✅ localStorage persistence
  • ✅ Production deployment
  • ✅ 170+ documented test cases
  • ✅ Comprehensive documentation

The Numbers:

  • Lines of Code: ~3,500
  • Components: 15
  • Pages: 3
  • Test Cases Documented: 170+
  • Files Created: 47
  • Time Spent: ~12-15 hours total
  • Time Saved vs Solo: Estimated 70-80%

Repository Structure:

habitTracker/
├── .playwright-mcp/          # Test artifacts
├── public/                   # Static assets
├── src/
│   ├── components/          # 15 reusable components
│   ├── constants/           # Category definitions
│   ├── hooks/               # Custom hooks (theme)
│   ├── pages/               # 3 route pages
│   ├── styles/              # 4 CSS files
│   └── utils/               # Analytics functions
├── CLAUDE.md                # AI instructions
├── README.md                # Comprehensive docs
├── UI_TEST_REPORT.md        # 170+ test cases
├── blog-part-1.md           # This blog post!
├── blog-part-2.md           # This blog post!
└── vercel.json              # Deployment config

Enter fullscreen mode Exit fullscreen mode

Key Takeaways: Working with Claude Code

After building this entire app with AI pair programming, here are my insights:

✅ What Claude Code Excelled At

  1. Boilerplate Elimination: No more typing import React from 'react' a hundred times
  2. Architecture Suggestions: Claude's patterns were consistently better than my first instincts
  3. Comprehensive Testing: Generated 170+ test cases I wouldn't have thought of
  4. Documentation: Created better docs than I would have written alone
  5. Learning Tool: Every suggestion came with explanations

⚠️ Where I Still Had to Think

  1. Product Decisions: What features to build and when
  2. UX Design: The "feel" of the app
  3. Code Review: Reading and validating everything
  4. Architecture Strategy: High-level decisions about structure
  5. Debugging Edge Cases: Some bugs required human intuition

🎯 The Optimal Workflow

I found this rhythm worked best:

1. Describe what I want ("Add a progress bar to today's stats")
2. Let Claude write initial implementation
3. Review and test the code
4. Ask questions about anything unclear
5. Request refinements ("Make the animation smoother")
6. Validate the final result
7. Move to next feature

Enter fullscreen mode Exit fullscreen mode

Time ratio:

  • 30% describing what I want
  • 10% waiting for Claude to write code
  • 40% reviewing and testing
  • 20% refining and polishing

Real Talk: Is AI Replacing Developers?

What used to be:

  • 80% writing code
  • 20% thinking about architecture

Is becoming:

  • 30% writing code
  • 70% thinking about architecture, UX, and product decisions

Claude Code didn't replace my job as a developer. It elevated it. I spent more time on:

  • User experience decisions
  • Feature prioritization
  • Design polish
  • Testing strategy
  • Documentation quality

And less time on:

  • Typing boilerplate
  • Looking up syntax
  • Fighting with CSS
  • Writing repetitive tests

The result? A better app, built faster, with more thorough testing.

Resources & Links

Tools Used:

With Claude Code, I:

  • ✅ Built a production app in 2 days instead of 2 weeks
  • ✅ Learned new React patterns and best practices
  • ✅ Generated comprehensive testing documentation
  • ✅ Created better docs than I would have alone
  • ✅ Shipped a polished product I'm proud of

But I also:

  • ✅ Made every product decision
  • ✅ Designed the user experience
  • ✅ Reviewed every line of code
  • ✅ Tested everything thoroughly
  • ✅ Brought the creative vision to life

What did you think of this series? Drop a comment below!

Want to see more builds like this? Follow me for future AI-powered projects.

Questions about the code or process? Ask away - I'll respond to everyone!


Thank you for reading! 🙏

If you found this valuable:

  • ❤️ Leave a reaction
  • 💬 Share your thoughts in the comments
  • 🔖 Bookmark for later
  • 📱 Share with your dev friends

Happy coding! 💻

AI #React #WebDev #Testing #Deployment #ClaudeCode #ProductivityTools #Tutorial


Built with Claude Code, deployed on Vercel, documented for the community. This is the way.