✦ UX ENGINEERING · LIVE ARCHITECTURE

Building My Portfolio in Code

I built this portfolio in HTML, CSS, and JavaScript with AI coding tools. Working in the browser let me test responsive layouts and keyboard interactions as I designed, while keeping the implementation under my control.

My role

End-to-end: UX, UI, front-end architecture, and AI-assisted engineering. I designed the system, wrote the code, and built the workflow.

Key outcomes

  • Fully custom site built without templates or CMS
  • Reusable UI + code patterns across all case studies
  • AI assistant connected to project notes
Stack
Semantic HTML, Modular CSS, JavaScript, Vercel Serverless Functions, Supabase (pgvector), Gemini API
Tools
Cursor, Claude Code, Vercel, GitHub, Supabase
Repository
View source on GitHub ↗
Scope
Design, front-end architecture, AI workflow, and implementation

At a glance

  • The Goal: I wanted to build the entire site in code to sharpen my UX engineering workflow, test layout behavior and keyboard navigation under real rendering conditions, and ship without a frontend bottleneck.
  • How I Built It: Wrote custom semantic HTML and modular CSS with Cursor, avoiding bloated templates or heavy frontend frameworks. I built a serverless backend with Supabase and pgvector so the assistant could use relevant project notes rather than sending a full content file.
  • The Result: The result is a custom portfolio with shared design tokens, reusable page patterns, and an assistant connected to my project notes. Building it also gave me a practical workflow for testing interface ideas in code.

Problem

I do my best work when I'm close to the implementation. Sitting between design and engineering helps me spot technical constraints early, speak the same language as our developers, and avoid designing interactions that are difficult to maintain in production.

Rather than putting static screenshots in a CMS template, I built this portfolio from scratch to test modern AI-assisted engineering tools on a real project.

What I set out to do

  • Move directly from an interaction idea into working code in a few hours
  • Create a clean token hierarchy that keeps styles modular across multiple pages
  • Build an AI chat assistant connected to relevant project notes
  • Keep the site lightweight, semantic, and keyboard accessible

Approach

I organized the project around clear technical guardrails: defining tokens first, standardizing layout grids, and testing interactions directly in the browser.

  • Cursor & Claude Code: Coding environments for writing semantic markup, styling tokens, and frontend scripts
  • Vercel & Supabase: Serverless deployment, vector search, and edge caching

The biggest takeaway was that AI tools are only as good as the guardrails you give them. When you establish clear tokens and layout rules upfront, AI acts as a reliable accelerator for boilerplate code rather than generating messy overrides.

System architecture

I treated the codebase like a design system from day one: defining tokens first, standardizing layout grids, and reusing markup patterns across all four case studies so every new section snapped into place cleanly.

Prompts

Clear, constrained instructions defining what to build and how

Foundation

Patterns

Reusable prompt structures for common UI and interaction problems

Structure

Components

Reusable elements like navigation, cards, layouts, and sections

Building blocks

Features

Full experiences including case studies and interactive elements

Shipped

The system connects structured prompts to real product features, not just generated code.

Illustrative architecture walkthrough

See how the assistant works

This walkthrough illustrates how a visitor question travels through the assistant pipeline, from input to retrieval and generation, rather than displaying real-time backend execution traces.

Visitor question

What has Ryan built related to AI?

User submits question from the chat widget

Vercel serverless function

Orchestrator

Receives question, checks tools needed, routes to RAG

Vector store

Supabase pgvector

Searches 34 curated knowledge chunks for context

Language model

Gemini 2.5 Flash

Generates answer from retrieved context + system prompt

Response

Ryan built an AI-powered portfolio assistant that uses structured project content, retrieval, and Gemini to answer visitor questions about his product design work, systems thinking, and builder experience.

Ready Type a question or use the default prompt, then run the walkthrough.

Building the system

Designing directly in the browser

Figma is great for team alignment, but jumping straight into HTML and CSS cut out an entire layer of translation lag. I could resize my browser window, test keyboard navigation, and check contrast under real rendering conditions instead of pretending static mockups told the whole story.

