Build the nickcatalano.com site on Next.js 16#1
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Rebuilds nickcatalano.com from a minimal placeholder into a full Next.js 16 App Router site with a server-action–driven “fun bio rewrite” feature, Redis-backed caching/rate-limiting, and analytics/SEO infrastructure.
Changes:
- Upgrade to Next.js 16 + React 19 with App Router, Tailwind v4 styling, and improved homepage layout/typography.
- Add AI “bio rewriter” feature using OpenAI Structured Outputs with HMAC-signed prompts, per-IP rate limiting, and cached rewrites.
- Add analytics (PostHog + production-only GA), SEO metadata + JSON-LD, and supporting tooling (env example, CI, Jest, ESLint, local Redis via Docker Compose).
Reviewed changes
Copilot reviewed 35 out of 39 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Updates TS compiler settings for the new Next.js app setup. |
| README.md | Documents the new Next.js app, AI feature, env vars, and workflows. |
| package.json | Upgrades to Next.js 16 and adds dependencies/scripts for AI, Redis, linting, typecheck, and tests. |
| next.config.ts | Configures PostHog proxy rewrites and externalizes posthog-node for server bundling. |
| lib/signing.ts | Implements HMAC signing + verification for prompt tokens. |
| lib/signing.test.ts | Adds Jest tests covering signing/verifying, tampering, and expiry. |
| lib/schemas.ts | Defines Zod schemas for Structured Outputs and request validation. |
| lib/rate-limit/upstash.ts | Implements Upstash-based rate limiting adapter. |
| lib/rate-limit/types.ts | Defines rate limiter interfaces/types. |
| lib/rate-limit/local.ts | Implements local Redis rate limiting adapter. |
| lib/rate-limit/index.ts | Provides a unified limiter with dev/prod failover policy. |
| lib/posthog.ts | Adds server-side PostHog client + $ai_generation capture helper. |
| lib/openai.ts | Adds OpenAI calls for suggestions and rewrites with Structured Outputs + observability. |
| lib/env.ts | Adds environment resolution/validation with dev/prod behavior differences. |
| lib/dto.ts | Defines DTOs returned by server actions to the client. |
| lib/cache/upstash.ts | Implements Upstash REST cache adapter (fail-open). |
| lib/cache/types.ts | Defines cache store interface. |
| lib/cache/local.ts | Implements local Redis cache adapter (fail-open). |
| lib/cache/index.ts | Provides cache factory selecting local/upstash/noop by env. |
| lib/bio.ts | Centralizes all site content (profile, bio, links, GA id). |
| jest.config.mjs | Configures Jest via next/jest. |
| eslint.config.mjs | Adds ESLint flat config using Next’s config + ignores. |
| docker-compose.yml | Adds local Redis service for dev. |
| components/posthog-provider.tsx | Lazy-loads posthog-js and provides client analytics when configured. |
| components/posthog-pageview.tsx | Manually captures $pageview for App Router navigations. |
| components/markdown.tsx | Renders rewrite output as Markdown via react-markdown + GFM. |
| components/BioRewriter.tsx | Client UI to generate suggestions, select a rewrite, and display results. |
| CLAUDE.md | Points Claude-specific guidance at AGENTS.md. |
| app/page.tsx | Implements the new homepage rendering from lib/bio.ts plus BioRewriter. |
| app/layout.tsx | Adds SEO metadata, JSON-LD Person schema, PostHog provider, and production-only GA. |
| app/globals.css | Defines site palette/typography variables and scoped Markdown styling. |
| app/actions.ts | Adds server actions for suggestions/rewrites with signing, rate limiting, caching, and analytics flush. |
| AGENTS.md | Adds contributor/agent conventions and hard rules for the repo. |
| .nvmrc | Pins Node.js major version for local/dev parity. |
| .gitignore | Ignores .swc artifacts. |
| .github/workflows/ci.yml | Adds CI for lint/typecheck/test on pushes/PRs. |
| .env.example | Provides documented env var template for local/prod configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3f26357 to
b75cc0e
Compare
b75cc0e to
ff9c9d4
Compare
Owner
Author
|
Both Copilot review comments addressed in |
Replaces the static one-pager with a full Next.js 16 (App Router, React 19, TypeScript, Tailwind v4) application. The original photo, biography, and links are preserved; all content has a single source of truth in lib/bio.ts. Site - Server-rendered homepage with the original content, refreshed typography (Fraunces) and a warm editorial palette. - SEO/social metadata (Open Graph, Twitter, canonical, robots) and JSON-LD Person structured data. Google Analytics preserved (production only). - PostHog web analytics, gated on POSTHOG_TOKEN and lazy-loaded out of the initial bundle. AI bio-rewriter - A "rewrite my bio in a funny voice" button: Server Actions generate five funny concepts via OpenAI Structured Outputs (GPT-5 Nano, minimal reasoning), each HMAC-signed; picking one rewrites the bio inline as markdown. The signed payload is authoritative -- the browser is never trusted to supply a prompt. - $ai_generation LLM observability via PostHog. Infrastructure - Swappable Redis behind lib/cache + lib/rate-limit factories: local ioredis in dev, Upstash over REST in prod (Vercel's KV_REST_API_* vars). Caching fails open; rate limiting fails closed in production. Daily per-IP limits (client IP from the non-forgeable x-real-ip header); rewrites cached 30 days. - Env validation (lenient in dev, fail-fast in prod). Tooling and docs - Jest signing tests, ESLint (flat config), GitHub Actions CI, Docker Compose for local Redis, .env.example, README, AGENTS.md, CLAUDE.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ff9c9d4 to
1e442f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the static one-pager with a full Next.js 16 app (App Router, React 19, TypeScript, Tailwind v4). The original photo, biography, and links are preserved — all content has a single source of truth in
lib/bio.ts. The headline feature is a playful "rewrite my bio in a funny voice" button, but the scope is the whole site: rendering, styling, SEO, analytics, and the supporting infrastructure.Site
Personstructured data.POSTHOG_TOKENand lazy-loaded out of the initial bundle (first-load JS ~111 kB).AI bio-rewriter
minimalreasoning for latency); each prompt is HMAC-signed. Picking one rewrites the bio inline, rendered as markdown. The original always stays visible.$ai_generationLLM observability via PostHog.Infrastructure
lib/cache+lib/rate-limitfactories: localioredisin dev, Upstash over REST in prod (reads Vercel'sKV_REST_API_*). Caching fails open; rate limiting fails closed in production.x-real-ipheader); rewrites cached 30 days.Tooling & docs
.env.example, README, AGENTS.md, CLAUDE.md.Deploy notes
OPENAI_API_KEY,BIO_SIGNING_SECRET, a Redis store (injectsKV_REST_API_*), and optionallyPOSTHOG_TOKEN.Verification
typecheck·lint·test(6/6) · productionbuildall green on Next 16; homepage prerenders static (no AI on load).🤖 Generated with Claude Code