Loom
- 13 Devlogs
- 100 Total hours
Loom is a self-hosted, permission-aware file manager for your own server or NAS :]
Loom is a self-hosted, permission-aware file manager for your own server or NAS :]
DEVLOG_13: OKKK, so this is gonna be the last devlog for Loom before I ship it. Loom is now ready to be used by anyone in their VPS to manage their personal file :]
.
I also made a demo website for loom which anyone can visit to see how it works and looks at loomdemo.kaveeshkrishna.in
.
Fixed the last remaining bugs and made the permissions working properly, now every new account in Loom can be given a set of permissions and that account will not be able to access files other than the set permissions.
DEVLOG_12: This was a long and major update session, I added a working notification system, if uploading files or downloading files or moving them causes any error, loom safely pauses the operation to avoid problems with the file and throws a notification stating what happened. Also other notifications like scan completion is also given :]
.
The file and folder upload features are actually working now, although it gets stuck when uploading very large files, I am trying to make it more reliable at the moment.
.
So let me explain how file upload actually works in loom, so when you upload a file it shows as uploaded on the screen but in the backend it stays in the internal storage of the vps, an automatic scan job is triggered for that file/folder, all the indexing and preview/thumbnail generation is completed and then the file/folder is transferred to the designated path.
.
File search now also works with the Photos, Videos, and Documents tabs.
DEVLOG_11: OK!! so in this coding session I built a File Health page in Loom. This is a feature which I was personally excited to make :]
.
So basically while the Scan is running Loom tries to index files, generate preview and thumbnails for media files, if during this process any files throws error and Loom finds out the file is corrupt or has any issues it labels the issue and hides it from the file explorer and shows it in the dedicated File Health page.
.
At the moment it only displays these compromised files and shows the exact error they gave, but in the future I want to make Loom be able to fix these files if possible.
DEVLOG_10: I have added a proper trash system. So any file you delete gets transferred to the .trash folder inside the same storage device and sits there for 15 days. if you don’t manually deleted them permanently, they get deleted automatically after 15 days.
.
Right now I am transferring all the deleted files and folders as it is to the trash, but I am thinking to make them compressed while storing inside the trash so that the don’t take up a lot of space, I haven’t implemented this though as I am not sure how am I gonna do it properly yet :]
DEVLOG_9: Ok now the Favorites, Photos, Videos and Documents pages are working properly.
.
In the Fav page all the files which we have starred are listed, and on the vid, photos and docs pages the respective kind of files are listed.
.
These specific pages are essentially acting like a filter filtering out specific files extensions from throughout the storage device and listing all of the filtered files in one place :]
DEVLOG_8: Added a proper folder path tree just like windows file explorer. It grows as you open folders inside folders and clicking on the previous folder name will take you to that folder. :]
.
I have made it properly responsive too, so if it grows too much the previous folders are replaced with “…”
DEVLOG_7: OK!! so this time I have added a few small but noticeable features!!
.
First, I added multiple file/folder selection and bulk actions like delete.
.
Second, I made the search work, so it searches in the current open directory by default and if you are on the home page then ofc it searches the entire storage device, but if you are in some other folder and you try searching it will by default search in that folder only if you want it to search the entire storage device then u can click on the little global search icon beside the search bar (it appears only when you are not in the home directory)
And it is quite fast because it searches using the folder indexes stored in the database during scan.
.
Third, I added list view and in the grid view I added 4 different icon sizes, Small, Medium, Large, Extra Large.
.
And Finally, for all the right click actions, I added a long press action for touch screen devices :]
DEVLOG_6: Ok, I don’t why it took me this long to implement but here we are _
I added right click action menu for folders, files and directory. right clicking on the empty space of current directory will give you options to upload files and folders and create folders (only create folder action works at the moment). And right clicking on folders and files will give you options like cut, paste, copy delete and star.
Starring a file will add it to the favorites folder which can be accessed via the side panel and deleting anything will send it to the trash folder and it will be permanently deleted after 15 days.
I am still working on making the proper UI of trash folder and fav folder :]
DEVLOG_5: Worked for 12+ hours straight and finally implemented a lot of very important features.
The Scanner is now properly working there was a bug I solved which was making the scanner log the indexes of the files but never start a preview or thumbnail generation. Now each time U hit scan button it goes through the entire directory of your storage device and every file is properly indexed in a postgres database. every img file is sent to a thumbnail and preview generator and from every vid file its 1st second is captured and used to generate a thumbnail and preview for it as well.
All these thumbnails and previews are stored in the internal ssd of the vps so that when you are scrolling throught the galary the main ssd is not touched and the user sees a lower quality thumbnail of every image and vid instead of loading the entire thing in full quality.
To actually play vids on the browser, I’m using HLS Video Cache which lets me supply the vid to the user’s browser in chunks rather than the entire file at once, it makes the loading faster and playtime smooth.
Lasty I also added an audit log page which shows the last 20 audits on done on Loom :]
DEVLOG_4: In the settings page I have added the option to create new users with different permissions.
I can decide which folders each account can see and what they can not see.
Also, the Scanner page now lets me start a manual scan which will go through the storage device and index all the files properly.
I am also working on an automatic Preview and Thumbnail generation while this scan runs but right now it is not working, hopegully by the next 2 Devlogs I can make it work :]
DEVLOG_3: After doing a lot of research online about industry standard says to make a secure login method. I added a login page that uses email and password, no Google OAuth because Loom is not supposed to be a public website but for personal use.
I’m using better-auth for the actual logic. It hashes passwords with Scrypt so they are never stored in plain text, and it keeps sessions as a row in a sessions table plus a signed httpOnly cookie. The cookie is signed with BETTER_AUTH_SECRET which the installer generates as a random 48 byte value.
Each sessions last 30 days and refresh if they are older than a day, so you dont get logged out mid use.
CSRF is handled by TRUSTED_ORIGINS in the env, a list of origins allowed to make logged in requests, anything not on the list gets rejected :]
DEVLOG_2: This one took more time than I thought but now Loom is able to identify folder structure and files inside my SSD :]
The scanner walks the tree with readdir and stat, and for every file it stores the path (relative to /media), the name, file or directory, the type, size and modified time. all of that becomes a FileNode row in Postgres.
DEVLOG_1: After taking break from my project Sentinel, I have now started a new project Loom. It is again related to the home server I made using my 7 year old laptop!!
I am making this project because I wanted a reliable way to access and edit personal files which are on an external ssd attached to my server. Everything remotely. Right now I have made the initial UI of Loom and a rough outline of where buttons and options are gonna be. now I am gonna work on all the different sections you are seeing on the attached image :]