Personal portfolio of G.M. Shahariyar Riyan, a Java backend and full-stack engineer.
Concept: “The Request”. The site plays out as a single HTTP request travelling through the stack I build. The hero diagram shows the lifecycle (Client → Cloudflare → Spring Security → Controller → Service → JPA → Database). The scroll-progress rail traces the same request through each section (“hop”). The page ends at Contact with a 200 OK.
Signature pieces:
npm install
cp .env.example .env.local # add RESEND_API_KEY to enable the contact form
npm run dev # http://localhost:3000
| Script | What it does |
|---|---|
npm run dev |
Dev server |
npm run build |
Production build |
npm start |
Serve the production build |
npm run lint |
ESLint |
npm run typecheck |
TypeScript, no emit |
npm run format |
Prettier (with Tailwind class order) |
npm run check |
lint + typecheck + build |
npm run portrait |
Regenerate portrait, avatar, favicon/app icons and OG photo from public/images/riyan.jpg |
All copy lives in src/content/site.ts. It is typed, so a mistake shows up as a type error instead of a broken page. You should never need to touch a component to change text.
| You want to change… | Edit in site.ts |
|---|---|
| Name, title, value proposition, email, socials | person |
| “Open to opportunities” (hero card + contact copy) | availability.open (off until you confirm) |
| Hero portrait card text | profileCard |
| Hero “request” band copy | heroBand |
| SEO title / description / keywords | seo |
| Hero diagram layers and their trace lines | stackLayers, requestLine, responseLine |
| About text and the quick-facts panel | about |
| DIU Notes “in production” section | proof |
| Skill layers | skillGroups |
| Projects (order = display order) | projects |
| Experience and education timeline | timeline |
| Engineering-approach cards | principles |
| Section headings | sectionCopy |
| Contact closing | contact |
| CV page summary / additional | resume |
Originals stay untouched in assets/photo/, so the pipeline can always be re-run.
Base matte (only when the photo changes): put the full-resolution photo at assets/photo/riyan-original.jpg, then generate the MODNet base matte:
python3 -m venv .venv && .venv/bin/pip install numpy pillow onnxruntime
# MODNet portrait-matting model, about 25 MB
curl -L -o modnet.onnx https://huggingface.co/Xenova/modnet/resolve/main/onnx/model.onnx
.venv/bin/python scripts/make-portrait.py --modnet modnet.onnx
This caches assets/photo/riyan-modnet-alpha.png. Later re-runs only need numpy and pillow: .venv/bin/python scripts/make-portrait.py.
scripts/make-portrait.py does the following:
It writes assets/photo/riyan-portrait-master.png and the proof in docs/portrait-check/:
halo-score.json, which must pass (≤ 0.03)npm run portrait. It writes:
<picture>, so no optimizer re-encodes the hair edge.Every logo uses the full, uncropped photo.
Drop images into public/images/projects/<slug>/, e.g. public/images/projects/diu-folio/01-dashboard.webp.
png, jpg, webp or avif, ideally about 1600×1000 (16:10).frame in site.ts picks the device frame: browser (web apps), window (Swing-style title bar for Proyojon) or terminal (distributed prototype). frameLabel is the text in its address or title bar.diu-notes/01-home.webp is a real capture of the public diunotes.com homepage. Replace it with curated screens whenever you like.
Fill metrics: [{ label: "Registered students", value: "…" }] on a project, using real numbers only. Metrics appear in the case-study view only when the array is non-empty.
Skill ↔ project connections are derived, never hand-written. src/lib/skill-usage.ts links a skill to a project only when that project’s stack, highlights or approach text mentions it, or one of its synonyms (e.g. React.js ↔ React, RBAC ↔ role-based).
The CSE-Tech internship is a context node, linked by the same matching over its timeline points.
The same data powers:
To add a connection, describe the work in site.ts; to add a synonym, edit ALIASES.
public/cv.pdf is the CV every viewer shows. Replace it with your final CV at any time. It’s cached for a day and revalidated by ETag, so visitors don’t re-download it on every visit.
The viewer (ResumeViewer.tsx) is built on pdf.js:
<iframe>/<embed> don’t.public/pdfjs/ on npm run dev/build)| Feature | Details |
|---|---|
| Toolbar | Previous/next, zoom, fit width/page, fullscreen, print, open in new tab, download (as G.M._Shahariyar_Riyan_CV.pdf) |
| Keyboard | ←/→ for pages, +/− to zoom, 0 for fit width, F for fullscreen, Esc to exit or close |
| Desktop | Thumbnail rail |
| Phones | Pinch zoom, double-tap zoom, swipe between pages |
| “Updated” label | Comes from the file’s Last-Modified header |
It appears in three places:
/cv page/cv/print is the printable, brand-matching HTML CV generated from site.ts. To regenerate the PDF from it:
npm run build && npm start # in one terminal
google-chrome --headless=new --no-pdf-header-footer --virtual-time-budget=5000 \
--print-to-pdf=public/cv.pdf http://localhost:3000/cv/print
One fixed atmosphere sits behind every section, in three layers:
public/images/atmosphere/contours-{dark,light}.webp), drawn into a canvas after load. Canvases never become the LCP element.shader.ts, AtmosphereGL.tsx), cross-faded in when the device can afford it.The shader draws curl-noise topographic contours with a pointer light. Each section has its own look, and they cross-fade with scroll:
| Section | Look |
|---|---|
| Hero | Flowing contours |
| About, In production, Stack, Work | Ember glows (Stack also has a reactive constellation overlay; In production has travelling signal packets) |
| Journey | Aurora |
| Approach | Fog |
| Contact | Horizon glow |
Budget:
Who sees the still instead:
prefers-reduced-motionRegenerating the stills after changing the shader: render one frame of the top look at 1600×1000 for each theme (any WebGL2 page using VERT/FRAG works), then save it as WebP.
?perf HUD: add ?perf to any URL to see rolling FPS, average and worst frame time, and long tasks.requestAnimationFrame loop (src/lib/ticker.ts) drives Lenis, the canvases, the request diagram, the graph and the cursor, each with its own fps cap.backdrop-filter, no animated blur filters, a static grain tile, and no permanent will-change.pointermove handler (zero added latency). The ring is a stiff spring that sleeps when settled, with no layout reads while moving.chrome://gpu and check that hardware acceleration is enabled (Settings → System → “Use graphics acceleration when available”). Without it, Chrome renders everything in software.POST /api/contact sends mail through Resend’s HTTP API (no SDK).src/lib/contact.ts).Spam protection:
Bots that trip a trap get a fake success response, so they don’t retry.
Setup:
RESEND_API_KEY.CONTACT_FROM_EMAIL to an address on that domain.Without a verified domain, the sandbox sender onboarding@resend.dev only delivers to the email on your Resend account.
Without a key, the form shows a friendly “email me directly” fallback (HTTP 503).
The footer’s System status shows two things:
next.config.ts (VERCEL_GIT_COMMIT_SHA on Vercel)It shows no uptime figures.
GET /api/status checks https://diunotes.com server-side, with a 6-second timeout. The result is cached for 60 seconds ("use cache" + cacheLife), so there are no client CORS calls.
The badge only says what the check proved:
RESEND_API_KEY, and optionally CONTACT_TO_EMAIL, CONTACT_FROM_EMAIL and NEXT_PUBLIC_SITE_URL.NEXT_PUBLIC_SITE_URL=https://yourdomain and redeploy. Canonical URLs, the sitemap, robots and OG URLs all use it.Without a custom domain, Vercel’s production URL is picked up automatically (VERCEL_PROJECT_PRODUCTION_URL).
Cloudflare Pages also works, via OpenNext (
@opennextjs/cloudflare). Vercel is recommended because the API routes and"use cache"work there with zero configuration.
src/
content/site.ts ← all content (edit this)
app/ ← routes: /, /cv, /cv/print, 404, api/{contact,status}, OG images, icons, sitemap, robots, manifest
components/
atmosphere/ ← per-section backgrounds (WebGL flow field, signals, constellation), shared canvas loop
graph/ ← ConnectionGraph (d3-force + canvas), GraphSection (Graph | Layers), MiniGraph, SkillSheet
hero/ ← StackDiagram, PortraitCard ("200 OK · profile"), contours, gyro parallax, CTAs
sections/ ← About, Proof, Skills, Projects (+ detail sheet), Journey, Approach, Contact
layout/ ← Nav, RequestTrace (progress rail), MobileDock, CommandPalette, Intro, Footer
interaction/ ← Pressable, TiltCard, Spotlight, Reveal, SplitText, Scramble, Cursor, InteractionLayer
providers/ ← smooth scroll (Lenis + GSAP ticker), UI state, MotionConfig
ui/ ← SectionHeader, Chip, SkillChip, BrandMark, ProjectMedia (device frames), ProjectCover
lib/ ← skill-usage derivation, project-media discovery, motion budget (Calm mode), theme store, hooks, contact validation
scripts/process-portrait.mjs ← photo → portrait, brand mark, icons, OG photo
Opening a case study uses the View Transitions API: the card’s media morphs into the panel’s media (case-media, see src/lib/view-transition.ts). Browsers without support, and reduced motion, fall back to the slide-in panel.
All interactions are built on Pointer Events. Capability is detected with (hover: hover) and (pointer: fine), never by sniffing the user agent.
| Desktop (fine pointer) | Phone / tablet (touch) |
|---|---|
| Cursor drives the request through the diagram | Press-and-hold then drag to trace; tap a layer to inspect it |
| Magnetic custom cursor that morphs by context | Native cursorless UI |
| Magnetic buttons | Spring press + ripple + navigator.vibrate where supported |
| 3D tilt and glare on hover | Tilt follows the finger while pressed |
| Illustrations animate on hover | The centred carousel card’s illustration plays |
| Case study opens as a side panel | Case study opens as a bottom sheet with drag-to-dismiss |
| Graph: hover highlights, click pins, drag with inertia, ctrl+scroll zoom | Graph: tap selects (details in a bottom sheet), pinch zoom, opt-in drag & pan |
| Portrait card: cursor parallax, tilt and glare | Portrait card: tilt follows the finger; optional gyroscope (iOS permission flow) |
| Top nav with active section, ⌘K palette | Thumb-zone dock with current hop, plus a bottom-sheet menu |
| Lenis inertial scroll, GSAP scrubbed parallax | Native momentum scroll; optional gyroscope parallax (iOS permission flow) |
Keyboard users get a skip link and visible focus everywhere. The diagram responds to ↑/↓/Home/End with a live-region announcement. The skill tabs follow the ARIA tabs pattern. Modals trap focus and close on Esc. ⌘K / Ctrl+K opens the command palette.
prefers-reduced-motion is honoured:
LazyMotion (m components), so its features load asynchronously.priority, fetchPriority="high", AVIF/WebP at q70, tight sizes.transform and opacity are animated. Loops pause when off-screen or when the tab is hidden.