Legal Tech
Immigration Letter Generator screenshot 1

Immigration Letter Generator

In Development — AI-Assisted Immigration Letter Workflow

An AI-assisted workflow that drafts immigration support letters from a structured multi-step intake form. The architecture covers preview, Stripe checkout, PDF formatting, and email delivery. Core paths are implemented; durable storage and operational hardening are still in progress.

Portfolio Case Study

This entry uses sanitized screenshots, feature breakdowns, and architecture notes. These products are not publicly accessible.

The Challenge

Immigration applicants need professionally worded support letters but cannot always afford attorney fees for every document. Generic templates don't account for individual circumstances. This automates the personalization layer while maintaining a clear disclaimer about tool vs. legal advice.

What We Built

  • Multi-step intake form with situation-specific questions per letter type
  • AI letter generation via OpenAI from structured form input (Claude fallback planned in service layer)
  • Letter preview with paywall gating — see the format before paying to unlock
  • Stripe Checkout for one-time purchase per letter
  • PDF generation with jsPDF — formatted and print-ready output
  • Resend email delivery of the completed letter PDF
  • Disclaimer system clearly distinguishing the tool from legal advice
  • Vercel Analytics for conversion funnel tracking

What Makes It Different

  • Paywall preview model — users see letter structure and quality before committing to purchase
  • Per-letter-type form schemas — questions adapt based on which document the user needs
  • jsPDF output produces a print-ready document, not raw text
  • Stripe + email loop designed so payment confirmation can trigger formatting and delivery

Architecture Highlights

  • ·Webhook-confirmed Stripe access — letter unlock happens only after server-side payment verification
  • ·Dynamic form schemas mean adding a new letter type requires only a schema definition, not new UI code
  • ·Known next step: replace in-memory document storage with durable persistence for reliable serverless operation

Results

Foundation and purchase/generation architecture are in place (AI generation, Stripe checkout, PDF formatting, email delivery). Marked in development until durable storage and operational hardening are complete.

Tech Stack

Next.js 14OpenAIStripejsPDFResendTailwindZod

Relevant For

  • Legal and document automation tools
  • AI content generation with paywalls
  • SaaS with Stripe one-time payments
  • PDF generation and delivery workflows
  • Law firm or legal services software

Tech Stack — How Each Piece Is Used

Next.js 14App Router with API routes for AI generation and Stripe webhook handling
OpenAILetter generation from structured form data with immigration-context system prompts
StripeOne-time checkout per letter type; webhook-confirmed access unlock
jsPDFClient-side PDF formatting and generation with proper letter layout
ResendTransactional email delivery of the completed PDF to the user's inbox
ZodPer-letter-type form validation schemas with field-level error messages
Vercel AnalyticsFunnel tracking from form entry to Stripe checkout completion

Need something similar built?

We build systems like this for founders and businesses through Upwork.