Remix.run Logo
▲ kevinsync 2 days ago

I posted this and went to bed, and now figure I probably ought to at least write up some of the actual tech, implementation and features, and there's so much that I don't even know where to begin lol.

RCHIVE does indeed use Electron. I know that's probably going to catch a lot of flak, but I chose it intentionally due to things I wanted to do in the UI that, hate to say it, Chromium does out of the box that would become a whole sidequest trying to do in Qt or Swift. The front end is underpinned by a variety of daemons and services written in Rust that handle scan coordination and watching, shared platform primitives, executing copy jobs, handling offline geography, decoding media (using OS-native decoders and handling legacy formats), etc. There are other coordinators and workers in Node as well.

Database is SQLite, which manages your catalog and executes searches via regular indexes and FTS5 trigram indexes. There's a whole gang of stuff in there to optimize and facilitate searches based on filename/path substrings, scanned metadata, etc. Will be releasing an update with indexing and searching of actual file contents soon.

Different people will use RCHIVE for different purposes:

- Search/Find: you can see the most recently-changed files, deep-search across all sources, filter based on a bunch of different parameters, etc. You can get just a list of results, or see everything hierarchically in File Browser. Every file that can generate a preview gets one, and there's contextual clustering that happens where appropriate (ex. RCHIVE looks for evidence in sibling files to make decisions based on consensus, such as "folder with 20 MP3s all tagged appropriately, and a couple stray JPGs of unknown provenance -- these very likely all belong together"). Filters are combinatorial and have their own structured syntax, so you can type them out if you want, or use the UI. Previews show images, animated video frames, rendered PDF pages, etc, so you can zip through a bunch of IMG_0XXX files super fast. There's also a "Mini Mode" that's just a search box, so you can start the app, minimize to system tray, then hotkey to search from any other app. Ctrl-shift-R, type, enter, keyboard search, enter to open. Just as easy as Spotlight et al.

- Organize: you can take a massive, disparate catalog and apply Recipes (to filter/reduce the dataset) and Transformations (to group and restructure the file tree) to virtually build an organized filesystem, which you can then simply browse, or copy/move some-or-all of it from its messy origin to a tidy destination (new drive, NAS, whatever) -- both recipes and transformations are JSON, so while RCHIVE ships with a ton of presets, you can write your own to basically do whatever you want. The recipe engine is composible and honestly really neat, because you can end up crafting really specific, reusable combination views of all your shit (which then stay updated if you manually rescan, or turn background scanning on). Tagging is also very comprehensive; descendants inherit them by default, but can disinherit granularly. Makes it really easy to tag large swaths of things from a parent

- Copy/Move: granular jobs get created which then are executed via rchive-runner (either on CLI or in-app) -- every individual filesystem action is tracked and able to resume/rerun, so if you're copying 10TB of stuff, your power can go out and you don't have to start over. You can pause and come back days later. Care is taken to ensure that stuff like a file "move" isn't marked complete and source isn't removed until file is copied and verified at the destination (either simple verification, or full SHA256 hash checks if needed)

There's all kinds of other random useful stuff in there:

- all geo/location functions use H3, GeoNames data, and some custom projections and custom data, all offline/on-device. I handle Earth like a truncated icosahedron at varying levels of resolutions, and it rips through locations by bucketing everything into 3D hexagonal tiles which makes lookups easy and fast

- you can take a photo of each source for quick identification (ex. "that yellow thumb drive") -- you just click the source, scan a QR code that pops up with your phone, take the photo with your phone, submit

- you can "cold copy" paths/drives without cataloging them, like if you simply want to run a job from point A to B

- there's pretty comprehensive keyboard support, complex selections, undo/redo, etc

- you can make complex selections and then "isolate" the selection, so you're only working with a chosen subset of your catalog

- when scanning files, we also look for duplicates, files that are "broken" (a JPG that's actually MP3 data), etc -- for instance, I had a drive from 2002 that I guess had some bad sectors, and I copied it off back then and have carried it ever since. I didn't realize a few of the photos "copied" but the drive head actually read from another area that had some music files, and only found out when they got surfaced during an RCHIVE scan 24 years later. Long story short, Winamp plays those JPGs just fine lol

- I also integrated PairDrop into it, so you can pretty easily fire off files or selections of files from inside the app directly to your phone or other devices

Anyways, that's just a bit more background about what it all is. Happy to discuss further if anybody has any thoughts or questions!

▲bad_username a day ago | parent | next [-]

Does RCHIVE support finding files in TARballs inside zip archives inside rar archives? Including broken partially readable archives e.g. recovered from 90s CDROMs?

▲kevinsync a day ago | parent [-]

Not currently, but I've made notes over the last year about deep inspection / archival format handling. I'm still figuring out what kind of special zip/tar/rar/7z/gz/etc/blah handling would be generally useful. I've built in support for some defensive stuff like detecting and avoiding zip bombs, that sort of thing, but haven't gotten to probing and analysis of files-within-files. Yet!

▲mdaniel a day ago | parent [-]

> avoiding zip bombs

Isn't that risk for untrusted inputs, and not "I want to remember which file _on my drive_ contains thing.txt"?

Also, I would hope you wouldn't hand-roll support for archives when https://github.com/libarchive/libarchive/wiki/LibarchiveForm... exists (BSD-2-Clause). Given that they claim support for opening archives in memory, I'd bet that `tar -czf foo.tar.gz README.md ; zip bar.zip foo.tar.gz` would work out, too

▲kevinsync 21 hours ago | parent [-]

I guess I approached it from the perspective that everything is an untrusted input, just because who the hell knows what they might have downloaded in 1997 lol. Or what if you're using the portable version as a technician and moving from machine to machine, etc.

In RCHIVE right now, I added that for when the app inspects zip-based Office files for tracked changes and other revision evidence (so like, docx, xlsx, pptx, odt files). You just never know, and I figured it would be nice to quietly prevent some rando file forcing enough memory allocation to crash the app. I also have bounding safeguards for inspecting PDFs, PSD/PSB, media containers, etc.

Definitely haven't hand-rolled archive support, currently I'm not doing any deep inspections or anything like that beyond what ExifTool provides by default. I just have been considering adding future support for being able to find stuff inside of stuff, and will be looking for something like libarchive when the time comes.

▲layer8 a day ago | parent | prev [-]

Can the UI be fully operated by keyboard?

▲kevinsync a day ago | parent [-]

I don't have 100% keyboard coverage yet, but it's on the way. Quite a lot of navigation, expand/collapse, search/filter, tabbing, etc is in place already though.

▲layer8 a day ago | parent [-]

Thanks, it’s good to see it being taken seriously.