webdiff icon indicating copy to clipboard operation
webdiff copied to clipboard

Webdiff as a standalone web service

Open grozadanut opened this issue 7 months ago • 1 comments

I see that currently webdiff is used as a command line tool. I am wondering whether with the current architecture it would be possible to use webdiff as a standalone web service or UI where users can upload two files for comparison?

This would mean that webdiff needs to run inside docker as a persistent running application, is that possible?

As context, I imagine the following case as a starting point:

  1. Third party app retrieves 2 versions of a text file(eg. an old SOP and a new one with updated instructions).
  2. Third party app passes the files to webdiff and webdiff returns a unique url(the url could expire after a certain period, like 24 hours, after which the files are cleaned from webdiff).
  3. Third party app passes the url to the end user.
  4. End user opens the url and sees the differences in the webdiff UI.

I would be open to work on this PR if given some guidance.

grozadanut avatar Jul 13 '25 07:07 grozadanut

It would definitely be possible. It's such a different use case, though, that you might be better off creating a separate repo that has webdiff as a dependency. You'd just be using the webdiff UI (static/js/file_diff.js in the distributed version) in that case.

danvk avatar Jul 13 '25 11:07 danvk