RedactAI is a powerful document redaction system designed to protect sensitive information in various types of documents. Using advanced OCR technology and AI-assisted detection, RedactAI makes it easy to identify and redact personal information from PDF files and images.
- Smart Document Analysis: Automatically detects sensitive information using AI-powered analysis
- Multiple Redaction Methods: Choose between AI-assisted redaction or text-based redaction
- Customizable Redaction Types: Apply temporary or permanent redactions based on your needs
- User-friendly Interface: Intuitive web interface for easy document processing
- Document Upload: Support for PDF and image formats (JPG, PNG, TIFF, etc.)
- OCR Technology: Extract text from scanned documents and images
- AI Analysis: Automatically identify sensitive information like names, addresses, ID numbers
- Field Selection: Select specific fields detected by AI for redaction
- Text-based Redaction: Type specific text to find and redact across the document
- Permanent/Temporary Redaction: Choose between black boxes (permanent) or yellow highlights (temporary)
- Multi-language Support: Process documents in multiple Indian languages
- Downloadable Results: Download the redacted document in its original format
RedactAI/
โโโ ocr/
โ โโโ backend/
โ โ โโโ app.py # Flask backend server
โ โ โโโ requirements.txt # Python dependencies
โ โโโ frontend/
โ โโโ public/ # Static files
โ โโโ src/ # React source code
โ โโโ components/ # React components
โ โ โโโ Header.js # App header
โ โ โโโ UploadPage.js # File upload page
โ โ โโโ EditorPage.js # Document editor page
โ โโโ App.js # Main App component
โ โโโ index.js # Entry point
- Python 3.8+
- Node.js 14+
- Tesseract OCR with language data files
# Clone the repository
git clone https://github.com/Boobeshkumar56/RedactAI.git
cd RedactAI/ocr
# Create and activate virtual environment (optional but recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Run the backend server
cd backend
python app.py# Navigate to frontend directory
cd ../frontend
# Install dependencies
npm install
# Run the development server
npm startThe application should now be accessible at http://localhost:3000
RedactAI offers a comprehensive API for document redaction:
Endpoint: POST /api/upload
Content-Type: multipart/form-data
Request Parameters:
file: The document file (PDF, JPG, PNG, etc.)language: Language code ('eng', 'tam', 'hin', 'tel', 'kan', 'mal', or combinations like 'eng+tam')
Response:
{
"file_id": "unique-file-identifier.pdf",
"original_filename": "original-name.pdf",
"language": "eng",
"data_fields": [
{
"id": "field-id",
"text": "Extracted text",
"page": 0,
"confidence": 90,
"position": {
"x": 100,
"y": 200,
"width": 300,
"height": 50
}
}
]
}Endpoint: POST /api/redact
Content-Type: application/json
Request Parameters:
For field selection redaction:
{
"file_id": "unique-file-identifier.pdf",
"redactions": [
{
"id": "field-id",
"text": "Text to redact",
"page": 0,
"redaction_type": "temporary",
"position": {
"x": 100,
"y": 200,
"width": 300,
"height": 50
}
}
],
"redaction_type": "temporary",
"language": "eng"
}For text-based redaction:
{
"file_id": "unique-file-identifier.pdf",
"text_to_redact": [
{
"text": "John Doe",
"redaction_type": "permanent",
"case_sensitive": false
}
],
"document_type": "unknown",
"language": "eng"
}Response:
{
"redacted_file_id": "redacted_unique-file-identifier.pdf",
"total_redactions": 3,
"redaction_method": "manual_typing"
}Endpoint: GET /api/download/{file_id}
Response: The redacted document file.
Endpoint: POST /api/analyze-document
Content-Type: application/json
Request Parameters:
{
"file_id": "unique-file-identifier.pdf",
"language": "eng"
}Response:
{
"sensitive_fields": [
{
"id": "ai-field-123",
"text": "John Doe",
"category": "Name",
"ai_confidence": 95,
"position": {
"x": 100,
"y": 200,
"width": 300,
"height": 50
}
}
],
"analysis_type": "gemini_ai"
}-
Document Type Selection: Add support for selecting document types to enable template-based redaction for standard documents like Aadhaar cards, PAN cards, and passports.
-
Manual Sketching Tool: Implementing a drawing-based redaction tool to allow users to manually mark areas for redaction using a pen or brush tool.
-
Custom Template Creation: Allow users to create and save their own templates for repeated document types.
-
Batch Processing: Support for uploading and processing multiple documents at once.
-
Document Classification AI: Automatically detect document type without user input.
-
Enhanced Security Features: Add watermarking, encryption, and audit logging for redacted documents.
-
Mobile Application: Develop mobile apps for on-the-go document redaction.
-
Integration with Cloud Storage: Direct integration with Google Drive, Dropbox, etc.
-
Advanced OCR Enhancement: Implement pre-processing techniques to improve OCR accuracy for low-quality scans.
-
Browser Extension: Create a browser extension for quick redaction of online documents.
-
Enterprise Features: Role-based access control, organization management, and compliance reporting.
- Upload your document (PDF or image)
- Choose language for OCR processing
- Select redaction method:
- AI Analysis: Automatically detect and select sensitive information
- Text-based Redaction: Type specific text to find and redact
- Choose redaction type (temporary or permanent)
- Apply redactions
- Download the redacted document
This project is licensed under the MIT License - see the LICENSE file for details.
- Boobeshkumar56 - Creator and maintainer




