diff --git a/docker/resume/stories/scansnap-webdav.html b/docker/resume/stories/scansnap-webdav.html index 91c10cc..485ff6a 100644 --- a/docker/resume/stories/scansnap-webdav.html +++ b/docker/resume/stories/scansnap-webdav.html @@ -24,89 +24,216 @@

Timeframe: 2025-Present

Role: Full-Stack Developer & DevOps Engineer

-

Technologies: Python, WebDAV, WsgiDAV, macOS, ScanSnap Integration

-

Client: buildersclub.ca

+

Technologies: Python, WebDAV, WsgiDAV, macOS Integration

+

Client: buildersclub.ca


-

Project Overview

+

The Challenge

- The ScanSnap WebDAV Service is a high-performance document digitization solution specifically designed - for buildersclub.ca members who need to rapidly process receipts and documents. The service supports - ScanSnap scanners capable of processing up to 50 receipts at nearly 1 scan per second, providing - enterprise-grade performance for high-volume document digitization workflows. + 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. +

+
-

Key Performance Metrics

+

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. +

+

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

-
-

Technical Challenges & Solutions

+
+

The Technical Journey

-

macOS Finder WebDAV Compatibility

+

When Finder Refuses to Play Nice

- One of the primary challenges was ensuring seamless integration with macOS Finder's WebDAV client. - macOS Finder has specific requirements for WebDAV protocol responses that many servers don't meet by default. + The first hurdle? Getting macOS Finder to actually connect to our WebDAV server. Turns out, Finder is incredibly + picky about WebDAV implementations. It expects very specific protocol responses that many standard WebDAV libraries + don't provide out of the box. +

+

+ After digging through Finder's network traffic and WebDAV specs, I discovered it needed three specific "hotfixes" + that mimic Windows server behavior:

+

+ Once these were in place, Finder connected instantly. The whole experience felt native—just Command+K to connect, + and boom, you've got a network drive ready for scanning. +

+ +

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. +
  3. Wait for files to save to the local machine
  4. +
  5. Open file manager and organize scans
  6. +
  7. Upload to cloud storage or accounting software
  8. +
  9. Clean up local copies to free up space
  10. +
+

+ 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

+ -

High-Volume File Processing

+

Why It Works

- The service needed to handle rapid file uploads from ScanSnap scanners without performance degradation - or storage issues. + 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

-

Security & File Isolation

-

- Ensuring the WebDAV service could only access designated directories while preventing unauthorized - file operations. -

+

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

-
-

Results & Impact

+
+

Lessons Learned

-

Performance Improvements

-
    -
  • Processing Speed: 95% reduction in manual document processing time
  • -
  • Batch Efficiency: 50 receipts processed in under 60 seconds
  • -
  • Storage Management: Zero-maintenance automated cleanup
  • -
  • User Experience: Seamless Finder integration with drag-and-drop functionality
  • -
+

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. +

-

Business Value

-
    -
  • Cost Reduction: Eliminated manual document processing overhead
  • -
  • Scalability: Supports high-volume scanning operations
  • -
  • Reliability: Automated cleanup prevents storage issues
  • -
  • Integration: Native macOS compatibility reduces training requirements
  • -
+

macOS WebDAV is Quirky

+

+ Apple's Finder WebDAV client has some very specific expectations that aren't always documented. The solution + involved reading through protocol specs, analyzing network traffic, and testing various server configurations. + Once you know the tricks (those three hotfix flags), it's actually rock solid. +

+ +

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. +


@@ -116,8 +243,9 @@