Skip to content

DocSort is a lightweight, Flet-based document scanner and organizer using light transformer models. It auto-detects document edges, extracts text via OCR, and categorizes files into structured folders with minimal input—integrated with Google Drive and natural language search.

Notifications You must be signed in to change notification settings

Alexanderstaehle/DocSort

Repository files navigation

DocSort

Demo

This little side-project is called DocSort, a Flet-based application streamlining document digitalization and organization. Key features:

  • Automatic document scanning with corner detection
  • OCR (Optical Character Recognition) for text extraction
  • Smart categorization into structured folders
  • Google Drive integration
  • Natural language search capabilities through RAG (Retrieval-Augmented Generation)
  • Customizable document categories
  • All ML models are running offline so no data is published (except over Google Drive API)

Perfect for managing personal or business documents while maintaining searchable digital records.

Currently supported languages: English, German

Installation

  1. Create and activate the conda environment:
conda env create -f environment.yaml
conda activate docsort
  1. Setup Offline Models:
python3 scripts/setup_models
  1. Setup Google Drive API Project:

    • Visit the Google Cloud Console
    • Create a new project or select an existing one
    • Enable the Google Drive API for your project
    • Navigate to Credentials
    • Create an OAuth 2.0 Client ID (select Desktop application)
    • Download the JSON file
    • Rename it to client_secrets.json
    • Place the file in your project root directory

    Important: Google sets the project into testing phase initially. This means that users that should be able to use the App using the Google Drive API have to be manually added as test users.

  2. Start the application:

flet run

Roadmap

✅ Completed Features

  • Corner detection on document images
  • Image quality enhancement filters
  • OCR text extraction
  • Automated file categorization
  • Company detection
  • Save to Drive in smart folder structure
  • Setup page
  • Offline Inference no extra API's (except Google Drive access)
  • Vector-based search functionality
  • Allow manual upload and sync search service
  • Folder explorer

🚧 In Development

  1. Document Scanning

    • Camera integration
    • Multi-page document support
  2. Smart Organization

    • Suggest new category if "Other" selected
  3. Multi-platform support

    • Build application on Android and iOS

Known Issues

  • File upload on web returns None for file path (seems to be an issue with Flet)

About

DocSort is a lightweight, Flet-based document scanner and organizer using light transformer models. It auto-detects document edges, extracts text via OCR, and categorizes files into structured folders with minimal input—integrated with Google Drive and natural language search.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages