Inject and display build metadata in your Next.js app deployed on Vercel:
- App version from
package.json - Commit SHA from Vercel git env vars
- Build time generated once per
next build
- Read
package.jsonfor the app version. - Capture current ISO timestamp at build.
- Use Vercel-provided env vars for repo + commit details.
- Expose everything through
NEXT_PUBLIC_*so it’s available in SSR and client code. - Render in a shared component (e.g. footer).
VERCEL_GIT_REPO_OWNERVERCEL_GIT_REPO_SLUGVERCEL_GIT_COMMIT_SHA