Skip to content

Simple Bloody Storage, innit? Just chuck in your files, holds 'em steady, no faff. Works a treat, plain and proper.

Notifications You must be signed in to change notification settings

fossMeDaddy/sfs-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Fucking Storage (SFS) [WIP]

Use "Simple File Storage" for scenarios when you really can't use any NSFW words :)

Basic Idea

A wrapper on top of your existing storage solutions like AWS's S3 or Cloudflare's R2.

Let me lay down a mental model of how SFS is a necessary and actually a good abstraction over traditional key-value mapped object storage solutions.

SFS creates an imaginary file system for you, which is intended to be like the file system you have on your machine.

  • All users get one API_SECRET, API_KEY pair to control their file system.
  • The API credentials allow the user to do anything inside the / (root) path inside their file system, user can create nested directories and files inside directories.
  • Users can provide fine-grained visibility and control of their own file system to other users via generating "access tokens" and fine-graining access by "ACPs"

Access Token

Can be used in place of api credentials. generated by the owner of a file system to share access into subpath(s) of the file system.

ACP (Access Control Path)

as the owner of a file system, let's say I have a file tree in my file system that looks like this:

home/
  - users/
    - johnd092/
      - files/
        - profile.jpeg
        - cover_image.jpeg
        - resume.pdf
  - apps/
    - releases/
      - bin1.exe
      - bin2.exe

I have a user johnd092 wanting to edit his images in my file system, I can generate an access token for john and fine-grain his access by passing in files_owner:/home/users/johnd092/files/*.{jpeg,jpg,png,webp} as an "ACP" inside access token generation function to generate an access token allowing john to own all the files (files_owner) that are covered by the pseudo-regex string.

this special ":" separated string is called an ACP.

permission:/pseudo/regex/string/**/*.{exe,out,o,bin}

This is the core idea behind SFS HTTP Service, the CLI frontend to this service will extend the usability to popular use cases.

And unlike other services for which you might have to read a 50-pager doc, watch 5 fucking yt videos and read a 100 q/a's on Stack Overflow to just understand how the fuck this "pre-signed" url shit is supposed to work, this is all there is to SFS.

NOTE:

This is a heavy work in progress and not even functional as of me writing this readme (30 oct, 24)

About

Simple Bloody Storage, innit? Just chuck in your files, holds 'em steady, no faff. Works a treat, plain and proper.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages