1 | # Solid JavaScript Client - solid-client
|
2 |
|
3 | @inrupt/solid-client is a JavaScript library for accessing data and managing
|
4 | permissions on data stored in Solid Pods. It provides an abstraction layer on
|
5 | top of both Solid and Resource Description Framework (RDF) principles and is
|
6 | compatible with the RDF/JS specification. You can use solid-client in Node.js
|
7 | using either CommonJS or ES modules, and in the browser with a bundler like
|
8 | Webpack, Rollup, or Parcel.
|
9 |
|
10 | @inrupt/solid-client is part of a family open source JavaScript libraries
|
11 | designed to support developers building Solid applications.
|
12 |
|
13 | # Inrupt Solid JavaScript Client Libraries
|
14 |
|
15 | ## Data access and permissions management - solid-client
|
16 |
|
17 | [@inrupt/solid-client](https://docs.inrupt.com/developer-tools/javascript/client-libraries/)
|
18 | allows developers to access data and manage permissions on data stored in Solid
|
19 | Pods.
|
20 |
|
21 | [@inrupt/solid-client-authn-browser](https://www.npmjs.com/package/@inrupt/solid-client-authn-browser)
|
22 | allows apps running in a browser to authenticate against a Solid server. This is
|
23 | only necessary if you wish to access private resources in a Pod (to access
|
24 | public resources you could simply use standard `window.fetch()`).
|
25 |
|
26 | ## Vocabularies and interoperability
|
27 |
|
28 | A fundamental requirement for any two systems to interoperate at all is that
|
29 | they have a shared understanding of the concepts and ideas relevant to those
|
30 | systems. That shared understanding is expressed as a common 'language', and
|
31 | the individual terms from that language are typically described and explained in
|
32 | dictionaries.
|
33 |
|
34 | The Solid eco-system uses RDF vocabularies (or slightly more formally,
|
35 | 'ontologies') to describe concepts and ideas in a machine-readable, W3C
|
36 | standardized format (effectively, these RDF vocabularies act as dictionaries for
|
37 | systems to share concepts and ideas).
|
38 |
|
39 | There are already many common vocabularies published on the web, such as the
|
40 | [vCard vocabulary](https://www.w3.org/TR/vcard-rdf/) for describing the concepts
|
41 | and ideas associated with People and Organizations, or [Schema.org](https://schema.org/)
|
42 | for describing the things search engines are typically interested in, intended
|
43 | to be used by webmasters to mark up their pages in ways that those search
|
44 | engines can then understand.
|
45 |
|
46 | As a convenience for JavaScript developers, Inrupt publishes various npm modules
|
47 | that provide JavaScript classes containing constants representing the individual
|
48 | terms described in many of these vocabularies today, including modules
|
49 | specifically for Solid-related vocabularies, and for Inrupt-specific
|
50 | vocabularies.
|
51 |
|
52 | By simply importing one of these NPM modules, developers have immediate access
|
53 | to all the terms described in all the RDF vocabularies referenced by that
|
54 | module.
|
55 |
|
56 | ### Common RDF vocabularies
|
57 |
|
58 | This module bundles together JavaScript classes representing many of the most
|
59 | common RDF vocabularies published on the web today (e.g. FOAF, Schema.org,
|
60 | vCard, SKOS, etc.):
|
61 | [@inrupt/vocab-common-rdf](https://www.npmjs.com/package/@inrupt/vocab-common-rdf)
|
62 |
|
63 | ### Solid-specific RDF vocabularies
|
64 |
|
65 | This module bundles together JavaScript classes representing all the RDF
|
66 | vocabularies related to Solid (e.g. Solid terms, WebACL, ACP, etc.):
|
67 | [@inrupt/vocab-solid-common](https://www.npmjs.com/package/@inrupt/vocab-solid-common)
|
68 |
|
69 | ### Inrupt-specific RDF vocabularies
|
70 |
|
71 | This module bundles together JavaScript classes representing all the RDF
|
72 | vocabularies created and maintained by Inrupt (e.g. an Inrupt test vocabulary,
|
73 | Inrupt glossaries, Inrupt product vocabularies, etc.):
|
74 | [@inrupt/vocab-inrupt-common](https://www.npmjs.com/package/@inrupt/vocab-inrupt-common)
|
75 |
|
76 | **Note:** All the above npm modules are currently generated and published
|
77 | to npm automatically by a closed-source Inrupt tool. We plan to open-source that
|
78 | tool in the future, but currently we have no planned release date.
|
79 |
|
80 | # Browser support
|
81 |
|
82 | Our JavaScript Client Libraries use relatively modern JavaScript features that
|
83 | will work in all commonly-used browsers, except Internet Explorer. If you need
|
84 | support for Internet Explorer, it is recommended to pass them through a tool
|
85 | like [Babel](https://babeljs.io), and to add polyfills for e.g. `Map`, `Set`,
|
86 | `Promise`, `Headers`, `Array.prototype.includes`, `Object.entries` and
|
87 | `String.prototype.endsWith`.
|
88 |
|
89 | Additionally, when using this package in an environment other than Node.js, you
|
90 | will need [a polyfill for Node's `buffer` module](https://www.npmjs.com/package/buffer).
|
91 |
|
92 | # Installation
|
93 |
|
94 | For the latest stable version of solid-client:
|
95 |
|
96 | ```bash
|
97 | npm install @inrupt/solid-client
|
98 | ```
|
99 |
|
100 | For the latest stable version of all Inrupt Solid JavaScript libraries:
|
101 |
|
102 | ```bash
|
103 | npm install @inrupt/solid-client @inrupt/solid-client-authn-browser @inrupt/vocab-common-rdf
|
104 | ```
|
105 |
|
106 | # Issues & Help
|
107 |
|
108 | ## Solid Community Forum
|
109 |
|
110 | If you have questions about working with Solid or just want to share what you’re
|
111 | working on, visit the [Solid forum](https://forum.solidproject.org/). The Solid
|
112 | forum is a good place to meet the rest of the community.
|
113 |
|
114 | ## Bugs and Feature Requests
|
115 |
|
116 | - For public feedback, bug reports, and feature requests please file an issue
|
117 | via [Github](https://github.com/inrupt/solid-client-js/issues/).
|
118 | - For non-public feedback or support inquiries please use the
|
119 | [Inrupt Service Desk](https://inrupt.atlassian.net/servicedesk).
|
120 |
|
121 | ## Documentation
|
122 |
|
123 | - [Inrupt Solid Javascript Client Libraries](https://docs.inrupt.com/developer-tools/javascript/client-libraries/)
|
124 | - [Homepage](https://docs.inrupt.com/)
|
125 |
|
126 | # Changelog
|
127 |
|
128 | See [the release notes](https://github.com/inrupt/solid-client-js/blob/main/CHANGELOG.md).
|
129 |
|
130 | # License
|
131 |
|
132 | MIT © [Inrupt](https://inrupt.com)
|