DegradingGracefully / FileExplorerTree

A SvelteKit component that emulates a (really bare) text file system within the browser environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The FileExplorerTree component for SvelteKit emulates a pseudo (very bare) text file system within the browser environment. Data is persisted in the IndexedDB of the browser through the Dexie js API.

This repository also includes a showcase that integrates FileExplorerTree inside a text editor app:

Screencast of FileExplorerTree

Motivation

The reason I started this project is that I needed a way to store "pseudo text files" in my browser for another app. That is impossible technically for security reasons.

State

There is working code and one cypress test spec for one scenario.

But please note that it this codebase is not perfect. For example, performance is not optimal, as I commit the whole filesystem on every change, and search is done through the code not through db. Also the architecture of the flow of data inside the SvelteKit app should be improved.

So, if you choose to use this code you can, maybe as a starting point for your own project that needs a file explorer. But I won't be able to offer support.

The reason I've set up this GitHub account is just for showcasing some of my work to potential employers.

About

A SvelteKit component that emulates a (really bare) text file system within the browser environment


Languages

Language:TypeScript 60.5%Language:Svelte 36.3%Language:JavaScript 2.1%Language:HTML 1.2%