Using Claude AI for Development¶
Goldplated Photos was built with Claude AI assistance and includes comprehensive documentation for AI-assisted development.
What is Claude Code?¶
Claude Code is Anthropic's AI-powered coding assistant that runs in your terminal. It can:
- Read and understand your codebase
- Write and modify code
- Run commands and tests
- Explain complex code
- Debug issues
Getting Started¶
1. Install Claude Code¶
# Install via npm
npm install -g @anthropic-ai/claude-code
# Or via Homebrew (macOS)
brew install claude-code
2. Navigate to Project¶
3. Start Claude Code¶
Claude will automatically read CLAUDE.md and understand the project structure.
The CLAUDE.md File¶
The project includes a comprehensive CLAUDE.md file that provides:
- Development Commands - All npm scripts and their purposes
- Architecture Overview - How the application is structured
- Component Documentation - What each component does
- API Endpoints - All routes with parameters and responses
- Important Patterns - Coding conventions and gotchas
- Troubleshooting - Common issues and solutions
This file serves as context for Claude, enabling it to provide accurate, project-specific assistance.
Example Workflows¶
Adding a New Feature¶
You: I want to add a slideshow mode to the photo grid
Claude: I'll help you add a slideshow mode. Let me first check the
existing view modes in PhotoGrid.astro...
[Claude reads the relevant files and suggests implementation]
Debugging an Issue¶
You: The thumbnails aren't loading for some albums
Claude: Let me investigate the thumbnail generation system. I'll check
the API endpoint and the cache directory...
[Claude traces the issue through the codebase]
Understanding Code¶
You: How does the password protection work?
Claude: The password protection uses Server-Side Rendering (SSR). Let
me walk you through the flow...
[Claude explains the authentication flow with code references]
Best Practices¶
Be Specific¶
Instead of:
Try:
Reference Files¶
Ask for Verification¶
Request Tests¶
What Claude Does Well¶
- Code Navigation - Finding relevant files and functions
- Pattern Matching - Following existing code conventions
- Documentation - Writing clear comments and docs
- Debugging - Tracing issues through the codebase
- Refactoring - Improving code structure safely
Limitations¶
- External APIs - May need to verify current API documentation
- Complex State - May need guidance on application-specific state
- Design Decisions - Works best with clear requirements
- Testing - May need help setting up test environments
Contributing with Claude¶
When contributing to Goldplated Photos:
- Start Fresh - Begin a new Claude session for each feature
- Provide Context - Explain what you're trying to achieve
- Review Changes - Always review Claude's suggestions before committing
- Test Thoroughly - Run the dev server and verify functionality
- Update CLAUDE.md - If you add new features, update the documentation
Keeping CLAUDE.md Current¶
If you add significant features:
- Document new components in the appropriate section
- Add new API endpoints to the reference
- Update troubleshooting if you discover common issues
- Note any new patterns or conventions
This ensures future developers (and Claude) can effectively work with your additions.
Resources¶
AI-assisted development is the future. We're building it openly.