A lightweight PII (Personally Identifiable Information) moderation MVP designed to sanitize sensitive data before it reaches LLM APIs.
- Multi-Language Support: High-accuracy detection for English and French using
spaCyLarge models. - Double-Pass Protection: Combines NLP-based detection with expert Regex patterns for PII coverage.
- Expert French Recognizers: Built-in support for French-specific data: SIRET, NIR (Social Security), IBAN, and addresses.
- Balanced Anonymization: Preserves job titles and document structure to keep texts readable.
- Minimal Dashboard: React-based UI with Risk Assessment visualization.
- Custom Theme UI: Switch between Premium, Minimal Light, and Deep Midnight modes.
Check out Redac in action:
- Core API (
/api): FastAPI server powered by Microsoft Presidio. - Web Dashboard (
/ui): React + Vite + Tailwind CSS.
If you have make installed, you can use these shortcuts:
make build # Build containers
make up # Start Redac
make logs # View logs
make test # Run testsdocker compose up --build- API:
http://localhost:8000 - UI Dashboard:
http://localhost:5173
You can interact directly with the Redac API using curl.
Request:
curl -X POST http://localhost:8000/redact \
-H "Content-Type: application/json" \
-d '{"text": "My name is John Doe, call me at 06 12 34 56 78."}'Response (JSON):
{
"original_text": "My name is John Doe, call me at 06 12 34 56 78.",
"redacted_text": "My name is <PERSON>, call me at <PHONE_NUMBER>.",
"detected_language": "en",
"entities": [
{
"type": "PERSON",
"text": "John Doe",
"score": 85,
"start": 11,
"end": 19
},
{
"type": "PHONE_NUMBER",
"text": "06 12 34 56 78",
"score": 95,
"start": 32,
"end": 46
}
]
}make test# Run the test suite
docker compose run api python tests/verify_all.pyMIT - Created for secure LLM workflows.