Blaze's portfolio site: a dot-matrix space scene behind three glass "islands" (Bio, Photos and Projects). It also has a terminal, a text adventure, a flag hunt and more hidden things to find.
Next.js 14 (static export) · React 18 · TypeScript · CSS Modules · three.js + React Three Fiber · vitest. Hosted on GitHub Pages at blazexyz.com. Live since 31 August 2026.
npm install
npm run dev # http://localhost:3000
npm test # the vitest suite
npm run build # static site in out/Pushing to main deploys the site. .github/workflows/deploy.yml builds it, adds .nojekyll and publishes out/ to
GitHub Pages. The workflow also rebuilds every six hours, so a new Discord name or avatar reaches the site, and it can
be run by hand from the Actions tab. public/CNAME keeps the custom domain.
| Script | What it does |
|---|---|
npm run dev |
Converts any new photos, then starts the dev server |
npm run build |
Syncs the Discord profile, converts photos (--keep), then next build → out/ |
npm test |
Runs every test once (npm run test:watch to keep watching) |
npm run test:glsl |
Parses every shader, to catch GLSL errors without a browser |
npm run photos |
Converts photos while the dev server is running |
npm run sync:discord |
Pulls the Discord display name and avatar from Lanyard |
npm run thumbs [-- <id>] |
Renders the project posters (needs Chrome or Edge) |
npm run og |
Redraws the link-preview image public/og.jpg (run after a build) |
app/
├── layout.tsx, page.tsx, page.module.css the page: state, navigation, islands
├── globals.css tokens, .glass, holiday / odd-day / reward styles
├── Universe.tsx picks the 3D scene or the 2D fallback
├── scene/ three.js scene: black hole, galaxy, highway, glass, post, governor
├── void/ 2D dot-field fallback scenes and the dot fonts
├── Gallery.tsx, galleryData.ts Photos and Projects galleries and their layout
├── bioData.ts, photoData.ts the editable content (see BIO-GUIDE.md, PHOTO-GUIDE.md)
├── Hud.tsx, Boot.tsx, NowPanel.tsx, LiveBadge.tsx, Lightbox.tsx
├── Terminal.tsx, termFun.ts, termFx.ts the terminal
├── adventure.ts, flags.ts, devConsole.ts text adventure, flag hunt, console greeting
├── achievements.ts, Trophies.tsx, rewards.ts
├── holidays.ts, oddCalendar.ts, OddDays.tsx, Atmos.tsx, pirate.ts
├── Breach.tsx, Ghost.tsx, Milestone.tsx, Shortcuts.tsx, memory.ts
├── snake/ the hidden /snake page
└── *.test.ts(x) tests sit next to what they test
public/ CNAME, robots.txt, security.txt, og.jpg, photos/, projects/ (posters, demo recordings)
photos/ your original photos (not committed: only README.txt is; see below)
scripts/ photo conversion, Discord sync, posters, og image, GLSL check
Universe.tsx loads the 3D scene (scene/Scene.jsx) only where WebGL works. A single scene holds three presets, and
the camera flies between them on a spring (scene/Rig.jsx, positions in scene/presets.js):
| Page | Preset | Scene |
|---|---|---|
| Bio | blackhole |
A lensed black hole with an accretion disk |
| Photos | nebula |
A spiral galaxy from above |
| Projects | terrain |
A highway into a sunset, which follows the visitor's clock and real weather |
postprocessing adds bloom and a CRT lens. scene/Governor.jsx lowers the pixel ratio and then the glass quality when
frames are missed. Without WebGL, or if the 3D scene never draws, the 2D dot scenes in app/void/ take over.
Islands marked data-glass-panel get a real refracting glass slab. scene/glassPanes.js draws a bevelled mesh per
island in the WebGL pass. scene/glassBackdrop.js redraws the HTML under each pane into its texture, then copies the
result into a <canvas data-glass-canvas> inside the island. Plain .glass in globals.css is the CSS-only version.
Overlay cards (the shortcut sheet, the milestone card) use it, because two shader panes stacked on top of each other
show each other's slabs.
page.tsx keeps the active page, the bio islands' state (hidden → entering → visible → exiting) and the central
island's position. Rules that keep motion smooth:
- State changes when an animation really ends. Islands, gallery cards, the trophy toast, the boot screen and the
overlays move on in
animationend/transitionend. Timers are only longer fallbacks, and they fire at once under reduced motion. Everynavigate()cancels pending timers first, so rapid clicking can't leave stale state. - No percentages of an element's own size in moving transforms. Chrome turns a percentage into pixels once, when
it hands the animation to the GPU. An element that changes size mid-move therefore lands off target and snaps. The
bio islands are centred by layout (
top: 0; bottom: 0; margin-block: auto) and slide sideways in pixels. The central island is positioned from its known width and a measured--central-h. An island that changes height later glides to its new centre. - The live "now" rows hold their place with "…" until they load, so the bio island doesn't grow while it flies in.
- Under 960px the central island tucks away while you scroll a gallery down, and returns on the way up.
galleryData.ts lays the cards out on a centre spine (spineLayout). Each card goes into whichever column ends higher,
and captions face the spine. Lane variables keep the cards clear of the central island's corner. Below 960px the
galleries become one column. Cards fly in and out as they scroll (scrollReveal.ts, IntersectionObserver), and
scrims fade them out under the HUD text.
| Feature | Where | Notes |
|---|---|---|
| Per-page links | page.tsx (HASH_FOR) |
/ is Bio; /#photos and /#projects open those pages; back / forward move between them |
| Keyboard shortcuts | page.tsx, Shortcuts.tsx |
1 Photos, 2 Bio, 3 Projects, B replays the boot screen, / or ` opens the terminal, ? shows every shortcut |
| Boot screen | Boot.tsx |
A scanline terminal that types a log, then dissolves once the background has drawn. Any key or click skips it |
| HUD | Hud.tsx |
Page label, camera readout, frame rate, weather, visit count and greeting; SOUND toggle bottom left |
| Terminal | Terminal.tsx, termFun.ts, termFx.ts |
help lists everything, help <command> explains one. Getting around: cd, projects, open, photos, photo <n>, socials. About: whoami, neofetch, np, status, time. Looks: theme, sky, weather, holiday, zen, banner, matrix, party, boot. Games and toys: play, guess, 8ball, roll, coin, calc, cowsay, fortune. Hunts: flags, submit, trophies, rewards, keys. Plus hidden commands. Tab completes, ↑ / ↓ walk history, Ctrl+L clears, Ctrl+C cancels |
| Now panel | NowPanel.tsx, presence.ts, spotifyArtists.ts |
Local time, Discord status, game and song (via Lanyard), on the Bio page |
| Live badge | LiveBadge.tsx |
While Discord shows Blaze in VRChat, the avatar gets a pulsing ring and an "in VRChat" tag |
| Photo viewer | Lightbox.tsx |
Click a photo for full screen; ← / → step through, Esc closes |
| Project posters | scripts/project-thumbs.mjs |
Posters in each project's accent colour; hover demos play terminal recordings (public/projects/*-demo.svg) |
| Trophies | achievements.ts, Trophies.tsx |
31 to find. A few are pure luck, and Completionist doesn't need those. trophies lists them; secret ones show as ??? until found. Kept per browser in localStorage |
| Trophy rewards | rewards.ts, scene/Highway.jsx |
At 10 trophies an aurora dot-word palette, at 15 your own car on the highway, at 20 a gold ring around the name. rewards off <name> switches one off |
| Flag hunt | flags.ts |
Nine flag{…} strings: page source, console, CSS, robots.txt → /backup/notes.txt, /.well-known/security.txt, sudo cat .secrets, the boot log in hex, a comment inside og.jpg, and winning the text adventure. flags gives hints, submit flag{…} hands one in. Only SHA-256 hashes are in the code; two flags are encrypted with their password or phrase |
| Console hello | devConsole.ts |
DevTools shows BLAZE in ● dots, a nudge toward the flag hunt, and a blaze object |
| Text adventure | adventure.ts |
play starts EVENT HORIZON: escape a station falling into the black hole before its orbit decays. hint, map, quit (pauses), play new. Pure functions, tested move by move |
| Holidays | holidays.ts, Atmos.tsx |
Accent colour, palette, greeting and particles for New Year, Lunar New Year, Valentine's, St Patrick's, Easter, Pride, Halloween, Diwali, Thanksgiving and Christmas. holiday <name>|off|auto previews one |
| Odd days | oddCalendar.ts, OddDays.tsx |
April Fools (upside down), Friday the 13th (glitches), Pi Day (stars form a π), Star Wars Day (hyperspace jump), Talk Like a Pirate Day (pirate.ts), leap day (dot words hop) and the site's birthday (SITE_BORN, 31 Aug 2026) |
| Weather and sky | weatherLive.ts, scene/weather.js, scene/timeOfDay.js |
The highway shows the visitor's real weather (GeoJS + Open-Meteo, no key) and follows their clock from night to dusk |
| Konami code | page.tsx, termFx.ts |
↑ ↑ ↓ ↓ ← → ← → B A: confetti and the secret vapor sky |
| Welcome back | memory.ts |
On a return visit the terminal says how long it's been and what's left to find |
| Fake hack | Breach.tsx |
About 1 visit in 300: INTRUDER DETECTED, then a joke trace that ends on "you". Only documentation IP ranges are shown |
| Ghost visitor | Ghost.tsx |
Late at night, sometimes, a second cursor drifts around and types in the terminal |
| Visitor milestones | Milestone.tsx |
The 100th, 500th and every 1,000th visit get a card and confetti |
| Sounds | sound.ts |
Web Audio clicks, whooshes and chimes; off until switched on |
| The pit | app/snake/ |
A hidden Snake game at /snake, played on shader-glass islands over the black hole, with holiday skins and a best score. Reached by cd .pit in the terminal (ls -a hints at it) or from the 404 page; not indexed |
| Visit counter | visits.ts |
GoatCounter (blazexyz.goatcounter.com), cookie-free; localhost isn't counted |
| 404 | not-found.tsx, NotFoundView.tsx |
"Signal lost": the Bio page's black hole behind one shader-glass island with the way back. Exported as out/404.html, which GitHub Pages serves for unknown addresses. The faint ssss… under the links, or typing pit or snake, drops into the pit |
Reduced motion is respected throughout: animations are skipped, and the surprises that move things around don't run.
-
Bio: all the text is in
app/bioData.ts.BIO-GUIDE.mdwalks through it. -
Photos: drop the originals into
photos/and runnpm run dev(ornpm run photos).PHOTO-GUIDE.mdhas the details.scripts/add-photos.mjswrites stripped, upright WebP copies topublic/photos/and records them inapp/photos.generated.json. For VRChat shots it also reads the world name from the metadata, and nothing else. Commitpublic/photos/andphotos.generated.json. The originals stay local (they're gitignored: large, and full of metadata), and the build's--keepmode leaves existing WebP files in place. Titles, captions and order are inapp/photoData.ts. -
Projects: add an entry to
PROJECT_SETSinapp/galleryData.ts:{ id: "regex-replay", size: "m", orientation: "horizontal", title: "{{Regex Replay}}", caption: "step through catastrophic backtracking", image: "/projects/regex-replay.webp", href: "https://blazexyz.com/regex-replay/", repo: "https://github.com/BlazeXYZ/regex-replay" }
Field Description idUnique key; also the poster's name in project-thumbs.mjssize"s","m"or"l"orientation"horizontal"(16:9),"vertical"(4:5) or"wide"(2:1)title{{braces}}draw it in the dot fontcaption,image,href,repoOne-liner, poster under public/, live link, source linkpreviewOptional terminal recording played on hover Then add a poster block with the same
idtoscripts/project-thumbs.mjsand runnpm run thumbs -- <id>. -
Text markup:
{{words}}draw in the dot font (DotText.tsx), and[[words]]in the hairline script (ScriptText.tsx). -
Trophies: add a line to
TROPHIESinachievements.tsand callunlock("id")where it happens. -
Holidays and odd days:
HOLIDAYS/holidayOn()inholidays.ts, andODD_DAYSinoddCalendar.ts. The Lunar New Year and Diwali date tables run to 2032 and 2030. Only one shows at a time: on a date that is both, the odd day wins, and from the terminal the latestholidaypin wins.
scripts/sync-discord.mjs runs before every build. It reads your display name and avatar from
Lanyard, the same public API that feeds the Bio page's "now" rows, so there are
no tokens or secrets to set up. It writes app/discordProfile.json and public/discord-avatar.png (or .gif).
The Discord id is lanyardId in app/bioData.ts, and that account has to be in Lanyard's Discord server
(discord.gg/lanyard). The deploy workflow rebuilds every six hours, so a new name or avatar shows up within that time.
If Lanyard doesn't answer, the build carries on with the committed profile.
- Every year: move the
Expires:date inpublic/.well-known/security.txtforward. A test fails once it lapses. - After changing the name or tagline:
npm run build && npm run og(this also puts the og.jpg flag back). - Before adding a holiday past 2030 / 2032, extend the Diwali and Lunar New Year tables.
:root,htmlandbodyrules belong inglobals.css. CSS Modules reject them.- The Projects page's internal key is
"code"; only the label says "Projects". page.tsxmust not userequestAnimationFrame, and a test enforces this. Use timers or events.- jsdom runs no CSS animations, so tests reach the end states through the fallback timers.