← All work
Canadian Biosample Repository

CBSR Biosample

A rebuilt website for a Canadian biobank, plus a custom content admin so staff can publish news, studies and sample counts themselves.

Mobile speed score from 24 to 94

CBSR Biosample homepage

In short

CBSR needed a website that explains its services clearly to researchers, and that its own staff could keep up to date. I designed and built the site and a custom admin, so the team publishes news, studies and sample counts themselves. A performance pass took the home page's mobile speed score from 24 to 94.

The brief

The Canadian Biosample Repository (CBSR) processes, stores and retrieves biosamples for researchers around the world, on a cost-recovery basis. It needed a new website that explains its services, facility and studies clearly to researchers, and that its own staff could keep up to date without calling a developer.

My role

I redesigned and built the whole project on my own: the public site, the contact-form mailer, a custom content admin, and the hosting and deployment for all three.

Approach

The public site is a static React and TypeScript app built with Vite and Tailwind. It has pages for services, the facility, resources and software, plus a page for each study. A 3D globe shows where CBSR has managed sample collections.

Rather than bolt on an off-the-shelf CMS, I built a small one shaped around CBSR's content: a Go API backed by SQLite, with a Preact admin. Staff write news posts in a rich-text editor with a live preview and draft or publish them. They manage studies, with sample types shown as colour-coded tube caps like the real ones, and update the repository-wide sample counts shown on the home page. A media library lets them replace a file without breaking the links that point to it. The public site reads everything from the admin's read-only API, and the sitemap picks up new posts and studies at build time.

Because the admin holds the keys to the public site, I treated sign-in seriously. Passwords are hashed with bcrypt. Sessions live in httpOnly, SameSite=Strict cookies and can be revoked instantly. Logins are rate-limited, and new admins are invited by email with one-time links.

The contact form, which accepts attachments, goes through a small Express service that sends mail with Resend. Every push to the site is linted, built and deployed automatically by GitHub Actions, and the admin ships as a single Docker container. Staff also have a simple public tracker for reporting problems and requesting features.

Outcome

A performance pass took the home page's mobile Lighthouse score from 24 to 94, and the other pages from about 70 to 94–97, with 100 on desktop across the site. Most of the gain came from loading the 3D globe (three.js, ~550 KB gzipped) only when it scrolls into view, and from cutting its map data by about 60%.

CBSR's team can now publish news, studies and sample counts themselves, without waiting on a developer.

Need something like this?

Tell me about your business and I’ll send you a fixed-price proposal.