Skip to content

zrt219/Build-Doctor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Doctor Fuji banner

Zhane's Portfolio Vercel / Build Doctor

Zhane's Portfolio Vercel is the public command center for Zhane Grey's Vercel-hosted AI engineering portfolio. The hub keeps Build Doctor as the flagship deploy-debugging tool while linking the broader portfolio surface: resume tailoring, evidence dashboards, gateway failover, enterprise agent workflows, RAG/digital twin systems, visual systems, DatumX, and supporting Vercel demos.

Build Doctor is a Vercel-deployed developer tool that turns failed Next.js and Vercel build logs into a traceable root-cause diagnosis, safe patch draft, optional DeepSeek review, and exportable markdown incident report.

The deterministic engine is the source of truth. Optional LLM review is isolated behind a fail-closed enrichment layer and only receives sanitized diagnosis data.

Live Links

Portfolio Vercel Directory

Fuji Detail

Lake Kawaguchiko and Mount Fuji

This close-up frame keeps the README atmospheric without weakening the technical layout.

What It Does

Build Doctor supports a five-step workflow:

  1. Paste build logs
  2. Diagnose root cause
  3. Show local trace
  4. Suggest patch draft
  5. Export report

The app:

  • Redacts secrets before display, reporting, or optional provider review.
  • Classifies the likely failure with deterministic rules.
  • Extracts evidence lines and affected subsystem signals.
  • Builds a local diagnostic trace and safe patch draft.
  • Offers deterministic suggested solutions and an editable fix plan.
  • Optionally requests a DeepSeek review through OpenRouter using sanitized diagnosis JSON only.
  • Exports a markdown incident report with evidence and remaining risks.

Core Product Positioning

Build Doctor is not a hallucination-first debugging agent.

The local pipeline owns:

  • redaction
  • failure classification
  • evidence extraction
  • diagnostic trace
  • patch draft
  • suggested solutions
  • markdown export

The optional DeepSeek layer can improve the explanation, but it does not replace deterministic diagnosis and it does not apply code changes.

Architecture

Build log input
  -> redact secrets
  -> classify failure
  -> extract evidence
  -> map remediation
  -> build patch draft
  -> build suggested solutions
  -> export markdown report
  -> optional sanitized DeepSeek review

Build Doctor Fuji dashboard

Primary implementation areas:

  • src/lib/redact-secrets.ts
  • src/lib/log-parser.ts
  • src/lib/failure-taxonomy.ts
  • src/lib/patch-recipes.ts
  • src/lib/build-doctor/index.ts
  • src/lib/build-doctor/openrouter.ts
  • src/lib/build-doctor/llm/openrouter-deepseek.ts
  • src/lib/build-doctor/solution-suggestions.ts
  • src/app/api/diagnose/route.ts
  • src/app/api/enrich/route.ts
  • src/app/api/report/route.ts

Failure Coverage

Current deterministic taxonomy includes:

  • MISSING_ENV_VAR
  • TYPESCRIPT_ERROR
  • MODULE_NOT_FOUND
  • NEXT_BUILD_ERROR
  • NEXT_STATIC_GENERATION_ERROR
  • APP_ROUTER_ROUTE_HANDLER_ERROR
  • PACKAGE_INSTALL_ERROR
  • PACKAGE_JSON_PARSE
  • PNPM_LOCKFILE_MISMATCH
  • SPAWN_PERMISSION
  • PRISMA_DATABASE_ERROR
  • SUPABASE_CONFIG_ERROR
  • STRIPE_WEBHOOK_ERROR
  • VERCEL_ENV_VAR_MISSING
  • VERCEL_RUNTIME_ERROR
  • SERVERLESS_FUNCTION_LIMIT
  • OUT_OF_MEMORY
  • ESLINT_BUILD_ERROR
  • VITE_BUILD_ERROR
  • UNKNOWN

Optional DeepSeek Review

OpenRouter enrichment is optional and guarded.

Current live model target:

  • deepseek/deepseek-v4-flash:free

Safety rules:

  • paid models are blocked by default
  • openrouter/free is blocked
  • openrouter/auto is blocked
  • raw logs are not sent to the provider
  • secrets are not sent to the provider
  • plain JSON output is parsed and Zod-validated
  • invalid provider output fails closed
  • deterministic diagnosis remains available when provider review fails

Suggested Solutions

Step 4 includes deterministic suggested solutions for major failure classes.

The user can:

  • review solution cards
  • inspect likely affected files
  • copy snippets
  • copy verification commands
  • autofill an editable fix plan
  • include selected solutions in the exported report

These suggestions do not auto-apply patches and do not require a model provider.

Security Model

Security controls currently verified in the repo:

  • secret redaction before UI output
  • secret redaction before report export
  • secret redaction before optional provider review
  • no paid-model fallback by default
  • read-only GET /api/integration-health
  • public integration-health write probes removed
  • .vercelignore excludes local .env, .omx, .next, node_modules, and test artifacts from deployment upload
  • Vercel production env vars are configured as encrypted project variables

Supabase status:

  • project: gajpnqqfkjtmqdnufbcf
  • evidence tables present: suite_events, demo_runs, eval_runs, exported_reports
  • probe-like rows cleaned from suite_events

Verification

Latest verified release checks:

  • npm run typecheck
  • npm run test
  • npm run build
  • npm run test:e2e
  • npm audit --audit-level=moderate
  • npm run audit:security
  • npm run audit:45k
  • npm run audit:report

Latest verified results:

  • unit tests: 25 passing
  • E2E tests: 4 passing
  • npm audit: 0 vulnerabilities
  • security audit: 4,000 / 4,000
  • premium audit: 45,000 / 45,000

Generated audit artifacts:

Engineering Log