Project file structure in the Cursor editor
Project file structure in Cursor, built and tested directly in the editor.

Setting ground rules before writing code

If you do not give an AI coding tool strict rules, it will happily invent new CSS classes on every prompt and pad your copy with corporate fluff. Before writing code, I set up explicit project guidelines in local markdown files (CONTEXT.md and AGENTS.md). These defined my tone preferences, banned resume buzzwords, and set hard standards for keyboard accessibility and semantic HTML.

Keeping the CSS modular

The fastest way for an AI-assisted codebase to turn into an unmaintainable mess is letting it write styling rules wherever it wants. I split the stylesheets into clear layers: tokens for colors and spacing, base styles for typography, layout files for grids, and component files for interactive widgets (tokens.css, base.css, layout.css, components.css, pages.css). That kept our CSS clean, prevented styling collisions, and made stylesheets straightforward to maintain.

Implementation highlights

  • A consistent case study template that lets readers scan decisions quickly
  • Reusable layout patterns and components across every page
  • An AI chat widget connected to semantic search for hiring managers who want quick answers
  • Semantic HTML, ARIA landmarks, and SEO metadata baked directly into the templates

The result was a fast, accessible portfolio that behaves like a real product surface rather than a static brochure.

Here is a look at the previous version of this portfolio (hand-built, static HTML) compared to the current rebuild.

Previous homepage design
Previous homepage design before the rebuild.
Previous case study layout
Previous case study page layout.
Previous case study layout, alternate
Alternate layout from the previous case study system.

Making the AI Assistant Useful

The first version of my portfolio assistant shoved an entire 40KB JSON file into every single API call. It was simple to set up, but it was inefficient and blew through token limits the second someone asked a nuanced question.

Chat widget in the previous version of the portfolio
The original chat widget from the previous portfolio before moving to vector search.

I rebuilt the backend around Supabase and pgvector. Now, every case study and project note is broken into small chunks and indexed using Gemini embeddings. When a recruiter or visitor asks a question, the backend retrieves only the three or four most relevant paragraphs before generating an answer.

Getting the tone and accuracy right took plenty of testing. I had to set strict boundaries so the bot would decline questions outside my background, stream answers smoothly without lag, and track resume downloads so I know what hiring managers care about most.

Impact

The result is a custom portfolio with shared design tokens, reusable page patterns, and an assistant connected to my project notes. Building it also gave me a practical workflow for testing interface ideas in code.

The biggest advantage is rapid validation. When I want to test a layout idea or micro-interaction, I can build a working prototype in an afternoon, run it on a phone, and see if the ergonomics actually work.

What Didn't Work

Early on, I went down a rabbit hole building multiple visual skins, including a dark mode and a retro Windows 95 theme (alongside the terminal mode). While they were fun technical experiments, maintaining three separate color palettes and border conventions tripled CSS token maintenance and distracted from the case studies themselves.

I stripped the site back to a single high-contrast light theme to keep the design system maintainable and focused on content clarity. The lesson was straightforward: just because AI makes generating code fast doesn't mean you should keep every feature you prototype.

Lessons & Next Steps

Lessons

AI coding tools do not replace good software practices. If anything, they punish you faster if you do not have a plan. Without clear architecture upfront, an LLM will happily hand you messy CSS and duplicate utility classes.

  • Detailed system rules beat prompt hacking: Setting up explicit coding conventions and design tokens in markdown prevented messy rewrites later.
  • Browser testing catches real-world friction: Inspecting live HTML and CSS revealed keyboard navigation quirks and awkward responsive wrapping that Figma never surfaced.
  • Fast prototyping requires discipline: When coding is quick, it's easy to build unnecessary features (like the retro themes I ended up cutting). Knowing what to prune is the real job.

Next

  • Fine-tune vector retrieval evaluation for more precise project citations in the chat widget
  • Add lightweight code sandboxes for interactive case-study components
Next Project B2B SaaS · Business Intelligence & AI

Custom Dashboards & AI Summaries

Rebuilding a legacy BI tool around role-based templates and grounded AI summaries, driving 62% multi-dashboard adoption.