Prototypes Prototype docsP11 · Docs and assistant
Portfolio site (P16)
DocsPage 19 of 30

Portfolio site (P16)

The portfolio site shows the offer, the prototypes and the products at therkildsen.dev. Every number on it is a link to the command that produced it.

The numbers

site/collect.mjs runs the commands and writes their results to site/data/numbers.json. It reads git in the three local repositories and the GitHub API for the three older ones. It also reads the totals of the last green run of the checks. Each number keeps its command, the folder it ran in and the time it ran. A number worked out from other numbers names them and says how.

The site's build writes each number as a link to its command on the Sources page (web/scripts/postbuild.mjs). The build stops when a digit on a page is not such a link.

The pages

The site has seven pages: Home, Work, Services, How I build, Numbers, Sources and Contact. It runs on vinext on a Cloudflare Worker, and every page is rendered to HTML when the site is built. A link between two pages loads only the new page's content, inside a view transition. Each page also has a Markdown version at /<page>.md, and llms.txt lists them.

Offline

A service worker keeps every page and file on the device after the first visit. The pages open without a network, and a link between them still works.

The contact form

The contact form posts to the site's Worker, which passes it to the prototypes' Worker. That Worker checks the name, the address and the message, and keeps the message for a week. It sends the message by email when RESEND_API_KEY, MAIL_FROM and MAIL_TO are set. A hidden field catches forms filled in by machines. A message sent offline is kept on the device and sent when the network is back.

Choices that are Malte's

site/decisions.mjs holds five choices: the domain and the name, the look, the language, the prices and the cases that may be shown. The domain is therkildsen.dev, and the prototypes are at lab.therkildsen.dev.

Measured

web/scripts/check-offline.mjs opens every page offline in Chromium, follows a link between two pages offline, and sends a message from the contact form offline and then online.

Previous: Club platform (P15). Next: Ordering for a café (P17).

How Prototype docs is built

The pages are written in Markdown and built into these pages and an index of 154 sections. The assistant answers from the index, and every answer names the sections it was taken from.