The repo includes a running verified engineering log:

Use it as the canonical proof trail for:

  • shipped changes
  • verification commands
  • deployment evidence
  • resume-safe summaries

Recent verified themes from the log:

  • deterministic Build Doctor architecture and failure taxonomy expansion
  • DeepSeek free OpenRouter integration with fail-closed guards
  • employer-facing UI and report copy polish
  • deterministic suggested solutions and editable fix plans
  • Supabase readiness verification and probe cleanup
  • release hardening, dependency vulnerability remediation, Vercel deployment hardening, and GitHub publication

Repo Structure

Key paths:

  • src/app/build-doctor UI routes and page entry points
  • src/components/ Build Doctor UI components
  • src/lib/build-doctor/ diagnosis and provider orchestration
  • src/test/build-doctor.test.ts deterministic unit coverage
  • e2e/build-doctor.spec.ts Playwright browser coverage
  • docs/ deeper product and release documentation
  • screenshots/ visual QA evidence
  • ai-engineering/ verified engineering log

Local Development

npm install
npm run dev

Open:

  • http://localhost:3000/
  • http://localhost:3000/build-doctor

Useful commands:

npm run typecheck
npm run test
npm run build
npm run test:e2e
npm run audit:security
npm run audit:45k
npm run audit:report

Environment

Deterministic mode works without paid provider access.

See:

Important variables:

ENABLE_LLM_ENRICHMENT=false
LLM_PROVIDER=mock
OPENROUTER_API_KEY=
OPENROUTER_MODEL=deepseek/deepseek-v4-flash:free
OPENROUTER_SITE_URL=http://localhost:3000
OPENROUTER_APP_TITLE=Build Doctor
ALLOW_PAID_LLM_MODELS=false
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=

Deployment

Production deploy target:

Latest verified production deployment:

  • deployment id: dpl_251nHCbKjvck2zthFXunuCcTEG2p

GitHub repository:

Latest release commits:

  • 9160af1 Harden Vercel deployment inputs
  • df04d48 Document Build Doctor release evidence
  • cfb9b52 Release Build Doctor security hardening

Screenshots

Selected visual evidence:

  • screenshots/build-doctor-final-desktop.png
  • screenshots/build-doctor-final-mobile.png
  • screenshots/build-doctor-final-diagnosed.png
  • screenshots/build-doctor-suggested-solutions.png

Limitations

  • Diagnosis is deterministic and log-based, not live repo introspection.
  • Optional provider review can be rate-limited.
  • Suggested solutions are template-driven and should be reviewed by a developer before code changes.
  • This is a reviewer-facing engineering product, not a multi-tenant SaaS platform.

Resume-Safe Summary

  • Built Build Doctor, a Vercel-deployed developer tool that diagnoses failed Next.js and Vercel build logs through a deterministic taxonomy, redacts secrets, generates traceable root-cause receipts, suggests safe patch drafts and deterministic remediation plans, optionally enriches explanations through DeepSeek via OpenRouter, and validates reliability with unit, browser, and audit coverage.

On-Chain Systems Portfolio

Core XRPL EVM systems plus related public product and AI repositories from the same portfolio.

Project Description Status
ZUC Mine Command Center On-chain uranium mining operations dashboard with real-time reserve tracking, miner registry, and direct contract interaction through a frontend-only control surface. Live
U235 Fuel Cycle Deterministic XRPL EVM fuel-cycle pipeline that tracks uranium batches from ore to enriched fuel rod with full on-chain traceability. Live
ISR Network In-situ recovery control system with on-chain asset tracking, lifecycle state transitions, and operator-facing industrial simulation. Live
Dark Matter Farm XRPL EVM staking protocol with three orbit tiers, lock-period yield mechanics, and event-driven reward emissions. Live
Cohr Lab Semiconductor laser fabrication lifecycle modeled as an immutable on-chain state machine from crystal growth to final pigtail. Live
ForgeX Foundry-powered XRPL EVM deployment console that combines a natural-language UI, Node CLI orchestration, and realtime shader-based visuals. Live
DatumX Verification protocol for AI-transformed industrial data with deterministic lineage, validator review, and XRPL EVM finalization. Live
Ethex Lottery Game Foundry plus Next.js betting workflow that modernizes the EthexLoto lifecycle for XRPL EVM reviewer-facing execution. Public Repo
3DMoonX Cinematic lunar industrial-base experience that combines Blender source assets with a React Three Fiber web runtime. Live
Unknown002 Browser-based 3D engineering viewer for a nuclear-electric propulsion spacecraft concept with staged prompt-pack support. Public Repo
AI Engineering Evidence Engine Interactive evidence dashboard that turns local engineering proof into a reviewer-facing systems narrative. Live
Build Doctor Codex-style build diagnosis harness for failed Next.js and Vercel builds with deterministic failure analysis. Live
AI Gateway Failover Playground Public-facing sandbox for request routing, provider fallback, and resilient AI gateway behavior. Live
Enterprise Agent Workflow Studio Public-facing studio for approval-gated enterprise agent workflows, risk scoring, and audit-oriented design. Live
Resume Evidence RAG Auditor Public-facing proof surface for claim verification, evidence retrieval, and grounded resume bullet generation. Live
AI Resume Tailor Service Static Vercel-ready application for evidence-backed resume, cover-letter, and job-packet tailoring. Live
Fuji Cinematic Next.js Fuji gallery atlas for portfolio storytelling and visual system design. Live
AI Agents for Beginners Lesson repository for getting started building AI agents. Public Repo
Agentic RAG Memory Digital Twin Edge System Public-facing landing page for an agentic RAG, memory, and digital-twin edge-system portfolio project. Live

About

Codex-Style Agent Harness for Diagnosing Software Build Failures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors