FlipRedact is a web app that helps you safely interact with Large Language Models (LLMs) by detecting Personally Identifiable Information (PII) in your text. It lets users selectively redact sensitive information before sending it to an LLM and then conveniently unredact the results afterward.
We built FlipRedact using a hybrid approach:
- Regex rules to catch common structured PII (like phone numbers and emails).
- A pretrained Named Entity Recognition (NER) model from Hugging Face to detect general entities.
- A finetuned DistilBERT model to capture more domain-specific PII with higher accuracy.
Detected PII is returned with its position, type, and confidence score, which the frontend uses to highlight text and provide interactive redaction options for the user.
-
Install Docker Desktop: https://docs.docker.com/desktop/ for Linux/Windows/Mac
-
Git clone repo branch docker
git clone --branch docker https://github.com/andrew250402/FlipRedact.gitto desired folder -
Navigate to Flip-redact-1 (Main folder that contains "docker-compose.yml")
cd FlipRedact -
Open up Docker Desktop (Must be running first) Then, run this line in cmd (in the desired folder) :
docker-compose up -
Docker Desktop should be running as well. Either press v in cmd or open Docker Desktop and follow the url (react-app) to view web app Make sure that both flipredact-frontend:latest and flipredact-backend:latest are running simulataneously
Possible Troubleshooting: RAM issues due to WSL (docker software)
- Win + R, type CMD. Then Ctrl + Shift + Enter to Run as Administrator
- Run
wsl --shutdownto save your computer
Make sure you have the following installed:
First, clone the repository and navigate into the project's root directory.
# Clone the repository from GitHub
git clone https://github.com/andrew250402/FlipRedact
# Navigate into the newly created folder
cd FlipRedactThe project has the following structure:
FlipRedact/
├── backend/
│ ├── app.py
│ └── ... (other python files)
├── my-app/
│ ├── src/
│ │ ├── App.jsx
│ │ └── ... (other jsx/js files)
│ ├── package.json
│ └── ...
└── requirements.txt
The backend is a FastAPI server. Open a terminal in the project's root directory (FlipRedact).
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\Activate.ps1
# On macOS/Linux:
# source venv/bin/activate
# Install the required Python packages
pip install -r requirements.txt
# Start the FastAPI server (run from the root directory)
uvicorn backend.app:app --reload --port 3000Your backend should now be running at http://127.0.0.1:3000.
The frontend is a React application. Open a new terminal and navigate into the frontend directory.
# IMPORTANT: Change directory to the frontend folder
cd my-app
# Install the required node modules
npm install
# Start the React development server
npm run startSample text:
Exclusive Performance Contract
Parties:
This agreement is entered into on 15 August 2025 between:
StarForge Entertainment Pte Ltd
Contact: [email protected] | +65 6789 1234
[ARTIST GROUP: KPOP Demon Hunters]
1. Member Details
- Name: Kim Han
- NRIC: S9123456A
- Passport No: E1234567A
- Phone: +65 8123 4567
- Email: [email protected]
- Name: Lee Min
- NRIC: S8234567B
- Passport No: E8765432A
- Address: 089322
- Phone: +65 9345 6789
- Email: [email protected]
2. Performance Details
- Event: Demon Hunters World Tour – Singapore Stop
- Venue: Singapore Indoor Stadium
- Date: 20 September 2025
3. Payment Terms
- Total Contract Value: USD 500,000
- Deposit: 50% payable upon signing (USD 250,000)
- Balance: 50% payable within 7 days after performance
- Payment Method: Bank Transfer to members’ registered accounts