This directory contains the core code of the orchestrator. It has a CLI entry (app.js
).
Currently the orchestrator contains basic but usable functionalities:
-
Register & de-register users through (RESTful) API
-
Request token from CSS to modify user's Pod
-
Store information into database / configuration
-
Basic user information (list of users, etc) is stored as a JSON file
db.json
-
Using JSON for prototying & data size is small
-
May need optimization in the future
-
2- User-side configuration (e.g. calendar URL) is stored into user's Pod (
calendar_orchestrator/config.ttl
) -
4- Update user calendar data in their Pods
-
Install dependencies:
npm i
-
Run the service:
npm run build && npm run start
The orchestrator will retrieve and update the calendar data in the registered users' Pods from time to time. The configuration is fetched from users' Pods (location above).
To register users, either use the API or use the companion Configure-er App.
Note the software is in development, and APIs are subject to change. The recommended way is to use the companion App to configure.
This is the recommended way. Set up the App by following its document, and navigate to the browser to use.
Here are some example of using the API from cli.
They use HTTPie, a more human-friendly cli HTTP client. We give one example also in curl; and the rest is similar.
Assume the following information:
- Orchestrator url:
http://localhost:3000
- Webid:
https://my.pod/user1/profile/card#me
- Issuer:
https://my.pod/
- Solid login
- username:
[email protected]
- password:
mypassword
- username:
- Calendar (ics) url:
https://some.service/my_calendar.ics
Note the issuer
field is always optional.
http POST localhost:3000/user webid=https://my.pod/user1/profile/card#me issuer=https://my.pod/ [email protected] password=mypassword
Or (using curl)
curl -H “Content-Type: application/json” -X POST -d webid=https://my.pod/user1/profile/card#me -d issuer=https://my.pod/ -d [email protected] -d password=mypassword http://localhost:3000
http GET localhost:3000/user webid=https://my.pod/user1/profile/card#me
http POST localhost:3000/user webid=https://my.pod/user1/profile/card#me issuer=https://my.pod/ cal_url=https://some.service/my_calendar.ics
http POST localhost:3000/user webid=https://my.pod/user1/profile/card#me issuer=https://my.pod/
See swagger.yaml for the documented API. You may use any Swagger UI for viewing it, e.g.the official example.
Here are some detailed stuffs. For main TODOs in higher level, please see README on the parent directory.
- Customize port and pathPrefix