back to home

dougdonohoe / ddphotos

A photo album site generator and SvelteKit viewer: resize JPEGs to WebP, generate JSON indexes, and serve a fast static photo gallery.

106 stars
4 forks
0 issues
GoSvelteTypeScript

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing dougdonohoe/ddphotos in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/dougdonohoe/ddphotos)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

DD Photos - Photo Album Website Motivation I was dissatisfied with photo sharing sites, especially Apple's iCloud shared albums, which typically take 20+ seconds to load. Other sites for sharing have their own irritations like cumbersome UIs, advertising, hawking of photo paraphernalia and social media distractions. I just want to share my photos with friends and family. I want it fast, easy, mobile friendly, and distraction free. Focus on the photos. So I built this, with help from Claude Code, and it is what is behind photos.donohoe.info. It's pretty good and meets my needs. Maybe it will meet yours too, which is why I've open-sourced it. **P.S.** _I wrote about building DD Photos in this Medium article._ Overview The site has a home page, with all of your albums and their description. You can easily switch between dark and light themes. Click/touch an album and you see a grid of all photos. Click/touch a photo to see the full size version and a caption, if it has one. You can easily swipe between photos (or use arrow keys on a laptop). It works great on mobile, tablet, and desktop. Here's what it looks like on a big display (see SCREENSHOTS.md for larger versions): How it Works The idea is that you already use _something else_ to curate and filter your photos. Maybe it is Adobe Lightroom Classic (my tool). Or maybe it is Apple Photos or Google Photos. It doesn't matter, but once you get a selection of photos that comprise an album, you export the photos into a folder. All the photos in a folder make up an album. It's that simple. You can create an optional file in each album folder to define captions for each photo. This file can also be used to define the album's sort order, if order-by-date isn't sufficient. With DD Photos, you define where your albums live in an file. In a separate you provide a short description of each album. Once you have defined where your photos live, you run the tool, which resizes the photos for web viewing and generates index files that the web app uses. That's it. Now, you can easily view your photo albums on your machine using the dev server. Finally, there is a build step which creates a static site that can easily be deployed to a machine that has a web server (like Apache) or theoretically something like AWS S3. No code runs on a server. No database is needed. It's just HTML, CSS, JavaScript and your (resized) photos. Key Features Website features: • Concise album cards with description, number of photos, date range and your choice of cover photo. • Album page has a nicely justified photo grid layout with PhotoSwipe lightbox that adjusts well to any screen size. • Keyboard support: arrow keys navigate in lightbox, ESC key exits lightbox and returns to home page from album page. • Optional per-photo descriptions via : used as image "alt" text, grid mouse-hover caption (desktop), always-visible caption (mobile), and lightbox caption. • Each album has a human-readable URL (e.g., ). • Each photo has a shareable permalink (e.g., ) accessible via a copy-to-clipboard button. • Dark/light theme toggle. • OpenGraph tags for rich link previews when sharing album or photo URLs on social media or messaging apps, using a JPEG version of the album cover photo as the preview image. Backend features: • Two efficient WebP image sizes created: (600px) and (1600px). • EXIF metadata extraction (dimensions, date) stored in JSON. • All image metadata stripped from WebP output (smaller files, no GPS leak). • Concurrent image resizing via goroutines (buffered channel, WaitGroup). • Dry-run mode by default (use to write files). • Optionally use to override sort order (default is by capture date). Tech Details The Go program ( ) resizes your photos to WebP format and generates the JSON index files ( , per-album ) that are consumed by the frontend. It also generates a file that identifies each album. The site (in , a Node.js app) is built with SvelteKit and statically generated. The HTML shell and assets are pre-built files served directly by a web server, with photo data fetched client-side from the static JSON indexes generated by . There are many ways to deploy a static site like this. It is somewhat outside the scope of this project to tackle all the various deployment strategies, but I may add more options in the future if there is interest. That said, I happen to already run an Apache server on an AWS EC2 instance that is fronted by CloudFront. Deployment for me is an to this server, and I've included the script which does this. My actual AWS setup is maintained in Terraform files in a private repo, but I provide some details in the README-DEV for those that are curious. Part of what makes my photos site fast is the use of the CDN and the fact that the site is entirely static. Prerequisites The following setup instructions are Mac-centric (via Homebrew). Linux should work with equivalent package manager commands ( , ). Windows users should use WSL2. The website is a Node.js app. Install nvm first if you don't already have it. You may also want to install Docker if you don't have it, as it is required for testing site behavior using Apache. Sample App Once you have the required software installed, you should be able to build and view the sample site provided within this repo (in the dir). You should see a message and a browser window should open at localhost:5173. You can also build the static site and test it in Apache (requires Docker and assumes has been run). You should be able to see the site at localhost:8080. **Congratulations!** Now that you've got the sample site working, you can work on your own albums. You can start first by adding to the sample config in . Or you can start building your own using the examples in . The sections below provide details about how everything works. Configuration There are three configuration files one needs to build a site: • - Defines your list of albums, an id for the site (useful if you have…