How it works
Avichive turns a filesystem inventory into an archive that can be explored, interpreted and reused. The scanner records historical file locations. The application groups identical content, preserves original bytes, prepares display media, and stores analysis and human decisions alongside that evidence. Restored projects give selected material another useful life.
This page describes the implementation inspected on October 13, 2026, at application revision e76e74c. Source inspection establishes how the system is built; it does not establish that every job, preview or feature is currently ready in production.
Occurrences and content
Imagine an invented photograph, family-trip.jpg, found in an old laptop backup and two copied folders. The scanner records three occurrences with their paths, sizes and metadata. A shared xxHash64 content hash connects them to one UniqueFile. The preferred occurrence supplies a canonical path, while the other paths remain evidence of where the bytes were found.
Only occurrences with a recorded content hash enter that grouping. Hashing can be skipped or fail, and this scanner leaves empty files unhashed. Those observations remain browsable inventory without a UniqueFile identity.
Rails reads the scanner-owned files table through a model that enforces read-only access. Application records add their own metadata and decisions without rewriting that inventory. Photos, videos, audio, documents, directories and projects provide views suited to different material. This is exact-content deduplication, not recognition of visually similar photographs. Scanner boundary (app/models/scanner/file_entry.rb:8), content identity (app/models/unique_file.rb:14).
flowchart TD
S[Scanner-owned occurrences] -->|Recorded hash| U[Unique content identity]
S --> D[Directory and project catalog]
U --> B[B2 canonical original]
U --> M[Typed media records]
B --> P[Processing and analysis]
M --> P
P --> W[Wasabi display derivatives]
P --> E[Recorded analysis evidence]
E --> H[Human review and curation]
U --> H
H --> V[Eras and people galleries]
B --> R[Recovered project artifacts]
R --> X[Reconstructed historical experiences]
The arrows show available paths, not a mandatory sequence. Preservation does not always wait for a keep/skip decision. Analysis can read an already preserved original. A record can exist before its display derivative is ready.
Different evidence, different decisions
File analysis uses path rules and bounded content samples to suggest a type, owning application and preservation recommendation. Life eras use biographical clues and file metadata to propose associations, while explicit owner decisions determine membership. Photo analysis detects faces and offers candidates for human identification. These workflows have different inputs and do not form one universal AI classifier.
A scanner category, a model suggestion and a human decision can therefore coexist. Unknown dates remain unknown. A face vector is not a confirmed name. A skip decision is not a deletion instruction. Keeping those distinctions makes later corrections possible without erasing the original evidence.
Bytes, catalog and ownership
Cloud preservation separates canonical originals in Backblaze B2, served attachments and derivatives in Wasabi, and database transfer packages in another B2 bucket. The catalog maps readable paths to opaque content-addressed objects. A thumbnail or converted video helps a browser display material; it does not replace the preserved source.
There is also no single direction for synchronization. Core archive metadata moves from development to production. Production owns era definitions and memberships, which development mirrors. People and face annotations originate locally and reach production through a replacement section in sync packages; inference vectors stay local. Each environment owns its derivative attachment state. Ownership and synchronization explains why these boundaries matter.
The original scanning account remains the foundation. What evolved is the system around it: an inventory now supports preservation, reviewed interpretation, media access and historical reconstruction.