jpvalery/portfolio
حول
Photo Portfolio w/ Next.js + TailwindCSS + Contentful
التصميم والوسائطالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلjpvalery.photo
Photography portfolio of Jp Valery: chapters (bodies of work), the full archive of contact sheets, and a small blog.
A fully static Next.js site. Photos are resized once, on a laptop, and served from Cloudflare R2 at img.jpvalery.photo. Nothing is resized at request time, so there is no image-optimization bill to run up and no egress fee.
How it fits together
content/
chapters/*.md one file per chapter: title, description, cover, photos in order
posts/*.md blog posts; images are written 
pages/biography.md
photos/library.json every photo: id → source file, plus alt text / caption (edit by hand)
photos/manifest.json generated by photos:ingest (sizes, hashes, colours, EXIF)
redirects/ old archive.jpvalery.photo/p/N links → photo ids
app/ Next.js App Router, output: "export"
components/photo/Photo.tsx the only way photos are drawn: <picture> with AVIF/WebP srcsets
scripts/photos/ ingest, verify, backup
scripts/check/ cost guards, content validation, page-weight budget
Original files live outside the repo in $PHOTOS_SRC (default ~/Pictures/jpvalery-library) and are backed up to the private R2 bucket jpvalery-originals.
Common tasks
| Task | Command |
|---|---|
| Develop | pnpm dev (set NEXT_PUBLIC_PHOTO_CDN_URL=http://localhost:4100 and run pnpm dlx serve .cache/cdn -l 4100 to use local variants) |
| Add photos | Put files in $PHOTOS_SRC/local/, add entries to content/photos/library.json, then pnpm photos:ingest |
| Back up originals | pnpm photos:backup |
| Check everything | pnpm check |
| Build | pnpm build (fails if anything would use Vercel's image optimizer or a retired image host) |
| Regenerate redirects | pnpm gen:vercel |
R2 credentials go in .env.r2 (see .env.r2.example). They stay on your machine; Vercel never needs them.
Cost guardrails
output: "export"andimages.unoptimized: no functions, no optimizer.- Biome bans
next/image, andscripts/check/guards.tsfails the build onnext/image,/_next/image, Contentful, Cloudinary orr2.devURLs. - Variant keys are content-hashed and served with
Cache-Control: immutable, so Cloudflare's edge serves almost every request without touching R2.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…