ScanSnap WebDAV Service for buildersclub.ca

Timeframe: 2025-Present

Role: Full-Stack Developer & DevOps Engineer

Technologies: Python, WebDAV, WsgiDAV, macOS Integration

Client: buildersclub.ca


The Challenge

Running a business means dealing with receipts. Lots of them. And for buildersclub.ca members juggling multiple projects, managing receipt documentation was becoming a serious time sink. Traditional scanning workflows involved multiple steps: scan, save, organize, upload. Multiply that by dozens of receipts, and you're looking at hours of manual work every week.

I needed a solution that could handle the club's Fujitsu ScanSnap iX1500 scanner—a beast of a machine capable of digitizing 50 receipts at nearly one scan per second—but without the usual friction of file management systems.

What We Built

A custom WebDAV server optimized specifically for high-speed document scanning. Load 50 receipts, hit scan, and watch them all digitize in under a minute. Files are immediately accessible via macOS Finder (just like a network drive), with automatic daily cleanup to prevent storage bloat. Zero maintenance required.

  • Processing Speed: ~1 receipt per second
  • Batch Capacity: Up to 50 documents at once
  • File Access: Native Finder integration
  • Cleanup: Automated daily at 3:00 AM
  • Network Protocol: WebDAV 1.0/2.0 compliant

For buildersclub.ca members: Access the scanner service here (clubhouse network only)

The Technical Journey

Simple Network Scanner Access

The system provides a straightforward network location where the ScanSnap scanner can send documents directly. Just connect with Command+K in Finder, enter the URL, and you have instant access to a network drive ready for scanning.

This creates a seamless experience - load your documents, hit scan, and they're immediately available on your computer without any additional steps or software.

Security Without the Headache

Here's the thing about receipt scanners: you want them to be fast and frictionless. Authentication dialogs kill that flow. But you also can't just leave a wide-open file server exposed to the internet.

The solution? Custom permissions at the protocol level. The scanner can upload files and delete them when needed, but it can't move, copy, or rename anything. More importantly, the service is completely isolated to its own directory—there's literally no way for it to access files outside ~/scansnap-dav/scans, even if someone tried to hack around it.

class ScanSnapProvider(FilesystemProvider):
    def create_collection(self, path):
        # No creating subdirectories
        raise DAVError(403, "Creating directories not allowed")
    
    def copy_resource(self, src_path, dest_path, depth):
        # No copying files around
        raise DAVError(403, "Copying not allowed")
    
    def move_resource(self, src_path, dest_path):
        # No moving or renaming
        raise DAVError(403, "Moving/renaming not allowed")

For the clubhouse environment, this works perfectly. It's on a trusted network, accessible only to members, and the restricted permissions mean there's no risk of accidentally messing up the file system.

The Storage Problem Nobody Thinks About

When you're scanning 50 receipts at a time, storage fills up fast. Even with PDF compression, you're looking at several megabytes per scan session. Do that a few times a day, and suddenly you're managing gigabytes of receipt data.

The fix? Automatic cleanup. Every night at 3 AM, a Python scheduler wipes the scans directory clean. Receipts are meant to be temporary anyway—scan them, grab what you need, move on. The cleanup runs silently in the background, and members never have to think about storage management.

def cleanup_scans():
    scans_dir = os.path.expanduser("~/scansnap-dav/scans")
    for filename in os.listdir(scans_dir):
        file_path = os.path.join(scans_dir, filename)
        if os.isfile(file_path):
            os.remove(file_path)

# Daily cleanup at 3:00 AM
schedule.every().day.at("03:00").do(cleanup_scans)

Real-World Impact

From Hours to Minutes

Before this system, processing a week's worth of receipts meant:

  1. Scan receipts one by one (or in small batches)
  2. Wait for files to save to the local machine
  3. Open file manager and organize scans
  4. Upload to cloud storage or accounting software
  5. Clean up local copies to free up space

That's easily 20-30 minutes of manual work for a typical batch of receipts.

Now? Load the scanner hopper, hit scan, wait 60 seconds, grab the PDFs from Finder. Done. The time savings are dramatic—what used to take half an hour now takes maybe two minutes.

The Numbers

Why It Works

The beauty of this solution is its simplicity. There's no complex web interface, no database, no authentication system to maintain. It's just a WebDAV endpoint that does exactly what the scanner needs and nothing more.

For buildersclub.ca members, it means one less thing to think about. Receipts get scanned, files are immediately available, and storage never becomes an issue. The system just works, quietly and reliably, in the background.

Under the Hood

The Tech Stack

Key Configuration

config = {
    "host": "0.0.0.0",
    "port": 9876,
    "provider_mapping": {
        "/": ScanSnapProvider(scans_dir)
    },
    "hotfixes": {
        "emulate_win32_lastmod": True,
        "unquote_path_info": True,
        "win_accept_anonymous": True,
    },
    "property_manager": True,
    "lock_storage": True,
}

Security Considerations

Lessons Learned

Sometimes Simple is Better

I could have built a full web application with user accounts, file organization features, OCR processing, automatic categorization, cloud sync... but none of that was actually needed. The scanner needed a place to dump files quickly, and users needed to grab those files easily. Mission accomplished with a fraction of the complexity.

Simple Network Integration

The solution integrates directly with macOS Finder, making it immediately familiar to users without requiring any special software or training. Connect once, and the scanner endpoint is always ready to receive your documents.

Automatic Cleanup Changes Everything

The daily cleanup feature turned this from a "nice to have" into a "set it and forget it" solution. Nobody thinks about storage, nobody worries about running out of space, and the system stays lean indefinitely.