Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

PASS

State of Build/Tech Stack

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.

PASS Terminal Commands 💻

To generate the full React development documentation of the application locally, the following command can be ran:

npm run docs

This will create the documentation within /docs via JSDoc. The documentation could easily be accessed locally by running:

npx serve docs

A 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:clear

This will clear all, but /docs/README.md and /docs/ZXING_barcode.md from your branch.


Linting

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 lint

To fix potential lint errors, you can run:

npm run lint:fix

You can also check the formatting of the existing code using Prettier by running:

npm run prettier:check

This 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:run

Run PASS Locally ⚙️

To 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 install

After installing the dependencies from package.json, run the following to start a local live server to view the application:

npm run dev

The 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.

Running with a local server ⚙️

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.

  1. Set the VITE_SOLID_IDENTITY_PROVIDER_DEV to localhost:3000 (or where ever else you wish to host the server). You can find a pre made example in env_templates/dev.env.

  2. Start the SOLID server in a shell window

npm run podserver

  1. In another shell, start PASS
npm run dev

You should now have a PASS application running at localhost:5173, which logs into a server located at localhost:3000

Customizing the local server

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 1234

Note: 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:temp

You 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.

⬆️ Back to Top