The source for the catcrafts.net website
  • C++ 75.9%
  • Shell 17%
  • CSS 5.6%
  • WGSL 1.1%
  • JavaScript 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jorijn van der Graaf c1b0c29af6
All checks were successful
Deploy / build-deploy (push) Successful in 7m34s
media: publish to our own origin instead of mirroring a file host
A 167 MB screen recording uploaded to catbox.moe hit fetch-media.sh's 64 MB
MAX_BYTES, so curl refused it, the entry kept its third-party URL, and e2e
failed "/posts media origin" on a file we had on disk the whole time. Raising
the cap would have papered over it: the mirror step still depends on someone
else's server being up, fast, and still holding the file.

Invert it. tools/publish-media.sh uploads a recording to the media mount under
its content hash BEFORE the post exists and prints the URL to post, and
fetch-media.sh adopts an own-origin URL by rewriting it to /media/<hash> with no
request at all — no size cap, no third party in the build.

Also here, because publishing exposed them:

  * Rotation. Phones record 1920x1080 and attach a display matrix rather than
    rotating pixels, so an untouched file reports landscape while playing
    portrait and width/height reserve exactly the wrong box. publish-media.sh
    bakes rotation into the frames; fetch-media.sh swaps the dimensions on a
    quarter-turn matrix for anything mirrored straight from a phone.
  * Posters. pict-rs will not thumbnail AV1, so a self-hosted video usually
    arrives with no poster. publish-media.sh uploads <hash>.poster.webp beside
    the video and fetch-media.sh falls back to it — a real thumbnail still wins.
  * The workflow comment claiming a file on the mount is never downloaded again
    was wrong: the name is the hash of the bytes, so third-party media is
    re-fetched every build and only the write is skipped.

Transcoding to AV1 is what makes self-hosting cheap: that clip was 78 s of a
dark room at 17 Mbps, and denoise + AV1 gives the same picture in 15 MB. Note
<video> carries a single src with no fallback, so AV1 excludes Safari < 17;
--raw skips the transcode when that matters.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-08 01:16:17 +02:00
.forgejo/workflows media: publish to our own origin instead of mirroring a file host 2026-08-08 01:16:17 +02:00
content SEO 2026-08-06 23:42:25 +02:00
deploy media: publish to our own origin instead of mirroring a file host 2026-08-08 01:16:17 +02:00
images new logo 2026-08-05 23:52:40 +02:00
implementations rewrite 2026-08-05 04:18:37 +02:00
interfaces rewrite 2026-08-05 04:18:37 +02:00
server SEO 2026-08-06 23:42:25 +02:00
shaders webgpu demo 2026-07-19 01:13:30 +02:00
shared/interfaces SEO 2026-08-06 23:42:25 +02:00
styles changes 2026-08-05 22:32:03 +02:00
tools media: publish to our own origin instead of mirroring a file host 2026-08-08 01:16:17 +02:00
.gitignore rewrite 2026-08-05 04:18:37 +02:00
catcrafts-head.js rewrite 2026-08-05 04:18:37 +02:00
favicon.svg new logo 2026-08-05 23:52:40 +02:00
LICENSE inital commit 2025-11-12 20:58:07 +01:00
project.cpp ci fix 2026-08-05 05:50:01 +02:00
README.md webgpu demo 2026-07-19 01:13:30 +02:00
robots.txt about page 2026-08-05 07:05:00 +02:00

catcrafts.net

This is the source code for catcrafts.net, a website built entirely in C++ using the Crafter.Graphics library.

crafter-build -r

This will compile the project and serve it locally on http:://localhost:8080.

This project is source available for educational and viewing purposes only. No permission is granted to copy, modify, distribute, or create derivative works.