# My Links

> My link-in-bio page, self-hosted: one static page driven by one JSON file that the build validates. Next.js static export, two client islands, axe in CI and a strict CSP.

Case study · Vinícius Albuquerque · https://www.vinicius-albuquerque.com.br/en

- Live site: https://links.vinicius-albuquerque.com.br
- View code: https://github.com/allbdev/my-links
- Case study (HTML): https://www.vinicius-albuquerque.com.br/en/projeto/my-links

## Overview

My Links is the page behind the link in my bios: my photo, a short bio, social icons, links as cards, section headings and one featured project card, in English at / and Portuguese at /pt/. It replaces a hosted link-in-bio service with a page I own, and everything on it comes from one file, content/links.json. That file is parsed with a strict Zod schema when the page is built, so a misspelt key, a title that is too long, an image that is not in public/ or an unsafe URL stops the build with a message that points at the field; links accept only https:, mailto: and paths on the site, and javascript:, data:, http:, protocol-relative URLs and paths with whitespace or .. are rejected and tested. Editing the links on GitHub is enough: CI validates the file and Vercel builds and deploys it. It is a Next.js App Router static export: the profile, cards and footer are Server Components rendered to HTML at build time, and the share dialog and a scroll reveal are the only client components, so the page renders and animates without JavaScript. The share dialog shares the whole page or a single link by copy, WhatsApp, LinkedIn, X, e-mail or the phone's own share sheet. Each language is its own static page with its own html lang, metadata, hreflang links and Open Graph image, all generated from the same file. Accessibility is built in: real links and buttons, a native dialog that moves focus in and back, 44 px touch targets, reduced motion respected, and text contrast checked by a unit test for every colour pairing, with axe running in CI on the page and the open dialog on desktop and phone. vercel.json sets a strict Content Security Policy, HSTS and the other security headers, and the local preview server applies the same file, so the end-to-end tests run under the real CSP and fail on any console error. There are no cookies, analytics or requests to other origins. On mobile Lighthouse scores 95 / 100 / 100 / 100, and a size check fails CI if first-load JS goes over 150 KB gzipped.

## Highlights

- One JSON file drives the page, and the build is the validator: a strict Zod schema fails CI on a bad key, an unsafe URL or a missing image, pointing at the field
- Next.js static export with Server Components and only two client islands; the page renders and animates without JavaScript
- Share dialog for the page and each link: copy, WhatsApp, LinkedIn, X, e-mail and the native share sheet, with share URLs covered by property tests
- English and Portuguese as separate static pages, each with its own lang, metadata, hreflang and Open Graph image
- Accessible by default: native dialog focus handling, 44 px targets, reduced motion, a contrast test for every colour pair and axe in CI on desktop and phone
- Strict CSP and security headers tested end to end, no cookies or analytics, Lighthouse 95 / 100 / 100 / 100 and a 150 KB JS budget in CI


## Technologies

Next.js, React, TypeScript, Zod, Vitest, Playwright, axe-core, Vercel

## Screenshots

![The page on a phone: profile and links, the projects section, and the share dialog](https://www.vinicius-albuquerque.com.br/projects/my-links/links-page.avif)

![The page on a desktop screen](https://www.vinicius-albuquerque.com.br/projects/my-links/links-desktop.avif)

![The same page in English and in Portuguese](https://www.vinicius-albuquerque.com.br/projects/my-links/links-languages.avif)
