IAC-099 Module 2: Privacy Filter
Regex-based PII detection and filtering for sensitive content.
Purpose
Scans transcribed text for personally identifiable information (PII) using regex patterns. User manually selects what to keep or remove. No AI needed. Works offline.
Input: transcript.md - Raw transcript from Module 1
Output: filtered.md - Privacy-filtered markdown
Tech Stack
- Framework: Tauri 2
- Frontend: Svelte 5
- PII Detection: Regex patterns (pure pattern matching)
- Database: SQLite (local storage for patterns)
- Platform: macOS (Apple Silicon M2)
Prerequisites
- macOS with Apple Silicon (M2/M3)
- Node.js 20 (via nvm)
- Rust (latest stable)
Installation
# Use Node 20
nvm use 20
# Install dependencies
npm install
Development
# Start dev server
npm run tauri:dev
# Run tests
npm test
# Lint code
npm run lint
Building
# Build production app
npm run tauri:build
Usage
- Load
transcript.md from Module 1
- App highlights PII using color codes:
- Red: Private (SSN, credit cards, passwords)
- Orange: Personal (names, emails, phone numbers)
- Yellow: Business (company names, addresses)
- Green: General (safe content)
- User deselects (unchecks) sensitive content
- Click "Export Filtered" to save
filtered.md
PII Detection Categories
Private (Highest Sensitivity)
- Social Security Numbers
- Credit card numbers
- Bank account numbers
- Passwords/credentials
- Medical record numbers
Personal
- Full names
- Email addresses
- Phone numbers
- Physical addresses
- Dates of birth
Business
- Company names
- Business addresses
- Business phone numbers
- Tax IDs
General
- Everything else (safe to share)
Configuration
- Custom regex patterns
- Sensitivity levels
- Auto-filter options
- Pattern library management
Source Code References
Based on working implementation from:
/Users/kjd/01-projects/IAC-031-clear-voice-app/test-privacy-scanner.js
Success Criteria
- ✅ Loads markdown
- ✅ Highlights PII with regex
- ✅ User can filter content
- ✅ Outputs clean markdown
- ✅ Works offline
- ✅ No AI dependencies
Architecture
src/
├── components/ # Svelte UI components
│ ├── Highlighter.svelte
│ └── FilterPanel.svelte
├── lib/
│ ├── patterns/ # Regex pattern definitions
│ └── scanner.js # PII detection logic
└── tauri/ # Rust backend
└── storage/ # Pattern storage
Privacy & Security
- All processing happens locally
- No data leaves the device
- Pure regex matching (no AI/ML)
- No cloud API calls
- User has full control over filtering
License
[To be determined]
Contributing
See main project repository for contribution guidelines.