Skip to content

Claude Code Setup

AI Velocity Exclusive

Claude Code package is exclusive to AI Velocity tier.

Complete Claude Code integration following Anthropic's official best practices.

Quick Start

Bash
# 1. Install Claude Code
curl -fsSL https://claude.ai/install.sh | sh

# 2. Navigate to project
cd craftyourstartup-boilerplate

# 3. Start Claude
claude

# 4. Try a custom command
/new-api-endpoint GET /api/users/{id}/stats returns user statistics

Claude automatically reads CLAUDE.md and loads project context.

What's Included

CLAUDE.md (~400 lines)

Comprehensive project context file containing:

  • Project Overview: Stack, architecture, clean architecture pattern
  • Common Bash Commands: Poetry, Task, Docker, Database, Testing
  • Core Files: Directory structure, key files explained
  • Code Style Guidelines: Python & TypeScript standards
  • Testing Instructions: pytest & vitest patterns
  • Stripe Integration Patterns: Payment feature development
  • Analytics Extension Patterns: Adding analytics
  • Common Pitfalls: Important notes & gotchas
  • MUI Theming: Theme system conventions
  • RBAC Usage: Permission checking patterns
  • Development Workflow: API development, migrations, client generation

View CLAUDE.md in project root

.claude/settings.json

Pre-configured tool permissions:

JSON
1
2
3
4
5
6
7
8
9
{
  "allowedTools": [
    "Edit",
    "Bash(poetry:*)",
    "Bash(task:*)",
    "Bash(git commit:*)",
    ...
  ]
}

Safe commands auto-approved, destructive commands require confirmation.

.claude/commands/ (6 Custom Commands)

  1. /new-api-endpoint - Generate complete FastAPI endpoint
  2. /new-component - Create React component with MUI
  3. /add-payment-feature - Extend Stripe integration
  4. /create-migration - Generate database migration
  5. /run-tests - Execute test suite
  6. /fix-lint - Auto-fix linting issues

Custom Commands Reference

Using Claude Code

Basic Workflow

Bash
# Start Claude
claude

# Ask questions
"How does authentication work in this project?"
"Where is the payment webhook handler?"

# Generate code
/new-api-endpoint GET /api/articles/{id}/analytics
/new-component ArticleStatsCard displays article metrics

# Run tasks
/run-tests
/fix-lint

# Get help
"What custom commands are available?"

Power Features

Multi-Claude Workflow:

Bash
# Terminal 1: Backend development
cd backend-feature
claude
# "Implement user notification system"

# Terminal 2: Frontend development
cd frontend-feature  
claude
# "Create notification UI components"

# Terminal 3: Testing
claude
# "Write integration tests for notifications"

Headless Mode (automation):

Bash
1
2
3
4
5
# Auto-fix linting in CI
claude -p "Fix all linting errors" --allowedTools Edit

# Generate migration
claude -p "Create migration for adding email_verified field"

CLAUDE.md Contents

Key Sections:

Project Overview (40 lines): - Full-stack SaaS boilerplate - Stack: FastAPI, React, Stripe, etc. - Architecture overview

Common Commands (100 lines): - Development: poetry, task, npm - Database: migrations, superuser creation - API client generation - Testing & linting

Core Files (80 lines): - Backend structure (app/) - Frontend structure (frontend/src/) - Configuration files

Code Style (120 lines): - Python patterns (async, type hints, naming) - TypeScript patterns (React.FC, hooks, error handling)

Important Notes (40 lines): - ALWAYS use AsyncSession - NEVER commit sensitive data - ALWAYS regenerate API client after backend changes - Common pitfalls

Read full CLAUDE.md in project root

Customizing CLAUDE.md

  1. Edit CLAUDE.md in project root
  2. Add project-specific patterns
  3. Document custom commands
  4. Add common gotchas

Tip: Keep under 500 lines for optimal performance.

Files Location

  • CLAUDE.md - Root level
  • .claude/settings.json - Permissions
  • .claude/commands/ - Custom slash commands
  • docs/claude-workflows/getting-started.md - Detailed guide