Skip to content
Deepanshu Kr Chaurasia

How this site is built

The stack, the rules and the tests behind this site, with numbers measured on the built site.

  • Next.js
  • React
  • TypeScript
  • Tailwind CSS
  • Motion
  • Vercel
  • Vitest
  • Playwright
  • Lighthouse

Stack

This site is a Next.js application written in TypeScript with React, styled with Tailwind CSS and hosted on Vercel. Every page is generated at build time. The only server code is the contact form, which hides itself when it is not configured.

Why it is built this way

  • Static pages. A portfolio changes when the resume changes, not on each request, so every route is built once and served as files.
  • Content as data. Resume text lives in typed data files and case-study prose in MDX; components carry none of it. A content test fails the build on invented metrics, certification wording and straight quotes.
  • Demos that load late. Each demo in How I build fetches its own code only when it nears the screen, so none of it weighs on the first load.
  • Motion with rules. CSS draws the hero and the diagrams and runs the section reveals; the Motion library loads only with the demos that use it. Every animation runs once, moves only transform, opacity and stroke, and switches off when the system asks for reduced motion.
  • Icons and marks. Interface icons come from Phosphor; technology marks come from Simple Icons, in one colour. Microsoft products are named in text.

Design

The visual language borrows from threat-model diagrams. A dashed line is a trust boundary, a solid arrow is a request, and a dotted arrow is an asynchronous message. Steel blue is the only interactive colour; green and red appear only where an authorization decision is permitted or denied.

Accessibility and testing

Unit tests in Vitest check the content rules and the geometry of every architecture diagram. Playwright runs the end-to-end tests in real browsers on every push: axe checks each page in both themes for accessibility violations, and the tests walk each demo by keyboard, check its announcements, and check that nothing moves under reduced motion. Lighthouse CI then measures the built site and fails the build when it goes over budget. CI writes what that run measured into the site on each deploy, so the numbers below are never typed by hand.

Measured

Lighthouse 12.6.1, mobile emulation, the median of 3 runs per page, measured on 2 October 2026.

Lighthouse scores and first-load JavaScript per page
PagePerformanceAccessibilityBest practicesSEOFirst-load JS
/81100100100238 KB
/projects/clearinsight-ai89100100100229 KB

The target is 95 or higher for every score. Below it: performance on / (81) and performance on /projects/clearinsight-ai (89).

The home page loads 238 KB of JavaScript on first load: over the 170 KB target, and under the 240 KB budget that fails the build.

Tests

From the same run as the Lighthouse numbers.

  • Unit and content tests in Vitest: 71 of 72 pass.
  • End-to-end tests in Playwright: 146 of 146 pass, in Chromium.

Accessibility

  • axe: 14 of 14 scans find no serious or critical WCAG 2.2 AA violations, across 7 routes in the light and dark themes, in Chromium.
  • Layout: no horizontal overflow on 7 routes at 8 widths from 360 to 1920px (7 of 7 checks pass).
  • Keyboard: every focus stop on the home page is visible and shows a focus ring (1 of 1 checks pass).
  • Forced colours: diagram boundaries and edges keep a system colour (1 of 1 checks pass).