mackehansson.dev / work / veil
<- back to work
Mode
Case study detail
Case study/2026

Veil — AI-assisted development tool

A local-only tool that helps developers sanitize code before sharing with AI assistants, then restore original identifiers in AI responses using project-scoped aliases.

const project = {
  title: "Veil — AI-assisted development tool",
  year: 2026,
  tech: ["React", "TypeScript", "TanStack Router", "Vite", "CodeMirror 6", "tree-sitter"],
};

Problem

AI assistants speed up development, but pasting real code into prompts can leak sensitive data and domain language. Developers need a way to share context safely while still being able to apply the AI response back to real code without manual find-and-replace.

Solution

Veil introduces a reversible Sanitize/Restore workflow. In Sanitize mode, a detection engine (regex + AST) finds secrets and identifier candidates, then applies stable aliases from a Project Glossary. In Restore mode, Veil maps AI output back to original identifiers and flags Unknown Aliases for review. All project and session data stays local (IndexedDB on web, filesystem in Electron), giving users full data sovereignty.

Outcomes

  • Reversible Sanitize/Restore loop that works across sessions via a persisted Project Glossary
  • AST + regex detection pipeline for identifiers, secrets, email, and network values
  • Two-pane workspace with inline identifier selection and immediate generated preview updates
  • Unknown Alias highlighting in Restore to catch AI-invented terms before applying changes
  • Local-only persistence model with zero user code or glossary data sent to Veil servers

Tech

ReactTypeScriptTanStack RouterViteCodeMirror 6tree-sitter