Shipped

Portfolio & Blog Platform

The site you are reading: my blog, profile, projects and other sites in one place, a single source of truth, with a newsletter that emails subscribers whenever a new article is pushed to GitHub.

Portfolio & Blog Platform screenshot
Role
Design & engineering
Timeline
June 2026 - August 2026

Tech stack

  • Next.js
  • TypeScript
  • Tailwind CSS
  • MDX
  • Drizzle ORM
  • PostgreSQL
  • Resend
  • GitHub Actions
  • Vercel

My work used to be scattered: a portfolio in one place, articles in another, projects and side sites spread across more. Someone who enjoyed an article had no easy way to find out who wrote it, what else I'd built, or where else I was. So I built one site to hold all of it (blog, profile, projects, and links to my other sites), a single source of truth for everything about me. From any article, the rest is one click away through the header, the footer and ⌘K search.

A single source of truth only works if keeping it current is effortless, so I set one rule. Publishing has to cost one git push. Articles, projects and links are files in the repository. Pushing a new article to main is the whole publish flow: Vercel deploys it, the RSS feed picks it up, and every subscriber gets an email.

Content as files#

Posts are MDX files under content/blogs/. I can drop them straight in that folder or organise them into topic folders like java/ and typescript/, at any depth. The folder never changes the URL. A post's address is its filename, so reorganising never breaks a link. If two files share a name, the build fails instead of one silently hiding the other.

Every post's frontmatter is checked with Zod at build time. A typo like titel: used to render "undefined" on the live site. Now it fails the build and names the file and the field. Projects and links go through the same kind of loader, so all three behave the same way.

The pages themselves are static. MDX renders through next-mdx-remote, code blocks are highlighted at build time by rehype-pretty-code (so no highlighter ships to the browser), and reading time comes from the word count rather than a field I'd have to keep updated.

Reading an article#

A few details make long posts easier to read:

  • The "On this page" sidebar draws one SVG path that traces the heading hierarchy and curves between levels. An IntersectionObserver tracks the section on screen, and a clip-path animation highlights that stretch of the path. Headings and sidebar links share one slug function, so every link lands on its heading.
  • Previous and Next follow the list you came from. Filter by a tag or open a category, and the arrows walk that list in series order, not the whole archive.
  • Images zoom on click, code blocks have a copy button, and ⌘K searches articles, projects, categories and links from anywhere on the site.

/links collects my other sites and open-source code I think is worth reading. Each folder under content/links/ holds an index.md, top-level folders become tabs, and folders inside them get their own pages.

The tricky part was URL casing. Folder URLs are slugified, so /links/ShadCn should redirect to /links/shadcn. My first version redirected from inside the page. On a case-insensitive disk (macOS, in my case), Next.js then cached that redirect over the real page file, breaking /links/shadcn itself. The fix moved the redirect into the proxy, which runs before routing, and only real folders are pre-rendered. Since then, a wrong-case URL is never rendered or cached at all.

The newsletter#

Subscribers live in Postgres, accessed with Drizzle ORM. I migrated from Prisma but kept its table and column names, so the switch needed no data migration. Signing up normalises the address, reactivates a returning subscriber, and handles the unique-constraint error directly, so two requests racing each other can't create duplicate rows.

Emails are React Email templates sent through Resend. Each subscriber gets an opaque unsubscribe token, and that token travels in links instead of the email address.

Unsubscribing took more care than I expected. Mail scanners like Outlook Safe Links fetch every URL in an email, so a link that unsubscribed on visit would quietly remove people who never clicked it. Opening the link now just shows a page with a confirm button. One-click unsubscribe still works: each email carries List-Unsubscribe-Post (RFC 8058), so Gmail and Outlook can show their own button, which sends a POST instead of a GET.

Publishing is a git push#

A GitHub Actions workflow watches pushes to main and looks for posts that were added, at any depth under content/blogs/:

bash
git diff --name-only --find-renames --diff-filter=A "$BASE" "$AFTER" -- 'content/blogs/'

Two flags matter here:

  • --diff-filter=A keeps it to new files. Editing an older post (to unfeature it, say) never re-sends it.
  • --find-renames treats moving a post into a folder as a rename rather than a new file. Without it, reorganising posts would email everyone again.

On the very first push there's no parent commit, so the workflow falls back to git's empty-tree hash instead of letting rev-parse produce a revision that silently matches nothing.

Keeping the design consistent#

The design is deliberately monochrome. Colour only appears where it means something: project status dots and success messages. Every colour is a theme token defined once with CSS light-dark(), so light and dark mode can't drift apart.

@shadcn/lint, running on Oxlint, enforces this. Four rules catch raw palette colours, unknown classes, unreadable dynamic classes and pages restyling components. When I turned them on, 20 one-off styles surfaced. I moved each into a variant or a token and compared 28 before-and-after screenshots in both themes to confirm nothing visibly changed.

Small things I'm glad I did#

  • bun run images converts PNGs to WebP, sized for where they're shown. The site's images went from 11.7 MB to 0.5 MB.
  • Icons come from an Iconify bundle generated at build time, so they render on the server with no network request and no pop-in.
  • The 404 page is a terminal. It types out the URL you mistyped, suggests the closest real page, and lets you ls and cd your way around the site. Try it.
  • 42 tests cover the loaders, URL handling and the 404 shell, using Node's built-in test runner, so there's no test framework to maintain.

What I'd change#

The broadcast job still isn't idempotent. Re-running it re-sends the email, because nothing records which posts have already gone out. A small table keyed on the post's slug would fix that, and it's next on the list.