# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

This is a SwiftUI iOS application called "vibes" that follows a design-focused development approach with integration to Figma via MCP (Model Context Protocol). The project emphasizes creating reusable, responsive SwiftUI components with attention to visual polish and user experience.

## Build and Development Commands

### Building and Testing
- **Build**: Use Xcode's build system (⌘+B) or `xcodebuild -project vibes.xcodeproj -scheme vibes build`
- **Run Tests**: Use Xcode's test runner (⌘+U) or `xcodebuild test -project vibes.xcodeproj -scheme vibes -destination 'platform=iOS Simulator,name=iPhone 15'`
- **Code Formatting**: SwiftFormat is integrated via Swift Package Manager for consistent code style

### Testing Framework
- Uses Swift Testing framework (not XCTest) - note the `import Testing` and `@Test` syntax
- Test files are in `vibesTests/` directory
- Example test structure available in `vibesTests/vibesTests.swift:13`

## Architecture and Code Organization

### Main Structure
- **App Entry Point**: `vibes/vibesApp.swift:11` - Standard SwiftUI App structure
- **Main View**: `vibes/ContentView.swift:10` - Primary content view with preview support
- **Constants**: `vibes/Constants.swift:10` - Centralized color and styling constants

### Design System Integration
- Figma integration via Claude MCP for design-to-code workflow
- Reusable component approach emphasized
- Constants file established for consistent styling (e.g., `BorderPrimary` color)

### Key Dependencies
- **Figma Code Connect**: Integration for design handoff workflow
- **SwiftFormat**: Code formatting and style consistency
- **Swift Argument Parser**: Command-line argument handling
- **Swift Syntax**: Swift AST manipulation

### File Organization Recommendations
Based on the swift.md guide, follow this structure:
```
/vibes
├── Components/          # Reusable SwiftUI components
├── Views/              # Screen-level views
├── Assets.xcassets/    # Images, colors, icons
├── Utils/              # Extensions and custom modifiers
└── Constants.swift     # Centralized styling constants
```

### Development Guidelines
- Prioritize component reusability and modularity
- Use meaningful naming conventions for assets: `[Context]/[AssetType]_[Name]`
- Implement responsive layouts using GeometryReader, ViewThatFits, and LayoutPriority
- Add subtle animations that enhance UX without distraction
- Maintain design-code consistency via Figma MCP integration

### Memory
- Always refer to the swift.md before doing something