CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Commands

npm run serve    # Local dev server with live reload (http://localhost:8080)
npm run build # Production build → _site/
npm run watch # Watch and rebuild without server
npm run debug # Build with full DEBUG logging

Requires Node >= 22 (see .nvmrc).

Architecture

This is a static site built with Eleventy (11ty) and deployed to Netlify. Output goes to _site/.

Two Eleventy config files exist:

Content collections:

Templates: Nunjucks (.njk) in _includes/layouts/ and _includes/partials/. Layout hierarchy is base.njk → content-specific layouts.

Data layer:

CSS: Plain CSS split across css/ files; no preprocessor or bundler. css/main.css is the primary stylesheet.

Client JS: Minimal — js/theme-switch.js (dark/light mode toggle) and js/compound-calc.js (a calculator tool).

Spotify page (spotify.html) uses Firebase for real-time data alongside the build-time _data/spotify.js fetch.

Environment Variables

Copy .env.example to .env (if present) or create .env with Spotify API credentials for the Spotify integration to work during build.