-
Notifications
You must be signed in to change notification settings - Fork 27
Getting Started
Currently, we require Node version 18.19.0 and NPM for our package manager. We recommend using Node Version Manager (NVM) to install Node and npm. To proceed using NVM, perform the following:
- Download NVM for your system.
- For Mac, Linux, and other POSIX users: https://github.com/nvm-sh/nvm
- For Windows users: https://github.com/coreybutler/nvm-windows
-
Install node version 18:
nvm install 18.19.0
-
Use that node version:
nvm use 18.19.0
-
Check that Node and npm are set up:
node -v
npm -v
The node version should be 18.19.0 and the npm version should be 10.2.3. If they are not these versions, or if either of those commands cause an error, node has not been installed correctly.
-
Clone the git repository:
git clone https://github.com/codeforpdx/PASS.git
-
Install project dependencies:
npm install
The current version of PASS currently uses .env file to load environment variables. To set up the environment variables:
-
Navigate to the project's root directory
-
Copy the
env.template
file into a.env
file. With this command:cp env.template .env
PASS can connect to any solid-spec compliant pod server. However, for testing, it's recommended that you run a server locally for development and testing. PASS provides tools to make this easy to do.
-
Navigate to the project's root directory
-
Launch the development server with:
npm run podserver
This will launch a local Solid server where you could create pods. The server will begin listening on http://localhost:3000 and will create a folder in the PASS project folder called local_temp_server_files
. You can find all server and pod files there.
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
.
-
Open a browser and navigate to http://localhost:3000. You should get a "Community Solid Server" screen. In the "Getting started as a user." section, click on the "Sign up for an account," asking you to set up the server and create an account.
-
You'll be taken to an "Create Account" screen. Create a new Podserver account by inputting an email, password and confirm password in those fields, and then click on the "Register" button at the bottom.
-
You'll be taken to another "Community Solid Server" page for "Your account." The email login you just registered should be in the "Email/password logins" section at the top.
-
In the "Pods" section on that page, click the "Create pod" link.
-
This will take you to another "Create account" page for the Podserver. Fill in the "Name" field with whatever name for the Pod you wish.
-
Below that, click the radio button for "Use the WebID in the Pod and register it to your account," unless you're testing with an external WebID you already have, in which case, click the "Use an external WebID" radio button and input that external WebID in that field. Once that is all filled in, click the "Create pod" button at the bottom.
-
You'll be taken to a screen that has "Your new Pod" and "Your new WebID" and the URLs at which they're located. Note these down to use for your login to the PASS web site.
-
Navigate to the project's root directory
-
Launch PASS with the command:
npm run dev
-
PASS should launch at http://localhost:5173.
-
Once you visit that url, click the
Login
button on the home page to your local Pod server to finish login, using the WebID you just authorized from above, click the "Remember this client" checkbox, and click the "Authorize" buton. if everything has been set up right, you should be logged into your local Pod server and logged into your local PASS page.
To ease development, the library concurrently
has been included as part of our development environment. As such, you would only need to run:
npm run start
To start both PASS and the local Solid Server if you wish to not open separate terminal windows for running PASS and the local Solid server separately as shown from the instructions in previous sections.
PASS is being developed by volunteers through CODE PDX, a Portland, OR civic coding organization with the support of Technology Association of Oregon, OpenCommons, and Oregon Digital Safety Net.