Skip to content

Commit

Permalink
Merge branch 'repo-cleanup'
Browse files Browse the repository at this point in the history
Merges in the 2.x repo (called origin/repo-cleanup)
  • Loading branch information
jeff-zucker committed Feb 19, 2021
2 parents 9ca1554 + d1a9347 commit 846da50
Show file tree
Hide file tree
Showing 61 changed files with 11,011 additions and 6,780 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*~
#*
*#
.#*
drafts
node_modules
dist
Expand Down
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

43 changes: 8 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,13 @@
# Solid REST
# Solid-Rest

## treat any storage backend as a minimal Solid server
Treat any storage backend as a Solid pod

<!--
[![NPM](https://nodei.co/npm/solid-rest.png)](https://nodei.co/npm/solid-rest/)
-->
## Overview

This package provides Solid access to local file systems and other storage spaces. It recieves standard Solid REST requests and returns the same kind of response a Solid server sends. This means that libraries and apps can make a file:// or app:// request in the same way they make an https request without having to know anything about the backend and without needing a server on the backend.
Solid-Rest translates Solid requests into backend requests and backend responses into Solid responses. This means that any storage system that has a Solid-Rest plugin may be treated as a pod. Currently there are plugins for file and dropbox which means that any app that uses Solid-Rest can address file:// and dropbox:// URIs the same way as a Solid pod https:// URI and expect the same responses with some exceptions : permissions are not handled by Solid .acls, they are based on the underlying file or cloud permissions; collaborative tools such as chat are not available. These backends can now be addressed with most Solid libraries (e.g. rdflib) and apps (e.g. the databrowser).

### Using with rdflib
Plugins for ssh, in-memory storage, in-browser storage (indexedDB, localStorage, Native File API) are in development.

Solid-Rest is included automatically in [rdflib]() when a script is run outside a browser. This means that commands such as fetcher.load('file:///somepath/container/') will behave, for most purposes just like the same command against an https URI on a Solid server (in this case, create an in-memory parsed version of the container's turtle representation).

### Using with other libraries

Solid-Rest can be used with any other libraries capable of operating either outside a browser or in an express-wrapped browser. For example, [solid-file-client]() uses solid-rest behind the scenes to support file transfers between local file systems and remote pods.


### Backends

**file://** - the local file system; works on command-line or in a browser within an electron process

**app://ls/** - an in-memory local storage; works on command-line or in a browser within an electron process

**app://bfs/** - any of the dozen or so storage mechanisms supported by [BrowserFS](https://github.com/jvilk/BrowserFS) - Dropbox, browser Local Storage, browser indexedDB, browser Native File Api, and more; works in a browser.

The file and in-memory storage are initialized automatically with the creation of the rest object. The BrowserFS backends need to be initialized explicitly. Please see tests/browser-test.html in the distribution for an example and details.

### Plugins

The package supports plugins, so new backends may be added by supplying the storage system specific commands without having to reinvent the wheel of receiving REST requests and responding to them in a Solid manner. The src/localStorage.js package contains documentation on writing plugins. Contact me for more info.

<img src="https://github.com/jeff-zucker/solid-rest/blob/master/solid-rest.png" alt="diagram of solid-rest">

### Acknowledgements

Thanks to [Otto-AA](https://github.com/Otto-AA) and [CxRes](https://github.com/CxRes) for advice and patches.

copyright &copy; 2019, 2020, [Jeff Zucker](https://github.com/jeff-zucker), may be freely distributed with the MIT license
Although Solid-Rest can be used stand-alone, it is best used in conjunction with other libraries, especially [Solid-Node-Client](), a nodejs client for Solid.
Solid-Node-Client comes preloaded with the Solid-Rest-File plugin, so it will be transparently included in anything using that library.

9 changes: 9 additions & 0 deletions bfs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Solid-Rest-BFS

A Solid-Rest plugin for in-browser storage

This is a plugin for [Solid-Rest](https://github.com/solid/solid-rest) that handles in-broswer storage including localStorage, indexedDB, and Native File API which can all be treated as mini-pods.

**Note** This library has not been upgraded to version 2.x yet, so is NOT usable at the moment.


File renamed without changes.
1 change: 0 additions & 1 deletion bundles/Dropbox-sdk.js.map

This file was deleted.

1 change: 0 additions & 1 deletion bundles/Dropbox-sdk.min.js

This file was deleted.

15 changes: 0 additions & 15 deletions bundles/browserfs.min.js

This file was deleted.

1 change: 0 additions & 1 deletion bundles/browserfs.min.js.map

This file was deleted.

26 changes: 0 additions & 26 deletions bundles/utils.js

This file was deleted.

7 changes: 7 additions & 0 deletions core/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*~
#*
*#
.#*
drafts
node_modules
test-folder
4 changes: 4 additions & 0 deletions core/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*~
#*
drafts
node_modules
File renamed without changes.
40 changes: 40 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Solid REST

## treat any storage backend as a minimal Solid server

<!--
[![NPM](https://nodei.co/npm/solid-rest.png)](https://nodei.co/npm/solid-rest/)
-->

This package provides Solid access to local file systems and other storage spaces. It recieves standard Solid REST requests and returns the same kind of response a Solid server sends. This means that libraries and apps can make a file:// or app:// request in the same way they make an https request without having to know anything about the backend and without needing a server on the backend.

### Using with rdflib

Solid-Rest is included automatically in [rdflib]() when a script is run outside a browser. This means that commands such as fetcher.load('file:///somepath/container/') will behave, for most purposes just like the same command against an https URI on a Solid server (in this case, create an in-memory parsed version of the container's turtle representation).

### Using with other libraries

Solid-Rest can be used with any other libraries capable of operating either outside a browser or in an express-wrapped browser. For example, [solid-file-client]() uses solid-rest behind the scenes to support file transfers between local file systems and remote pods.


### Backends

**file://** - the local file system; works on command-line or in a browser within an electron process

**app://ls/** - an in-memory local storage; works on command-line or in a browser within an electron process

**app://bfs/** - any of the dozen or so storage mechanisms supported by [BrowserFS](https://github.com/jvilk/BrowserFS) - Dropbox, browser Local Storage, browser indexedDB, browser Native File Api, and more; works in a browser.

The file and in-memory storage are initialized automatically with the creation of the rest object. The BrowserFS backends need to be initialized explicitly. Please see tests/browser-test.html in the distribution for an example and details.

### Plugins

The package supports plugins, so new backends may be added by supplying the storage system specific commands without having to reinvent the wheel of receiving REST requests and responding to them in a Solid manner. The src/localStorage.js package contains documentation on writing plugins. Contact me for more info.

<img src="https://github.com/jeff-zucker/solid-rest/blob/master/solid-rest.png" alt="diagram of solid-rest">

### Acknowledgements

Thanks to [Otto-AA](https://github.com/Otto-AA) and [CxRes](https://github.com/CxRes) for advice and patches.

copyright &copy; 2019, 2020, [Jeff Zucker](https://github.com/jeff-zucker), may be freely distributed with the MIT license
Loading

0 comments on commit 846da50

Please sign in to comment.