Production readiness: security headers, global error boundary, JSON-LD, font display swap, schema tests#4
Draft
Copilot wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…font display swap, schema tests, CI enhancements Co-authored-by: JevonThompsonx <104575457+JevonThompsonx@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Conduct production readiness audit on codebase
Production readiness: security headers, global error boundary, JSON-LD, font display swap, schema tests
Mar 19, 2026
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.
Addresses a comprehensive production readiness audit identifying missing security hardening, error boundaries, structured data, and test coverage gaps.
Security Headers
Added 7 HTTP response headers via
next.config.tsapplied to all routes:unsafe-evalexplicitly excluded from CSPscript-src.Error Handling
src/app/global-error.tsx— catches crashes in the root layout itself (e.g.,<Header>,<Providers>). Uses inline styles since global CSS may not load when the root layout fails.JSON-LD Structured Data
layout.tsx:Personschema injected into<head>— name, jobTitle, email, GitHub, LinkedInblog/[slug]/page.tsx:BlogPostingschema per article — headline, dates, author, optional imageFont Performance
Added
display: "swap"to all threenext/font/googledeclarations (Sora, Source Sans 3, JetBrains Mono), eliminating FOIT and improving CLS/FCP.Tests
Added
src/schemas/blog.test.tswith 9 unit tests covering Zod schema validation: valid payloads, slug format enforcement, URL validation for cover images, andcurrentSlugrequirement on updates.CI
bun auditstep before build for dependency vulnerability scanningNEXT_PUBLIC_APP_URLenv var to the build step to satisfy env validationOriginal prompt
You are a multi-disciplinary engineering team performing a production readiness audit on this codebase. You embody seven specialist perspectives simultaneously and apply each when its domain is relevant:
Project Context
This is a personal portfolio and blog built with:
The app is functionally complete. The goal is to identify every gap between current state and production-grade quality, then produce a prioritized remediation plan.
Audit Instructions
Phase 1 — Full Codebase Scan
Walk through every file in the project. For each area below, assess current state against the standard described. Note what exists, what's missing, and what's misconfigured.
Phase 2 — Findings Report
Produce findings organized by specialist domain. Each finding must include:
Phase 3 — Prioritized TODO List
After all findings, produce a single consolidated TODO list grouped into three tiers:
Within each tier, order by effort (quick wins first).
Audit Checklist — Apply These Standards
TypeScript & Code Quality
strict: truein tsconfig — noany, noasassertions, no!non-null assertionsnoUncheckedIndexedAccess: trueenabled.parse()or type guards, neverascomponents/ui/@/*path alias^or~)bun.lockcommittedSecurity
server-onlyimports — neverSELECT *dangerouslySetInnerHTMLwith user-controlled input.env/.env.localin.gitignoreAUTH_SECRETis a dedicated random value, not derived from other secretsServer/Client Component Architecture
"use client"only for interactivity, hooks, browser APIs"use client"boundary pushed as far down the component tree as possible<Suspense>boundaries around slow data fetchesDatabase & Data Access
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.