From d4a7fc19b673d0e7c282563b120fe9f239c6f7cc Mon Sep 17 00:00:00 2001 From: mifi Date: Mon, 9 Mar 2026 21:46:03 -0300 Subject: [PATCH] Now with pre-commit hooks, to stop this ridiculousness. Linty fresh. Pretty. And up-to-date dependencies. --- .husky/pre-commit | 1 + AGENTS.md | 14 +- README.md | 7 +- package.json | 29 +- playwright.config.ts | 7 +- pnpm-lock.yaml | 1427 +++++++---------- scripts/beasties.mjs | 47 + scripts/critters.mjs | 71 - scripts/generate-sitemap.mjs | 2 +- scripts/minify-static-js.mjs | 2 +- scripts/run-e2e-in-docker.sh | 27 + scripts/run-e2e.sh | 19 + src/app.css | 146 +- src/lib/components/Breadcrumbs.svelte | 61 + src/lib/components/Footer.svelte | 4 +- src/lib/components/ServiceSection.svelte | 4 +- src/lib/components/ServicesCardGrid.svelte | 87 +- src/lib/components/WhoGrid.svelte | 3 +- .../components/home/ServicesOverview.svelte | 114 -- src/lib/data/home/services.ts | 26 + src/routes/+page.svelte | 9 +- .../mvp-architecture-and-launch/+page.svelte | 436 ----- .../+page.svelte | 8 + .../+page.svelte | 8 + .../mvp-architecture-and-launch/+page.svelte | 8 + .../stage-aligned-infrastructure/+page.svelte | 8 + .../home-chromium-darwin.png | Bin 593558 -> 0 bytes .../home-chromium-desktop-linux.png | Bin 0 -> 551011 bytes .../home-chromium-linux.png | Bin 567613 -> 0 bytes .../home-chromium-mobile-linux.png | Bin 0 -> 561251 bytes .../privacy-policy-chromium-darwin.png | Bin 588886 -> 0 bytes ...privacy-policy-chromium-desktop-linux.png} | Bin .../privacy-policy-chromium-mobile-linux.png | Bin 0 -> 557209 bytes .../services-chromium-darwin.png | Bin 403664 -> 0 bytes .../services-chromium-desktop-linux.png | Bin 0 -> 389900 bytes .../services-chromium-linux.png | Bin 389582 -> 0 bytes .../services-chromium-mobile-linux.png | Bin 0 -> 384393 bytes ...o-for-early-stage-saas-chromium-darwin.png | Bin 829493 -> 0 bytes ...arly-stage-saas-chromium-desktop-linux.png | Bin 0 -> 808347 bytes ...to-for-early-stage-saas-chromium-linux.png | Bin 802698 -> 0 bytes ...early-stage-saas-chromium-mobile-linux.png | Bin 0 -> 813125 bytes ...rchitecture-consultant-chromium-darwin.png | Bin 964984 -> 0 bytes ...ture-consultant-chromium-desktop-linux.png | Bin 0 -> 933118 bytes ...architecture-consultant-chromium-linux.png | Bin 922451 -> 0 bytes ...cture-consultant-chromium-mobile-linux.png | Bin 0 -> 940580 bytes ...rchitecture-and-launch-chromium-darwin.png | Bin 735349 -> 0 bytes ...ture-and-launch-chromium-desktop-linux.png | Bin 0 -> 703090 bytes ...architecture-and-launch-chromium-linux.png | Bin 698520 -> 0 bytes ...cture-and-launch-chromium-mobile-linux.png | Bin 0 -> 688258 bytes ...aligned-infrastructure-chromium-darwin.png | Bin 927261 -> 0 bytes ...-infrastructure-chromium-desktop-linux.png | Bin 0 -> 890873 bytes ...-aligned-infrastructure-chromium-linux.png | Bin 886164 -> 0 bytes ...d-infrastructure-chromium-mobile-linux.png | Bin 0 -> 889397 bytes .../terms-of-service-chromium-darwin.png | Bin 372514 -> 0 bytes ...rms-of-service-chromium-desktop-linux.png} | Bin ...terms-of-service-chromium-mobile-linux.png | Bin 0 -> 359520 bytes 56 files changed, 905 insertions(+), 1670 deletions(-) create mode 100644 .husky/pre-commit create mode 100644 scripts/beasties.mjs delete mode 100644 scripts/critters.mjs create mode 100755 scripts/run-e2e-in-docker.sh create mode 100755 scripts/run-e2e.sh create mode 100644 src/lib/components/Breadcrumbs.svelte delete mode 100644 src/lib/components/home/ServicesOverview.svelte create mode 100644 src/lib/data/home/services.ts delete mode 100644 src/routes/mvp-architecture-and-launch/+page.svelte delete mode 100644 tests/visual.spec.ts-snapshots/home-chromium-darwin.png create mode 100644 tests/visual.spec.ts-snapshots/home-chromium-desktop-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/home-chromium-linux.png create mode 100644 tests/visual.spec.ts-snapshots/home-chromium-mobile-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/privacy-policy-chromium-darwin.png rename tests/visual.spec.ts-snapshots/{privacy-policy-chromium-linux.png => privacy-policy-chromium-desktop-linux.png} (100%) create mode 100644 tests/visual.spec.ts-snapshots/privacy-policy-chromium-mobile-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-chromium-darwin.png create mode 100644 tests/visual.spec.ts-snapshots/services-chromium-desktop-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-chromium-linux.png create mode 100644 tests/visual.spec.ts-snapshots/services-chromium-mobile-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-fractional-cto-for-early-stage-saas-chromium-darwin.png create mode 100644 tests/visual.spec.ts-snapshots/services-fractional-cto-for-early-stage-saas-chromium-desktop-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-fractional-cto-for-early-stage-saas-chromium-linux.png create mode 100644 tests/visual.spec.ts-snapshots/services-fractional-cto-for-early-stage-saas-chromium-mobile-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-hands-on-saas-architecture-consultant-chromium-darwin.png create mode 100644 tests/visual.spec.ts-snapshots/services-hands-on-saas-architecture-consultant-chromium-desktop-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-hands-on-saas-architecture-consultant-chromium-linux.png create mode 100644 tests/visual.spec.ts-snapshots/services-hands-on-saas-architecture-consultant-chromium-mobile-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-mvp-architecture-and-launch-chromium-darwin.png create mode 100644 tests/visual.spec.ts-snapshots/services-mvp-architecture-and-launch-chromium-desktop-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-mvp-architecture-and-launch-chromium-linux.png create mode 100644 tests/visual.spec.ts-snapshots/services-mvp-architecture-and-launch-chromium-mobile-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-stage-aligned-infrastructure-chromium-darwin.png create mode 100644 tests/visual.spec.ts-snapshots/services-stage-aligned-infrastructure-chromium-desktop-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/services-stage-aligned-infrastructure-chromium-linux.png create mode 100644 tests/visual.spec.ts-snapshots/services-stage-aligned-infrastructure-chromium-mobile-linux.png delete mode 100644 tests/visual.spec.ts-snapshots/terms-of-service-chromium-darwin.png rename tests/visual.spec.ts-snapshots/{terms-of-service-chromium-linux.png => terms-of-service-chromium-desktop-linux.png} (100%) create mode 100644 tests/visual.spec.ts-snapshots/terms-of-service-chromium-mobile-linux.png diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..075dc6e --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +pnpm run test:ci diff --git a/AGENTS.md b/AGENTS.md index 34a9ec9..ea81e5d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -10,7 +10,7 @@ This file helps LLM agents work in this repo without introducing anti-patterns. ## Stack and architecture - **Framework**: SvelteKit with **adapter-static**. All routes are prerendered; there is no client-side router or hydration (`csr: false` in `src/routes/+layout.ts`). -- **Build**: `pnpm run build` = `vite build` → `node scripts/critters.mjs` → `node scripts/generate-sitemap.mjs` → `node scripts/minify-static-js.mjs`. Output is `dist/` (static files only). Deploy uses this; no 410 path copies. For local preview with 410 URLs working, use `pnpm run build-preview` (adds `copy-410-paths.mjs`). The 410 path dirs are in `.dockerignore` so they are never included in the image. +- **Build**: `pnpm run build` = `vite build` → `node scripts/beasties.mjs` → `node scripts/generate-sitemap.mjs` → `node scripts/minify-static-js.mjs`. Output is `dist/` (static files only). Deploy uses this; no 410 path copies. For local preview with 410 URLs working, use `pnpm run build-preview` (adds `copy-410-paths.mjs`). The 410 path dirs are in `.dockerignore` so they are never included in the image. - **Runtime**: nginx serves `dist/` (mounted as `/usr/share/nginx/html` in the container). No Node at runtime. - **Theming**: CSS only. Light/dark follows **system preference** via `@media (prefers-color-scheme: dark)` in `src/app.css`. There is no JS theme toggle or `data-theme`; do not add one unless explicitly requested. - **Fonts**: **Local only.** Inter and Fraunces are served from `static/assets/fonts/` (e.g. `inter-v20-latin-*.woff2`, `fraunces-v38-latin-*.woff2`). Preloads are in `src/routes/+layout.svelte`. Do not add Google Fonts or other external font URLs for the main site or error pages. @@ -27,7 +27,7 @@ This file helps LLM agents work in this repo without introducing anti-patterns. | `src/lib/data/*.ts` | Content and meta (home-meta, content, experience, engagements, json-ld). Edit here for copy or SEO. | | `src/lib/seo.ts` | SEO defaults (baseUrl, theme colors, etc.) and `mergeMeta()`. | | `static/` | Copied as-is into `dist/` by SvelteKit. Favicon, robots.txt, fonts, images, **404.html**, **410.html**, and **assets/error-pages.css** live here. | -| `scripts/critters.mjs` | Post-build: inlines critical CSS into **every** `dist/*.html` (including 404 and 410). Resolves stylesheet URLs relative to `dist/`. | +| `scripts/beasties.mjs` | Post-build: inlines critical CSS into **every** `dist/*.html` (including 404 and 410). Resolves stylesheet URLs relative to `dist/`. | | `scripts/minify-static-js.mjs` | Post-build: minifies JS in `dist/assets/`. | | `scripts/copy-410-paths.mjs` | Run by `build-preview` only: copies `410.html` to each 410 URL path as `index.html` so static preview (e.g. `serve dist`) shows the 410 page at those URLs. Production uses `build` (no copy); nginx returns 410 via explicit location blocks and `error_page 410 /410.html`. | | `nginx.conf` | Serves static files; `try_files $uri $uri/ /index.html` for SPA-style fallback; `error_page 404 /404.html` and `error_page 410 /410.html` for custom error pages. | @@ -36,8 +36,8 @@ This file helps LLM agents work in this repo without introducing anti-patterns. - **Files**: `static/404.html`, `static/410.html`. They are **standalone HTML** (not Svelte). Do not convert them to Svelte routes. - **Styling**: Both link to **one** shared stylesheet: ``. All error-page CSS lives in **`static/assets/error-pages.css`** (theme variables for light/dark, local `@font-face` for Inter/Fraunces, layout for `.error-page`). Do not duplicate theme tokens or add inline ` diff --git a/src/lib/components/Footer.svelte b/src/lib/components/Footer.svelte index 982f383..1238201 100644 --- a/src/lib/components/Footer.svelte +++ b/src/lib/components/Footer.svelte @@ -9,7 +9,7 @@ -