You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/test.yml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,8 @@ jobs:
29
29
hugo-version: '0.119.0'
30
30
extended: true # Prevent error building site: POSTCSS: failed to transform, see https://gohugo.io/troubleshooting/faq/#i-get-this-feature-is-not-available-in-your-current-hugo-version
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
Open Terms Archive documentation.
2
2
3
+
## Styleguide
4
+
5
+
### Order of menu sections
6
+
7
+
Pages and sections are ordered on the “end user” to “core team member” spectrum: the more up a page is in the menu, the more it is targeted at consumer end users, the more low it is the more it is targeted at committed contributors.
Copy file name to clipboardExpand all lines: content/_index.en.md
+13-84Lines changed: 13 additions & 84 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,30 +21,23 @@ _Words in bold are [business domain names](https://en.wikipedia.org/wiki/Domain-
21
21
22
22
## Main concepts
23
23
24
-
### Instances
24
+
### Collection
25
25
26
-
Open Terms Archive is a decentralised system.
27
-
28
-
It aims at enabling any entity to **track****terms** on its own and at federating a number of public **instances** in a single ecosystem to maximise discoverability, collaboration and political power. To that end, the Open Terms Archive **engine** can be run on any server, thus making it a dedicated **instance**.
29
-
30
-
> Federated public instances can be [found on GitHub](
An **instance****tracks****terms** of a single **collection**.
26
+
Open Terms Archive is a decentralised system. It aims at enabling any entity to **track****terms** on its own. To that end, the Open Terms Archive **engine** can be run on any server, thus making it a dedicated **instance**. An **instance****tracks****terms** within a single **collection**.
36
27
37
28
A **collection** is characterised by a **scope** across **dimensions** that describe the **terms** it **tracks**, such as **language**, **jurisdiction** and **industry**.
38
29
39
-
> Federated public collections can be [found on GitHub](https://github.com/OpenTermsArchive?q=versions).
40
-
41
30
#### Example scope
42
31
43
32
> The terms tracked in this collection are:
44
33
> - Of dating services used in Europe.
45
34
> - In the European Union and Switzerland jurisdictions.
46
35
> - In English, unless no English version exists, in which case the primary official language of the jurisdiction of incorporation of the service operator will be used.
47
36
37
+
### Federation
38
+
39
+
In order to maximise discoverability, collaboration and political power, public **collections** are **federated** within a single ecosystem. This makes their data mutually discoverable and enables mutualising effort.
40
+
48
41
### Terms types
49
42
50
43
To distinguish between the different **terms** of a **service**, each has a **type**, such as “Terms of Service”, “Privacy Policy”, “Developer Agreement”…
@@ -105,9 +98,8 @@ Such a dataset can be generated from **versions** alone. If **snapshots** and **
105
98
106
99
This documentation describes how to execute the **engine** independently from any specific **instance**. For other use cases, other parts of the documentation could be more relevant:
107
100
108
-
- to contribute **declarations** to an existing **instance**, see [how to contribute terms]({{< relref "contributing-terms" >}});
109
-
- to create a new **collection**, see the [collection bootstrap](https://github.com/OpenTermsArchive/template-declarations) script;
110
-
- to create a new public **instance**, see the [governance]({{< relref "governance" >}}) documentation.
101
+
- to contribute **declarations** to an existing **collection**, see [contributing terms]({{< relref "contributing-terms" >}});
102
+
- to create a new **collection**, see [creating a new collection]({{< relref "collections/create" >}}).
111
103
112
104
### Requirements
113
105
@@ -284,68 +276,6 @@ The server `<port>` and `<basePath>` are defined in the [configuration](#configu
284
276
285
277
> For example, with the default configuration, the list of services can be found at [`http://localhost:3000/api/v1/services`](http://localhost:3000/api/v1/services).
286
278
287
-
## API
288
-
289
-
Open Terms Archive collections can be explored locally over a [Node.js](#nodejs-api), or remotely over a [Web API](#web-api). As Open Terms Archive is decentralised, each [instance](#instances) embarks its own API. The documentation relevant to the specific version of the engine on that instance is provided on that instance itself.
290
-
291
-
### Web API
292
-
293
-
The Web API exposes JSON data over HTTP(S). Its [OpenAPI](https://swagger.io/specification/) specification can be found at `http://localhost:<port>/<basePath>/<API version>/docs`.
294
-
295
-
That endpoint exposes both the OpenAPI specification if the requested `Content-Type` is JSON, and a Swagger UI for visual and interactive documentation otherwise.
296
-
297
-
> For example, the [documentation](http://162.19.74.224/api/v1/docs) of the [Demo collection](https://github.com/OpenTermsArchive/demo-declarations) is publicly available for exploration.
298
-
299
-
### Node.js API
300
-
301
-
As a Node module dependency, the engine exposes a JavaScript API that can be called in your own code. The following modules are available.
302
-
303
-
#### `fetch`
304
-
305
-
The `fetch` module gets the MIME type and content of a document from its URL
306
-
307
-
```js
308
-
importfetchfrom'@opentermsarchive/engine/fetch';
309
-
```
310
-
311
-
Documentation on how to use `fetch` is provided [as JSDoc](https://docs.opentermsarchive.org/jsdoc/).
312
-
313
-
##### Headless browser management
314
-
315
-
If you pass the `executeClientScripts` option to `fetch`, a headless browser will be used to download and execute the page before serialising its DOM. For performance reasons, the starting and stopping of the browser is your responsibility to avoid instantiating a browser on each fetch. Here is an example on how to use this feature:
The `fetch` module options are defined as a [`node-config` submodule](https://github.com/node-config/node-config/wiki/Sub-Module-Configuration). The default `fetcher` configuration can be overridden by adding a `fetcher` object to the [local configuration file](#configuration-file).
328
-
329
-
#### `extract`
330
-
331
-
The `extract` module transforms HTML or PDF content into a Markdown string according to a [declaration](#declarations).
The `SourceDocument` format is defined [in source code](https://github.com/OpenTermsArchive/engine/tree/main/src/archivist/services/sourceDocument.js).
348
-
349
279
- - -
350
280
351
281
## Configuring
@@ -393,13 +323,12 @@ The default configuration can be found in `config/default.json`. The full refere
393
323
"sendWarnings":"Boolean. Set to true to also send email in case of warning",
394
324
}
395
325
},
396
-
"tracker": { //Tracking mechanism to create GitHub issues when terms content is inaccessible
326
+
"reporter": { //Reporter mechanism to create GitHub issues when terms content is inaccessible
397
327
"githubIssues": {
398
-
"repository":"GitHub repository where to create isssues",
399
-
"label": {
400
-
"name":"Label to attach to bot-created issues. This specific label will be created automatically in the target repository",
401
-
"color":"The hexadecimal color code for the label, without the leading #",
402
-
"description":"A short description of the label"
328
+
"repositories": {
329
+
"declarations":"GitHub repository where to create issues; expected format: <owner>/<repository>",
330
+
"versions":"GitHub repository of versions associated with the declarations; expected format: <owner>/<repository>",
331
+
"snapshots":"GitHub repository of snapshots associated with the declarations; expected format: <owner>/<repository>"
As Open Terms Archive is decentralised, each instance embarks its own API. The documentation relevant to the specific version of the engine on that instance is provided on that instance itself.
9
+
10
+
The Collection API exposes JSON data over HTTP. Its [OpenAPI](https://swagger.io/specification/) specification can be found at `http://localhost:<port>/<basePath>/<API version>/docs`.
11
+
12
+
That endpoint exposes both the OpenAPI specification if the requested `Content-Type` is JSON, and a Swagger UI for visual and interactive documentation otherwise.
13
+
14
+
> For example, the [documentation](http://162.19.74.224/api/v1/docs) of the [Demo collection](https://github.com/OpenTermsArchive/demo-declarations) is publicly available for exploration.
Open Terms Archive is a decentralised system that tracks collections of services' terms across multiple servers. Each collection operates its own API, and the federated API unifies search and discovery across collections, fostering collaboration with external applications.
9
+
10
+
The Federated Web API exposes JSON data over HTTP. Its [documentation](http://51.89.136.45/v1/docs/) is provided in a dedicated, interactive interface.
11
+
12
+
That endpoint exposes both the [OpenAPI](https://swagger.io/specification/) specification if the requested `Content-Type` is JSON, and a Swagger UI for visual and interactive documentation otherwise.
13
+
14
+
## Beta
15
+
16
+
This API is offered as a preview, based on a first use case [defined](https://github.com/OpenTermsArchive/engine/issues/1016) with partner [ToS;DR](https://tosdr.org). Unexpected problems or missing functionality may arise. Please provide feedback through [issues](https://github.com/OpenTermsArchive/federated-api/issues) in the dedicated repository.
17
+
18
+
## Source code
19
+
20
+
The codebase for the Federated API is available on [`github.com/OpenTermsArchive/federated-api`](https://github.com/OpenTermsArchive/federated-api).
21
+
22
+
## Deploying
23
+
24
+
Deployment recipes are available in a [dedicated repository](https://github.com/OpenTermsArchive/deployment). Look at the [Federated API section](https://github.com/OpenTermsArchive/deployment#federated-api-application) on the README to know how to deploy the API.
As a Node module dependency, the engine exposes a JavaScript API that can be called in your own code. The following modules are available.
9
+
10
+
## `fetch`
11
+
12
+
The `fetch` module gets the MIME type and content of a document from its URL
13
+
14
+
```js
15
+
importfetchfrom'@opentermsarchive/engine/fetch';
16
+
```
17
+
18
+
Documentation on how to use `fetch` is provided [as JSDoc](/jsdoc/index.html).
19
+
20
+
### Headless browser management
21
+
22
+
If you pass the `executeClientScripts` option to `fetch`, a headless browser will be used to download and execute the page before serialising its DOM. For performance reasons, the starting and stopping of the browser is your responsibility to avoid instantiating a browser on each fetch. Here is an example on how to use this feature:
The `fetch` module options are defined as a [`node-config` submodule](https://github.com/node-config/node-config/wiki/Sub-Module-Configuration). The default `fetcher` configuration can be overridden by adding a `fetcher` object to the local configuration file.
35
+
36
+
## `extract`
37
+
38
+
The `extract` module transforms HTML or PDF content into a Markdown string according to a declaration.
The `SourceDocument` format is defined [in source code](https://github.com/OpenTermsArchive/engine/tree/main/src/archivist/services/sourceDocument.js).
0 commit comments