nationaldesignstudio/rampart — explained in plain English
Analysis updated 2026-05-18
Scrub personal information out of chat messages before sending them to an AI model or server.
Redact SSNs, credit card numbers, emails, and addresses directly in the browser.
Restore original personal details locally after getting a response back from an LLM.
Add a privacy layer to a chat app without sending user text to a third-party redaction service.
| nationaldesignstudio/rampart | mclisterjoeh2o/yellowkey-bitlocker | mikaeldengale-cloud/deepseek-v4-pro-app | |
|---|---|---|---|
| Stars | 151 | 152 | 152 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 3/5 | 1/5 | 1/5 |
| Audience | developer | general | general |
Figures from each repo's GitHub metadata at analysis time.
Requires the @huggingface/transformers peer dependency to load and run the bundled ONNX model.
Rampart is a local-first tool that removes personal information from text a user types, before that text ever leaves the browser. It runs entirely on the client side and combines a small machine learning model with a set of rule-based checks to catch things like names, social security numbers, credit card numbers, emails, and addresses. The system uses two layers that work together. The first is a deterministic layer built from regular expressions and validation rules. It handles data types that can be checked mathematically, such as credit card numbers, validated with the Luhn checksum, and social security numbers, along with emails, web addresses, and IP addresses. The second layer is a small machine learning model, about 14.7 megabytes in size, trained to recognize things a simple rule cannot catch on its own, like full names, phone numbers, and street addresses. It supports seven languages that use Latin script: English, Spanish, French, German, Italian, Portuguese, and Dutch. Text in other scripts, such as Chinese, Japanese, Korean, or Arabic, is not reliably supported yet. Detected personal information is replaced with placeholders like [SSN_1] before anything is sent to an AI model or server, and the real values are restored later on the user's own device using a local table that is never transmitted elsewhere. Coarser details like city, state, and ZIP code are kept by default so an assistant can still reason about general location, while exact street addresses are always redacted. The project reports strong recall numbers on its own test set, catching over 98 percent of private information across the seven supported languages while keeping most non-sensitive text intact. It notes this is meant as harm reduction rather than perfect protection, since no detector this small will catch every case. Rampart ships as an npm package written mostly in TypeScript. Developers install it alongside a Hugging Face library dependency, create a guard object for each conversation, and use it to scrub user messages before sending them to a language model, then restore the original values in the reply shown to the user.
A browser-based library that detects and redacts personal information like names, SSNs, and card numbers from text before it reaches an AI model, then restores it locally.
Mainly TypeScript. The stack also includes TypeScript, ONNX, Hugging Face Transformers.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.