Portfolio@Anshuman791322
Shipping2026

Humanify

A Next.js writing-refinement and authenticity-review app with a multi-stage server pipeline.

Next.jsTypeScriptZodGemini APIServer pipeline

Humanify is a writing-refinement and authenticity-review app. It improves clarity, rhythm, specificity, tone, and readability while keeping meaning intact. It does not prove human authorship or guarantee outcomes from third-party classifiers — the external review notes are treated only as writing feedback.

01

Server-side multi-stage pipeline

`POST /api/refine` runs an eight-stage server pipeline. Input is validated with Zod, then a deterministic preflight scans for duplicate sentences, long sentences, repeated openings, generic transitions, inflated phrases, and unsupported claims. Diagnosis and fact-lock extraction feed a rewrite plan that drives the actual Gemini call.

  • Zod input validation + style controls
  • Deterministic preflight (duplicates, long sentences, generic transitions)
  • Fact-lock for claims, names, numbers, terms, references
  • Rewrite + post-rewrite quality check against the original
02

Privacy as a default

Session API keys are held in React memory only — never persisted in localStorage, never written to disk. Source documents and refined text don't get stored in the browser either. In Careful mode, an invented-content risk check triggers one stricter preservation rewrite before returning the result.

  • Gemini API key entered per-session, kept in React state only
  • No source-text persistence in the browser
  • Careful mode adds an extra strict preservation pass
Build journal

What I built, decided, traded, and learned.

What I built

Next.js UI (Input Console, Style Controls, Document Preflight, Voice Sample, Processing Terminal, Original vs Refined) + `/api/refine` server pipeline orchestrating Gemini calls.

Key decisions

Server-side pipeline (not client-only) so API keys never reach the browser bundle. Deterministic preflight before the model so quality issues are caught even on cold runs.

Trade-offs

Longer end-to-end latency than a one-shot prompt. Pipeline complexity means more failure modes to surface — every stage returns a warning array.

Outcomes

Single endpoint returns originalText, refinedText, preflight, diagnosis, factLock, qualityCheck, and warnings. Four Gemini model presets supported with safe fallback.

8Pipeline stages
4Gemini models supported
0Browser-stored text
ZodSchema-validated input

Want the source?

The source repository for Humanify is private. Contact me to request access.