The current build is made with React 18 for the front-end and bundled using Vite. We have incorporated Inrupt's Javascript libraries for Solid into the application. See RESOURCES.md. Several node scripts have been setup for ease of development, namely for linting, formatting, and generating JSDoc documentation for the React version of the application. Vitest and jsdom are libraries being used for unit tests.
To generate the full React development documentation of the application locally, the following command can be ran:
npm run docsThis will create the documentation within /docs via JSDoc. The documentation could easily be accessed locally by running:
npx serve docsA local live server link to the documentation will be prepared at:
http://localhost:3000/To clear the documentation from /docs, you can simply run the following command:
npm run docs:clearThis will clear all, but /docs/README.md and /docs/ZXING_barcode.md from your branch.
Linting and formatting for this project has also been setup using ESlint and Prettier. To lint your changes with ESLint, you can run:
npm run lintTo fix potential lint errors, you can run:
npm run lint:fixYou can also check the formatting of the existing code using Prettier by running:
npm run prettier:checkThis will enable Prettier to check if the existing code follows the rules for this project in .prettierrc.js. To format the project with existing Prettier settings, simply run:
npm run prettier:runTo get a running version of this branch, clone from this branch into a directory and run the following within the directory containing the package.json:
npm installAfter installing the dependencies from package.json, run the following to start a local live server to view the application:
npm run devThe local live server would be located in port 5173 and with the following URL:
http://localhost:5173/PASS/From here you can access Solid servers online.
PASS includes some dev tools that allow you to run a SOLID pod on your local machine for testing instead of an online provider.
To do so, you will need to edit the root .env file.
-
Set the
VITE_SOLID_IDENTITY_PROVIDER_DEVtolocalhost:3000(or where ever else you wish to host the server). You can find a pre made example inenv_templates/dev.env. -
Start the SOLID server in a shell window
npm run podserver- In another shell, start PASS
npm run devYou should now have a PASS application running at localhost:5173, which logs into a server located at localhost:3000
PASS is intended to work with any server that implements the SOLID protocol. However, to make development easier, we include Community Solid Server in our dev tools. The defaults work in most cases, but here are some common customizations:
You can change the port the server is listening on by using the --port or -p flags:
npm run podserver -- -p 1234Note: The npm run podserver command will launch a server that stores documents on your local file system. If you don't want to store documents, and want all server data to be deleted on shutdown, you can run
npm run podserver:tempYou can find more information on its configuration on the project's github.
Latest version of this build allows for any Solid provider. However, it is recommended users to login through https://solidcommunity.net or https://opencommons.net if testing on a live Solid server, OR localhost:3000 if testing in a local dev environment while it's still being worked on.