Portfolio for my photos https://photos.schmelczer.dev/
  • TypeScript 51.3%
  • JavaScript 34.5%
  • SCSS 9.6%
  • HTML 4.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
renovate-bot 2c6d68882f
All checks were successful
Check & deploy / validate (pull_request) Successful in 1m45s
Check & deploy / deploy (pull_request) Has been skipped
Update dependency globals to v17
2026-11-10 21:08:46 +00:00
.forgejo/workflows Publish the validated Pages artifact without duplicate transfers 2026-11-10 21:01:55 +00:00
e2e Allow linking to individual images 2026-11-07 09:29:46 +00:00
public TIdy up 2026-05-31 13:06:47 +01:00
scripts Reuse published photo variants and deploy the validated build 2026-11-10 20:55:14 +00:00
src Fix Photos CI formatting and restore the portfolio link 2026-11-10 20:23:32 +00:00
.gitignore Clean up 2026-05-31 14:29:43 +01:00
.nvmrc Update all non-major dependencies (#14) 2026-10-31 11:30:06 +00:00
.prettierrc Line-endings 2026-05-31 09:56:07 +01:00
eslint.config.js Clean up 2026-05-31 11:13:13 +01:00
package-lock.json Update dependency globals to v17 2026-11-10 21:08:46 +00:00
package.json Update dependency globals to v17 2026-11-10 21:08:46 +00:00
playwright.config.ts Reuse published photo variants and deploy the validated build 2026-11-10 20:55:14 +00:00
README.md Publish the validated Pages artifact without duplicate transfers 2026-11-10 21:01:55 +00:00
renovate.json Add renovate.json 2026-09-19 13:58:46 +00:00
stylelint.config.js TIdy up 2026-05-31 13:06:47 +01:00
tsconfig.json Clean up 2026-05-31 11:13:13 +01:00
vite.config.ts Migrate to vite 2026-05-31 13:23:10 +01:00
vitest.config.ts Reuse published photo variants and deploy the validated build 2026-11-10 20:55:14 +00:00

Photos

A static, progressively enhanced photo portfolio for András Schmelczer.

Requirements

  • Node 22.13.0 or newer compatible with .nvmrc
  • npm 10.9.0 or newer

Install with:

npm ci

Development

npm run dev

The dev server binds to 127.0.0.1 by default. This generates responsive image assets and the typed photo manifest before Vite starts.

Build

npm run build

The build writes to dist/. Static files come from public/, and responsive photo assets are generated into public/static/photos/.

Quality Gates

Run the full local validation suite with:

npm run lint:check

This checks formatting, type-checks, lints TypeScript and SCSS, checks source photos for EXIF/XMP/IPTC metadata, and validates the photo catalog against src/pictures/. Image encoding runs separately as part of the build.

Run unit tests separately:

npm test

Use npm run lint to apply Prettier formatting and auto-fixable ESLint/Stylelint issues.

End-to-end smoke tests are available separately:

npm run test:e2e

Playwright requires a browser installation. CI installs Chromium before running the smoke test.

Photo Catalog

Photo order, captions, and alt text live in src/photo-catalog.json. Add new source JPEGs to src/pictures/, then add a matching catalog entry. npm run dev, npm run lint:check, and npm run build validate that the catalog and source directory match.

The generated files under src/generated/ and public/static/photos/ are intentionally ignored because they are reproducible from the source images and catalog.

CI sets PHOTO_ASSET_CACHE_URL=https://photos.schmelczer.dev/static/photos/ to reuse published image variants. Filenames include a hash of the source photo and encoding settings, so changed photos or settings produce new files. Downloads are checked for image format and dimensions and saved atomically. Missing variants are encoded locally with the same quality settings. Builds without this variable work offline; a clean build encoding every photo can take around 25 minutes on the two-core runner. The generator reports progress for each photo.

Photo selections use #photo=<id> links, where the ID comes from the source filename rather than its position or generated asset hash. Selecting a thumbnail or using the arrow, Home, or End keys updates the URL; thumbnails can also be copied or opened in another tab. Reloading or opening a photo link selects that photo with the slideshow paused. Back and Forward restore selections, and automatic slideshow advances replace the current URL without adding history entries. Missing or unknown IDs fall back to the first photo.

The header's Portfolio link returns to https://schmelczer.dev/. Without JavaScript, thumbnails still link directly to photo assets.

Metadata

Source photos should not contain private EXIF/XMP/IPTC metadata. Check with:

npm run lint:check

Strip metadata with:

node scripts/strip-image-metadata.mjs

Review image changes after stripping because this rewrites the JPEG files.

Deployment

The Forgejo workflow validates pull requests and trusted pushes with npm ci, npm run lint:check, npm test, npm run build, and a Playwright smoke test. CI previews the existing build for the smoke test instead of rebuilding. Trusted human pushes to main upload the validated dist/ once as pages-deploy-0. The deploy job confirms that artifact exists for the current run, then the Pages copier publishes it to /pages/photos/. Deployment does not rebuild or transfer the photos between jobs.