Solid Accountant - Technical¶
This information is meant for developers looking at the code of the Accountant application.
To install all libraries and build the code: run
yarn from the project folder
To run the code in a development server: execute
yarn start from the project folder
The noteworthy libraries used and the reason for doing so are listed below:
|n3||Implementation of the RDF.js low-level specification that lets you handle RDF.||https://www.npmjs.com/package/n3|
|@inrupt/solid-client-authn-browser||Authenticate web apps (in the browser) with Solid identity servers.||https://www.npmjs.com/package/@inrupt/solid-client-authn-browser|
|@inrupt/vocab-common-rdf||Bundle of common RDF vocabularies.||https://www.npmjs.com/package/@inrupt/vocab-common-rdf|
Angular works with components. Each subpage is a Component, as such the following folders contain the component for those subpages:
/src/app/home: Home page
/src/app/pp: Payment pointers page
/src/app/about: About page
/src/app/auth: Login page
Nothing special happens in the code for these pages. The code and HTML should speak for itself.
The leftover components are used as custom HTML Elements in the HTML. A component has HTML, CSS and code (typescript) associated with it. You can use a component in HTML by using an HTML tag to refer to it.
<!-- Example tag --> <app-login-btn [provider]="p"></app-login-btn>
This component is used for the login boxes on the login page with a logo of the IDP.
This service contains the code to read from, parse and write to the WebID document on the solid pod of the user. It mainly uses the n3 library to read/write the solid WebID profile.
The code itself is documented.
All app routing paths can be fouind in
The WebID profile is stored in RDF. That means that data written to that profile should also be formatted in RDF. To store our PaymentPointers, the following RDF triples are written into that WebID profile:
@prefix : <#>. ... @prefix n: <https://paymentpointers.org/ns#>. ... #me ... n:hasPaymentPointer :me-paymentpointer-1. :me-paymentpointer-1 a n:InterledgerPaymentPointer; n:paymentPointerValue "$my.paymentpointer.value".