Skip to content

agus-darmawan.com: Website and Ubuntu Desktop

This site: a fast, crawlable portfolio and an Ubuntu desktop you can actually use, built on one content layer in English and Indonesian, with tests, CI and dependency updates that merge themselves.

6 min read1 star
  • Next.js
  • TypeScript
  • Tailwind CSS
  • next-intl
  • Zustand
  • Vitest
  • Playwright
  • Sentry

This site has two views of the same content. The website is the default: fast, readable and easy to find. The desktop is an Ubuntu-style environment with windows, a terminal, a PDF viewer and a Spotify widget, for anyone who wants to explore. Both read from one content layer in English and Indonesian, and you can switch between them without losing your place.

The problem

The first version was only the desktop. It was fun, and it was invisible: the home page's HTML had no words in it, because the desktop renders nothing before hydration and then plays a boot animation. Projects and posts existed only inside windows, the sitemap listed two URLs, and a search for my name had nothing to rank. Underneath, the desktop had grown bugs a portfolio cannot afford, from a contact form that never delivered to a terminal command that crashed the page.

What I built

  • One content layer: projects and posts are Markdown files with frontmatter validated by Zod at build time, and GitHub repos tagged portfolio are listed automatically with their README as the body.
  • A real website: server-rendered home, about, experience, projects, blog and contact pages in both languages, with canonical URLs, hreflang, structured data and a social card for every page.
  • A desktop that keeps its state: a store-driven window manager where windows stay mounted while minimized, each window subscribes only to its own state, and the stacking order is renumbered on focus.
  • A hand-off between the views: open a project on the website, switch to the desktop, and it opens in the Projects window; the bare domain reopens the view you used last.
  • Quality gates: Biome, knip, TypeScript, Vitest and a Playwright suite that runs against the production build in CI, and Dependabot updates that merge themselves once CI passes.
content/projects/{en,id}/*.mdx --+content/blog/{en,id}/*.mdx ------+--> content layer --+--> website   /en, /idGitHub repos tagged "portfolio" -+                    |                                                      +--> desktop   /en/desktop

Challenges and how I solved them

A home page with no words in it

Problem. Search engines saw an empty page, because the desktop is client-only and renders nothing before hydration.

Solution. First came statically generated routes for every project and post in both languages, structured data, canonical URLs with hreflang and a sitemap with every page. Then the website became the default home page, and the desktop moved to its own URL.

Windows that buried each other

Problem. A README window got a flat +500 z-index to stay above the Projects list, which also put it above every window opened later, so those could not be clicked. Dragging one window re-rendered all of them.

Solution. A store-driven window manager: the stacking order is renumbered within a bounded range on focus, the window area is its own stacking context so windows never cover the top bar or the dock, each window subscribes to its own slice of state, and an error boundary around each window keeps one crashing app from blanking the desktop.

cat __proto__ crashed the desktop

Problem. The terminal's file system was a plain object, so a prototype key such as __proto__ crashed the page. Line ids came from crypto.randomUUID(), which throws outside secure contexts, and vim's :w saved nothing.

Solution. The terminal became a pure command engine that takes a command and the session state and returns output and effects, unit-tested without React. Every lookup goes through Object.hasOwn, line ids are a counter, and :w saves.

A contact form that said "sent"

Problem. Three bugs stacked up. Without a Turnstile site key, the Send button did nothing. With a secret configured, every message was rejected because the server called the wrong verify endpoint. And production without SMTP answered "sent" and dropped the message.

Solution. Turnstile is required only when it is configured, and then it fails closed; tokens reset after every try. The server validates input with Zod, limits each IP to five messages per ten minutes, and answers 503 when mail is not configured, so the form can send people to email instead.

Errors that never reached Sentry

Problem. The i18n middleware caught Sentry's tunnel route and redirected every error report to /en/monitoring, which answered 404.

Solution. The proxy's matcher now skips the tunnel.

Critical CVEs in the framework

Problem. pnpm audit reported 62 vulnerabilities, 3 of them critical, including remote code execution in the Next.js image renderer that draws every social card on this site.

Solution. I upgraded to the patched Next.js line, replaced axios with a small fetch helper and gray-matter with a tiny frontmatter parser, and overrode a vulnerable transitive Vite. The audit is at zero, and Dependabot keeps it there: weekly grouped updates with a cooldown so brand-new releases age for a few days first, merged automatically once lint, types, unit tests and the end-to-end suite pass.

Problem. A link such as /en/desktop?open=projects&item=… tidied the URL with the History API before the Next.js router had hooked into history. After leaving for the website, Back changed the address bar but not the page.

Solution. The URL is tidied one tick later, once the router owns history. A Playwright test reproduces the bug, and it failed before the fix.

Safari forgot the view

Problem. Safari expires cookies written by JavaScript after seven days, so regular visitors lost the view they had chosen.

Solution. The proxy re-issues the cookie from the server whenever it uses it.

Results

  • Every project and post is a crawlable page in two languages, with structured data and its own social card.
  • pnpm audit reports zero vulnerabilities, and the first Dependabot pull request merged itself the day the workflow landed.
  • Every push runs lint, a dead-code check, types and unit tests, then a production build with the Playwright suite against it.

Lessons learned

  • Build the plain version first. Recruiters and crawlers read a portfolio before anyone plays with it.
  • Test the artifact you ship. The Playwright suite runs against the standalone production build, not the dev server.
  • Silent success is the worst kind of failure. A form that says "sent" and drops the message is worse than one that shows an error.
  • Treat dependencies as a stream, not an event. Small weekly updates with a cooldown beat a 62-advisory upgrade.

Stack

LayerTechnology
FrameworkNext.js 16 App Router, React 19, TypeScript
StylingTailwind CSS v4
ContentMarkdown with Zod-validated frontmatter, GitHub API
StateZustand, TanStack Query
i18nnext-intl, English and Indonesian
QualityBiome, knip, Vitest, Playwright, GitHub Actions, Dependabot
OperationsVercel, Sentry, Cloudflare Turnstile, Cloudflare Web Analytics

My role

Solo project: design, code, content and operations.

More projects

  • Receptionist Robot Kiosk & Block-Coding Platform

    Software for a Bali robotics label: one kiosk app for receptionist robots and a self-built kiosk, with voice, queues and Aksara Bali, plus a block-coding simulator for its education robots.

    Web

    • Next.js
    • TypeScript
    • Turborepo
    • Blockly
    • +4 more
  • Satkom Career: Recruitment Platform

    The hiring site of PT Satkomindo Mediyasa, built by a team of five during my internship. My part: the admin dashboard, auth, the standardized CV with a log of who read it, and the APIs behind them.

    Web

    • React
    • TypeScript
    • Ant Design
    • Zustand
    • +3 more
  • Pashupati & NETRA: Autonomous Mall Patrol

    A robot-agnostic ROS 2 patrol and inspection stack for a wheel-legged quadruped, and NETRA, the command center that schedules patrols, validates what the robot finds and sends the alerts.

    RoboticsFeatured1 star

    • ROS 2
    • Python
    • FAST-LIO2
    • Jetson
    • +4 more