Skip to content

Debt Validation Prompter — split-pane letter generator with local templates + a JSON prompt pack for optional AI polish (no API calls baked in). // built with a little agentic assistance — local-first, so there are no “hidden API surprises”

License

Notifications You must be signed in to change notification settings

xXBricksquadXx/Debt-Validation-Prompter

Repository files navigation

Debt Validation Prompter banner

Debt Validation Prompter

Browser-only tool to generate FDCPA debt validation / dispute / cease-contact letters using local templates, plus a “prompt pack” JSON you can run in any LLM workflow.

Live site: https://debtvalidationprompter.netlify.app/

What it does

  • Generates a formatted letter (HTML) preview (local, no network required)
  • Generates plain text output for copy/paste
  • Generates a Prompt Pack (JSON) you can paste into ChatGPT / other LLMs to rewrite for clarity
  • Optional AI helpers (only if you provide your own key):
    • AI Draft Report → outputs a “Documentation & Drafting Report” in the Plain text tab
    • AI Polish Letter → rewrites the letter and inserts a compact “Snapshot” section into the Letter tab

Not legal advice

This project formats consumer correspondence. It does not provide legal advice. For legal guidance, consult a qualified attorney.

Security model (important)

  • Any API key you enter is stored only in your browser (localStorage or sessionStorage).
  • This repo does not embed or ship a secret.
  • Client-side keys are inherently exposable to whoever can run JS in your browser session. This is intended for your personal testing key, not for distributing a shared key.

Fail-safe key storage

Browser storage can fail in some environments (private browsing, quota limits, restrictive settings). This app uses a fail-safe wrapper:

  • Primary: localStorage or sessionStorage (your choice)
  • Fallback: in-memory (so the UI still works even if storage APIs error)

AI endpoints (OpenAI-compatible)

The app supports any OpenAI-compatible provider by setting:

  • Base URL
  • Model
  • API Key

OpenAI

Base URL:

  • https://api.openai.com/v1

Model example:

  • gpt-4o-mini

Groq (OpenAI-compatible)

Base URL:

  • https://api.groq.com/openai/v1

Chat endpoint:

  • https://api.groq.com/openai/v1/chat/completions

Model examples:

  • llama-3.3-70b-versatile
  • llama3-70b-8192
  • mixtral-8x7b-32768
  • gemma2-9b-it

Local usage

Option A: Open directly

You can open index.html in a browser.

Option B: Run a local server (recommended)

Clipboard APIs and some browser features can be restricted on file://. Running a local server avoids that.

npm install
npm run dev

Then open the URL shown in your terminal.

Build & deploy (Netlify)

This repo uses esbuild to bundle/minify into dist/

npm install
npm run build

Netlify publishes dist/ via netlify.toml.

Scripts

  • npm run dev — start a local static server
  • npm run build — bundle + minify into dist/
  • npm run format — format the repo with Prettier
  • npm run check — verify formatting

Project structure

.
├─ index.html
├─ styles.css
├─ app.js
├─ scripts/
│  └─ build.mjs
├─ dist/                  # generated by build (typically not committed)
│  ├─ index.html
│  ├─ styles.css
│  └─ app.js
├─ netlify.toml
├─ package.json
├─ package-lock.json
├─ .prettierrc
├─ .prettierignore
├─ .vscode/
│  └─ settings.json
└─ assets/                # optional (banner image)
   └─ banner.png

Changelog (high level)

  • Added fail-safe key storage wrapper (local/session + in-memory fallback).

  • Masked key indicator in UI; optional show/hide key.

  • Improved baseUrl normalization for Groq/OpenAI-compatible providers.

  • Added retry + better error surfaces for network/API failures.

Added optional AI helpers:

  • AI Draft Report → plain text

  • AI Polish Letter → HTML letter + embedded Snapshot

About

Debt Validation Prompter — split-pane letter generator with local templates + a JSON prompt pack for optional AI polish (no API calls baked in). // built with a little agentic assistance — local-first, so there are no “hidden API surprises”

Topics

Resources

License

Stars

Watchers

Forks