To understand the high-level architecture of Supertag, it is important to understand what Supertag is fundamentally doing, at a technical level. At its core, Supertag is system for viewing tags in SQL database through a filesystem.
The following technical architecture will explain how this is achieved.
Supertag uses FUSE to connect a collection to the
filesystem via the
fuse-sys Rust crate, written specifically for Supertag. The job of
fuse-sys is to
surface a user’s filesystem actions and connect them to Supertag application code.
mkdir can be used to create a new tag in Supertag, while
ln can be used to manually link
a file to that tag. The actions resulting from these commands are channeled through FUSE to allow manipulating
Supertag files and tags.
The Supertag backend is a per-collection sqlite database. It contains the records for files, tags, the many-to-many links between files and tags, and other useful data. See the Datatabase Schema for more details.
Many Supertag operations can be initiated by manipulating the filesystem in expected ways, either through the
commandline or through a GUI file browser. See Usage. However, some operations that
are a little more nuanced are provided as subcommands on the Supertag
tag binary. For example the
will let you link a file to multiple non existant tags at the same time:
tag ln /home/Desktop/somefile.pdf pdfs/documents/research/projects
The above isn’t possible with regular
ln unless the tagpath
ln will report
No such file or directory. However,
tag binary allows you to do this
by creating tags as needed directly in the sqlite database.