← All work
Case study · Platform · 2026

GOAR Photography

I shoot sports, band and events around Tampa Bay. Rather than keep paying for a gallery service I couldn't brand, I built my own platform: portfolio, private client galleries, and photo sales.

Role
Owner, photographer and developer. I'm also the client.
Timeline
First commit Oct 20, 2026 → live Oct 22 → sales Oct 23
Stack
Astro 7, Cloudflare Pages, R2, D1, Stripe
Links
goarphotography.com ↗
goarphotography.com
GOAR Photography portfolio: an edge-to-edge justified grid of baseball, football and marching band photos, with category filters
The portfolio is the home page: a justified, edge-to-edge grid with category filters.
The portfolio on a phone, with a Find your gallery search box above the photos
Parents mostly arrive on a phone, looking for their gallery.
01

The problem

My clients are mostly parents: teams, bands and families who want to find their photos quickly, on a phone, after a game or a competition. A band competition is the hard case: one long day, hundreds of photos, and a dozen or more bands whose families each want only their own.

I started on SmugMug, but the plan that let me brand the galleries cost about $282 a year, and the cheaper plan couldn't be branded at all. Either way, clients were sent off to someone else's site. On October 22, two days into building a portfolio site that indexed SmugMug, I decided to move client galleries onto my own site instead.

Requirements:

  • a fast portfolio that shows the work the way I'd frame it,
  • password-protected galleries clients open on my domain and never leave,
  • a way to split one competition shoot into a gallery per band without hand-sorting,
  • photo sales and downloads, and
  • an admin I can run from my phone at the venue.
02

My role

Everything: photographer, product owner, designer of the workflow, and developer. I built it with Claude Code as my pair programmer, working from a written brief and decision log that I kept in the repo. That's 64 commits over nine days, with decisions dated as they were made so they weren't relitigated.

I decided what to build, made the calls on cost, privacy and workflow, ran the accounts and DNS, and tested each feature against real shoots. The working rules I set included "never invent stats, testimonials or client names," which this case study follows as well.

03

Stack

Site

Astro 7TypeScript (strict)Plain CSS

Static pages and no front-end framework. Only two runtime dependencies: Astro and sharp.

Edge + data

Cloudflare Pages FunctionsD1 (SQLite)R2HTMLRewriter

R2 holds web-sized copies (public) and full-resolution originals (private). D1 holds galleries, photos, orders and stats.

Payments + email

Stripe CheckoutResendEmail Routing Worker

Stripe is called with plain fetch, with no SDK.

Imports

SmugMug API v2OAuth 1.0asharp

The original SmugMug sync, now switched off. It's kept as a future import path.

04

Architecture

The site builds as static HTML, so it's fast and cheap to serve. The parts that change, like portfolio picks, galleries and orders, live in D1 and are filled in at the edge on each request, so I never wait for a rebuild after an upload.

05

Key features

goarphotography.com/galleries
Galleries index with category filters and cover photos for an event gallery and a baseball gallery
Gallery index with filters and search. A band competition shows as one event; searching a band's name goes straight to that band.
goarphotography.com/book
Book a shoot form with name, email, type of shoot, date and details
Booking requests go to my inbox through a Cloudflare Email Worker, with Resend as a fallback.
  • Event sorterUpload a whole competition once, and it's split into per-band galleries by capture time and the pasted performance schedule.
  • Private galleries and eventsPassword-protected, no accounts. One event password opens all of its band galleries, and there's a "Find your band" box.
  • LightboxKeyboard, swipe and pinch-zoom up to 4× (which loads the 2048 px copy), with deep links to any photo via ?photo=.
  • Photo salesCart, Stripe Checkout, watermarking on sale galleries, a purchase page, refunds from the admin, and Stripe keys set up from Settings.
  • Save to Photos on phones"Save all" uses the share sheet in groups of 10, preparing the next group in the background so each tap works.
  • Portfolio arrangerDrag-and-drop ordering that previews the real layout at desktop and phone widths before publishing.
  • Duplicate and re-edit detectionExact duplicates are skipped. A re-exported edit updates the photo in place, keeping its spot, cover status and sales. Matching uses capture time from a dependency-free EXIF parser.
  • QR cards and short linksA built-in QR encoder makes printable cards. goar.photo short links resolve to the right gallery or photo.
  • Admin dashboardA "needs you" list, galleries, orders, activity charts and settings, usable from a phone at the venue.
