Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 4 additions & 77 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,78 +1,5 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# TypeScript build result
node_modules
dist

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Output from https://github.com/w3c/ldp-testsuite
report
test-output

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
config.json
data

# next.js build output
.next

# IDEs
.idea
.vscode


.db
data
*/node_modules
lerna-debug.log
tsconfig.tsbuildinfo
5 changes: 0 additions & 5 deletions .npmignore

This file was deleted.

87 changes: 23 additions & 64 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,74 +1,33 @@
# pod-server
# Inrupt Pod Server

[![Build Status](https://travis-ci.org/inrupt/pod-server.svg?branch=master)](https://travis-ci.org/inrupt/pod-server)
This is a monorepo for Inrupt Pod Server. It includes:

[![Coverage Status](https://coveralls.io/repos/github/inrupt/pod-server/badge.svg?branch=master)](https://coveralls.io/github/inrupt/pod-server?branch=master)
- [pod-server](packages/pod-server): Combines all packages together into a Solid compliant server.
- [solid-idp](packages/solid-idp): Solid Identity Provider
- [wac-ldp](packages/wac-ldp): Web Access Control Linked Data Platform (The main storage system)
- [websockets-pubsub](packages/websockets-pubsub): Handles websocket connections.

[![Greenkeeper badge](https://badges.greenkeeper.io/inrupt/pod-server.svg)](https://greenkeeper.io/)
## Installation

Solid server package that bind together
[solid-idp](https://github.com/inrupt/solid-idp),
[wac-ldp](https://github.com/inrupt/wac-ldp),
[websockets-pubsub](https://github.com/inrupt/websockets-pubsub), and the
[data-browser](https://github.com/linkeddata/mashlib).

# Running on localhost, NSS compat mode

```sh
git clone https://github.com/inrupt/pod-server
```bash
git clone https://github.com/inrupt/pod-server.git
cd pod-server
git checkout dev
npm install
cp config.json-local-nss-compat config.json
cp -r ../../solid/node-solid-server/.db .
cp -r ../../solid/node-solid-server/data .
npm run build
DEBUG=* npm start
npm run bootstrap
```

# Architecture

## The Solid Spec Protocols

This server implements version 0.7 of the [Solid spec](https://github.com/solid/solid-spec). This is a diagram of the layering of protocols:

![protocol layers](https://user-images.githubusercontent.com/408412/57321843-78149980-7102-11e9-8c32-4ebda462335e.png)

## Functions of the server
Regardless of the layering of protocols, we have a layering of functional components in the software, which looks as follows:

![Functional components of inrupt's pod-server](https://user-images.githubusercontent.com/408412/57322032-de99b780-7102-11e9-8a20-9e49e0d44f04.png)

It shows how the different functional units of the server (persistence, auth, data interface, etc.) depend on each other.

## Code modules
This server delegates some of its functions to npm modules it depends on.

### solid-idp
The [solid-idp](https://github.com/inrupt/solid-idp) module implements the webid-oidc functionality. Note that a pod-server makes no explicit distinction between local and remote users. In terms of organization, each user gets an identity and a storage space, and that identity is the first to be granted full access to the empty storage space upon its creation. But in technical terms the IDP and the storage are almost entirely separate. The only two connections between them is that the IDP proves control of a profile URL (web id) that points to a document on the storage space, and that the IDP's authorize dialog will edit the list of trusted apps in that profile whenever the user authorizes a new third-party web app.

The IDP exposes a koa handler to the pod-server. Apart from that, it sends out emails for verifications and password reminders. It also exposes an event when an account is created or deleted, and its dialogs will do xhr edits to trustedApps.

### wac-ldp
The [wac-ldp](https://github.com/inrupt/wac-ldp) module is the central part of the pod-server. It exposes a koa handler, which pod-server consumes.
It also emits change events, which the pod-server used to know when to call the `Hub#publish` method from the websocket-pubsub module (see below).
Apart from that, it exposes a number of interfaces which the websockets-pubsub module consumes:
* a function to check [updates-via tickets](https://github.com/inrupt/websockets-pubsub/issues/2#issuecomment-489319630)
* a function for checking whether a given webId has read access to a given resource

### websockets-pubsub
The [websockets-pubsub](https://github.com/inrupt/websockets-pubsub) module exposes a 'Hub' object, with a websocket-onconnection handler and a publish method

### html statics
Although some pod providers may choose to replace `static/index.html` with the [data-browser](https://github.com/linkeddata/mashlib). This is the content which the pod-server serves when a user visits the pod-server with their browser.
## Dev
```bash
npm run dev
```

Published under an MIT license by inrupt, Inc.
## Test
```bash
npm run test
```

Contributors:
* Michiel de Jong
* Jackson Morgan
* Ruben Verborgh
* Kjetil Kjernsmo
* Pat McBennett
* Justin Bingham
* Sebastien Dubois
## Build and Publish
```bash
npm run build
npm run publish
```
8 changes: 0 additions & 8 deletions build.sh

This file was deleted.

7 changes: 7 additions & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"lerna": "2.11.0",
"packages": [
"packages/*"
],
"version": "3.0.2"
}
Loading