Adam BlansettSenior Full-Stack & AI Engineer
Developer Tools & StartersActive Open-Source Release v0.1.0 (MIT)

Frontend Backend Diagnostic

TypeScript CLI (`fbd`) that scans full-stack codebases, traces 15-stage HTTP/CORS requests, detects OpenAPI contract drift, and applies atomic rollback-safe fixes.

Engineering RoleCreator & Lead Maintainer

01. Problem & Context

Full-stack teams burn hours debugging elusive integration failures between frontend clients and backend APIs—duplicate URL slashes (`//users`), missing `Content-Type: application/json` headers, hanging fetches without `AbortSignal` timeouts, silent empty `catch` blocks, CORS preflight mismatches, and drifted response schemas.

02. Engineering Solution

Built `frontend-backend-diagnostic` (`fbd`), a read-only-by-default TypeScript CLI covering five workflows (`scan`, `probe`, `contract`, `rollback`, `init`). Inspects React, Next.js, Vue, Svelte, Vite, Angular, Express, NestJS, Fastify, FastAPI, Flask, Django, and Go Gin projects across 19 modular rules, runs live 15-stage CORS/latency probes, diffs TypeScript AST API consumers against backend routes/OpenAPI specs, and applies atomic `--fix` patches backed by timestamped `.fbd-backup/` snapshots.

03. System Architecture

A modular CLI (`scan`, `probe`, `contract`, `rollback`, `init`) pairs TypeScript AST and multi-framework static analyzers (19 rules across API client, request lifecycle, CORS, auth, and env layers) with an active 15-stage HTTP probe engine, automatic secret redaction, and snapshot-backed patch application outputting Terminal, Markdown, JSON, and OASIS SARIF v2.1.0 reports.

Core Architectural Components

19-Rule Full-Stack Static Scanner (`fbd scan`)

Detects framework layouts and flags issues such as duplicate URL slashes (`FE-URL-001`), silent empty catches (`FE-ERR-001`), missing `Content-Type: application/json` (`FE-HDR-001`), fetch calls missing `AbortSignal` timeouts (`FE-TIME-001`), CORS rules, and auth/config drift with `--watch` support.

15-Stage Active Network & CORS Forensics (`fbd probe`)

Executes live endpoint traces simulating browser request lifecycles, validating CORS preflight responses with custom `--origin`, measuring TTFB and download latency, and auditing response security headers.

AST-to-Backend & OpenAPI Contract Analyzer (`fbd contract`)

Extracts frontend API calls, TypeScript AST destructuring, and template literals and compares them against backend route handlers and OpenAPI 3.0/3.1 / Swagger 2.0 specs to catch payload drift.

Atomic `--dry-run` / `--fix` & Snapshot `rollback`

Previews safe mechanical patches via `--dry-run`, applies atomic edits only with explicit `--fix`, snapshots original files into `.fbd-backup/`, and restores exact state via `fbd rollback`.

04. Notable Engineering Decisions

Read-Only by Default with Snapshot-Backed Atomic `--fix` & `rollback`

Diagnostic tools must never silently mutate source trees. Separating read-only `scan` from `--dry-run`, `--fix`, and timestamped `.fbd-backup/` `rollback` guarantees safe recovery.

Combining Static AST Inspection with Active 15-Stage Browser-Mode Probes

Static scans catch missing timeouts and URL bugs in source code, while active CORS preflight and security-header probes verify actual runtime gateway behavior.

Strict Credential Redaction Across Logs, Traces & SARIF Reports

Network traces and config scans routinely touch auth headers and tokens; automatic redaction ensures diagnostic exports remain safe to attach to GitHub issues and CI runs.

05. Engineering Challenges & Solutions

Challenge: Bridging frontend TypeScript client expectations and backend framework route definitions across polyglot stacks.

Engineering Solution: Combined TypeScript AST call-site extraction with multi-framework backend detectors (Express, NestJS, Fastify, FastAPI, Flask, Django, Go Gin) and OpenAPI 3.0/3.1 spec matching.

Challenge: Reproducing browser-only CORS failures and slow TTFB regressions from the terminal.

Engineering Solution: Built the 15-stage `fbd probe` tracer with custom `--origin` preflight simulation, timing breakdown, and JSON trace export.

06. Implementation Highlights

  • 5 CLI commands (`scan`, `probe`, `contract`, `rollback`, `init`) supporting React, Next.js, Vue, Svelte, Vite, Angular, Express, NestJS, Fastify, FastAPI, Flask, Django, and Go Gin
  • 19 modular diagnostic rules (`FE-URL-001`, `FE-ERR-001`, `FE-HDR-001`, `FE-TIME-001`, backend CORS/auth/config) with `--watch` mode
  • Active 15-stage network `probe` with custom `--origin` CORS preflight simulation, TTFB/download timing, and security header checks
  • AST + OpenAPI 3.0/3.1 contract drift analyzer (`fbd contract`) and Terminal, Markdown, JSON, and OASIS SARIF v2.1.0 outputs
  • Read-only by default; `--dry-run` preview, atomic `--fix`, and timestamped `.fbd-backup/` `rollback` plus automatic secret redaction
  • Verified across 8 Vitest files (32 passing tests) and Node 20.x/22.x GitHub Actions CI