06

Hard problems

One shoot, one gallery per band

At a competition, bands perform back to back and I'm shooting the whole time. Sorting hundreds of photos by hand afterwards is the job nobody wants.

The sorter starts a new group at a break in capture time (4 minutes by default), wherever the pasted schedule moves to the next performer, or where I click. It estimates the camera clock's offset from the bursts across the whole shoot, and names each group after the band whose slot holds most of its photos. The schedule parser copes with a PDF table that pastes as one flattened line of text; a real competition's schedule parsed all 20 rows.

src/lib/sorter.ts
dated.forEach((p, i) => {
  const s = slotOf(p.ms);
  let split = i === 0;
  if (i > 0 && !o.joins?.has(p.id)) {
    const prev = dated[i - 1];
    split = o.splits?.has(p.id)
      || (p.ms - prev.ms) / 60000 >= o.gap
      || (sl !== null && s !== slotOf(prev.ms));
  }
  ...

An image pipeline with no image service

Paying for an image CDN would undo the point of leaving SmugMug. So the browser does the resizing: the admin dashboard makes 1024 px and 2048 px copies on a canvas before upload, halving the size in steps so the result stays sharp. Uploads retry and give up cleanly if they stall.

Galleries with downloads turned off only ever send the 1024 px copy. Originals come out of private storage only through the download endpoint, after the gallery is unlocked.

Admin dashboard, upload step
// step down by halves for a sharper result
while (w / 2 > tw) {
  const c = document.createElement('canvas');
  c.width = Math.round(w / 2);
  c.height = Math.round(h / 2);
  const cx = c.getContext('2d')!;
  cx.imageSmoothingQuality = 'high';
  cx.drawImage(src, 0, 0, c.width, c.height);
  src = c; w = c.width; h = c.height;
}

Live content on a static site

I wanted static HTML for speed, and I also wanted portfolio changes to show up the moment I make them. The home page is built once, and a Pages Function uses Cloudflare's streaming HTMLRewriter to insert the current tiles from D1 into the grid on each request. If the database is unavailable, visitors still get the built page.

functions/index.ts
const out = new HTMLRewriter()
  .on('#portfolio-grid', {
    element(el) {
      if (!tiles.count && showSmugmug) return;
      if (showSmugmug) el.prepend(tiles.html, { html: true });
      else el.setInnerContent(tiles.html, { html: true });
    },
  })
  .transform(page);

Private galleries without accounts, payments without an SDK

Parents shouldn't need to create an account to see their kid's photos. A correct password sets a signed, HTTP-only cookie that's tied to the gallery's current password, so changing the password locks out old links, and wrong guesses are rate-limited.

Payments use Stripe Checkout, called with plain fetch. The webhook signature is checked in constant time against a short time window, and fulfilment is idempotent because the webhook and the buyer's success page race each other. The original SmugMug integration needed OAuth 1.0a request signing, written from the RFC and tested against a published reference vector.

07

Results

2 days
From first commit to live on goarphotography.com
64
Commits in 9 days: galleries, events, sales, refunds, security
2
Runtime dependencies
~$282
A year in SmugMug fees it was built to replace

The site went live on October 22, 2026. Client galleries, multi-band events and photo sales followed within days, and a security pass on October 26 added a content security policy, HSTS and password-guessing limits. Clients now get a gallery on my domain, with my branding, that works the way parents actually use it: on a phone, looking for one band or one player.

Paying for software that doesn't fit how you work?

I build focused tools that replace the subscription and fit the workflow you already have.

Let's talk →Visit the site ↗
← Previous case studybsbl.io Next case study →East Lake Classic