Skip to content

AisiriMR/GuardPass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ GuardPass — AI-Safe Data Layer

Sensitive data is never sent to AI, but AI still gives useful results.

GuardPass detects and redacts PII from your text before sending it to any AI model, then seamlessly restores the original values in the response.


✨ Features

  • 🔍 Detects 12+ PII types: names, emails, phones, SSNs, credit cards, IPs, and more
  • 📄 Supports PDF, DOCX, TXT, MD, CSV file uploads
  • ⬇️ Download redacted files + full redaction reports
  • 📊 Session analytics & audit log
  • 🤖 Works with GPT-4o, GPT-4o-mini, GPT-3.5-turbo
  • 🔐 Login/signup system
  • 🌐 Clean, production-ready web UI

🚀 Quick Start

1. Install dependencies

pip install -r requirements.txt

2. Set your OpenAI API key (optional — demo mode works without it)

# Mac/Linux
export OPENAI_API_KEY=sk-...

# Windows (PowerShell)
$env:OPENAI_API_KEY="sk-..."

# Windows (Command Prompt)
set OPENAI_API_KEY=sk-...

3. Run the server

uvicorn app:app --reload --port 8000

4. Open in browser

http://localhost:8000

🔑 Demo Login

Username Password
demo demo123

📁 Project Structure

GuardPass/
├── app.py            # FastAPI backend — all core logic
├── index.html        # Single-file frontend (served by FastAPI)
├── requirements.txt  # Python dependencies
├── .gitignore        # Git ignore rules
└── README.md         # This file

🔒 How It Works

User Input → Detect PII → Replace with [TYPE_N] → Send to AI → Restore → Output

Your original data never leaves your machine unredacted.


🛠️ Tech Stack

  • Backend: FastAPI + Python
  • AI: OpenAI API (gpt-4o-mini by default)
  • File Parsing: PyMuPDF (PDF), python-docx (Word)
  • Frontend: Vanilla HTML/CSS/JS (no framework needed)

📦 Requirements

fastapi
uvicorn[standard]
openai
pydantic
python-multipart
pymupdf
python-docx

About

AI-Safe Data Layer — redacts PII before sending to AI, then restores it in the response

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors