Building a High-Performance Static Photo Gallery with Go, SvelteKit, and Claude Code
These articles are AI-generated summaries. Please check the original sources for full details.
I Ditched iCloud Photo Sharing and Built My Own (with an AI partner)
Doug Donohoe developed DD Photos to solve iCloud’s 26-second load times on 300 Mbps fiber connections. The system utilizes a Go-based CLI tool and a statically generated SvelteKit frontend to achieve near-instantaneous photo delivery.
Why This Matters
Technical debt in trillion-dollar platforms like iCloud results in egregious latency, forcing engineers to return to static file delivery for performance. This project demonstrates that while AI-assisted development can accelerate specialized tool creation, it still requires senior-level oversight to manage context limitations and architectural integrity.
Key Insights
- Performance Benchmarks: iCloud shared albums were timed taking 26+ seconds to load on a 300 Mbps fiber connection.
- Static Architecture: DD Photos uses a Go CLI tool (photogen) to resize JPEGs to WebP and generate JSON index files, eliminating request-time dynamic processing.
- Privacy Engineering: Implements password-protected albums using in-browser decryption via the Web Crypto API, ensuring passwords never reach the server.
- AI Productivity: Claude Code acted as a force multiplier, allowing a developer to move from the first commit to a live URL for friends and family in two days.
- AI Limitations: Claude lacks cross-session memory and can produce up to 80% code duplication in complex logic without human-led refactoring.
Working Examples
Execution command for the Go-based CLI tool to process images and generate indexes.
go run cmd/photogen/photogen.go -resize -index -clean -doit
Setup and local deployment steps for the DD Photos repository.
git clone https://github.com/dougdonohoe/ddphotos
cd ddphotos
brew install go vips pkg-config
go mod download
make web-nvm-install && make web-npm-install
make sample-photogen
make sample-npm-run-dev
Practical Applications
- Static Site Deployment: Use rsync to Apache/EC2 or aws s3 sync to S3+CloudFront for hosting images as simple files without a database. Pitfall: Failing to strip EXIF metadata can lead to GPS location leaks.
- AI-Assisted Prototyping: Utilize Claude Code for rapid implementation of unfamiliar stacks like SvelteKit. Pitfall: AI often declares victory without writing failing tests first, requiring explicit developer prompting.
References:
Continue reading
Next article
llmwiki: Solving the LLM Context-Switch Tax with Persistent Project Memory
Related Content
AI Will Generate Code For You
AI-assisted coding tools are changing software development, with GitHub Copilot leading the way in adoption rates.
Automated Documentation: Using Goose AI Agent to Ship 55 Pages in 4 Days
Technical writer Debbie O'Brien utilized the open-source Goose AI agent to generate 55 pages of documentation and 59 screenshots in just four days.
Building ReplyAI: Rapid Prototyping an AI Customer Support Widget with Claude
Developer Joy Barua built ReplyAI, a documentation-aware AI customer support widget featuring a one-line install, in just two days.