I’ve been working on a new developer tool to help me and my team interact with data in Pods. It allows you to visualise Pod data as a tree, read/create/edit/delete resources, and view response data. You can also add multiple Pods and browse across them.
I thought I’d share in case anyone else finds its useful.
I’d love to get feedback from other Solid developers out there. Is this something you’d find useful? What would make it more useful? If there’s enough interest then I may look to develop it further.
Your app is not working well when the podRoot contains index.html like in the following pod’s https://solidos.solidcommunity.net/ or https://bourgeoa.solidcommunity.net/. The index.html content is displayed but it should be the folder content.
Somehow you must pass an { accept:'text/turtle' } header
Thanks Jeff! I’m using RDF.ex, which is an Elixir library for working with RDF. I’m not using any Solid-specific libraries as I couldn’t find any written in Elixir, but I may release my Solid client code as a library in due course.
The source code is currently private, but the app is built on top of the Phoenix Web Framework and uses Monaco Editor for the text editor. I may extract and publish the Solid client code as an Elixir package in due course.
I’ve given it a try and I like it, very smooth :D.
One small nitpick I’d mention is that documents have the same icon as containers (the > chevron), so it is confusing and gives me the impression that I can continue expanding further.
I also noticed that it doesn’t work with local pods. Which is understandable, given that the app is running on a server and not entirely in the browser. But I think this would be really useful for development as well.
Good point about documents and containers both having the same chevron icon. I’ll differentiate them more clearly soon.
I’m hoping to make a desktop version of PodPro at some point, which will make that possible to connect to pods running on localhost. In the meantime, it’s possible to connect to pods running locally if you expose localhost to the internet using a tool like ngrok.
I actually tried using ngrok, but I was getting and internal server error and I assumed it wasn’t supported for some reason. But if you’re saying that it works, maybe I’m doing something wrong?
I am using the Community Solid Server version 3.0.0 and launching it with the following commands:
# Launch ngrok
ngrok http 4000 --region eu
# Using the ngrok url
npx community-solid-server -c @css:config/file-no-setup.json -p 4000 -f ./pod -b https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io
Then, I am trying to log in using the following url https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/noeldemartin/ and I get the following:
2022-04-21T17:40:44.301Z [BaseHttpServerFactory] info: Received GET request for /noeldemartin/.well-known/openid-configuration
2022-04-21T17:40:44.374Z [WebAclReader] info: Reading ACL statements from https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/noeldemartin/.acl
2022-04-21T17:40:44.378Z [PermissionBasedAuthorizer] warn: Unauthenticated agent has no read permissions
Of course, just after writing this I tried to log in with https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/ and it works . But then I’m not connected to any pod and if I then try to connect with https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/noeldemartin/ I get a “no pod found” error, these are the logs in the server:
2022-04-21T17:44:38.353Z [BaseHttpServerFactory] info: Received GET request for /noeldemartin/
2022-04-21T17:44:38.356Z [DPoPWebIdExtractor] warn: Error verifying WebID via DPoP-bound access token: The access token issuer doesn't match its associated WebID's trusted OIDC issuers.
Actual:
Expected: https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/
2022-04-21T17:44:38.378Z [WebAclReader] info: Reading ACL statements from https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/noeldemartin/.acl
2022-04-21T17:44:38.509Z [BaseHttpServerFactory] info: Received GET request for /
2022-04-21T17:44:38.513Z [DPoPWebIdExtractor] warn: Error verifying WebID via DPoP-bound access token: The access token issuer doesn't match its associated WebID's trusted OIDC issuers.
Actual:
Expected: https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/
2022-04-21T17:44:38.539Z [WebAclReader] info: Reading ACL statements from https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/.acl
2022-04-21T17:44:38.634Z [BaseHttpServerFactory] info: Received GET request for /
2022-04-21T17:44:38.636Z [DPoPWebIdExtractor] warn: Error verifying WebID via DPoP-bound access token: The access token issuer doesn't match its associated WebID's trusted OIDC issuers.
Actual:
Expected: https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/
2022-04-21T17:44:38.644Z [WebAclReader] info: Reading ACL statements from https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/.acl
Ah ok, I think there are few separate issues going on here!
The reason you can’t log in using https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/noeldemartin/ is because there is no accessible openid config file at https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/noeldemartin/.well-known/openid-configuration. This only exists at https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/.well-known/openid-configuration, hence why you could log in with that. Nevertheless, PodPro shouldn’t throw a 500 error in the first case, so I’ve added some better error handling to deal with it.
I think the reason you’re not connected to any pod once you have successfully logged in is because the webid returned in your id token is http://localhost:4000/noeldemartin/profile/card#me rather than https://xxxx-xx-xxx-xx-xxx.eu.ngrok.io/noeldemartin/profile/card#me. This might be the case if the pod was set up when CSS was still running on localhost? This may also explain why you get a “no pod found” error when trying to connect explicitly, though I’m not sure about that. Could you try either creating a new pod with the server running on the ngrok url, or else updating the localhost references in your existing pod, and see if that helps?
Strangely enough, I tried changing the turtle files to be declared relative instead of absolute. For example:
# Rename this...
<#me> a <http://xmlns.com/foaf/0.1/Person>;
<http://www.w3.org/ns/solid/terms#oidcIssuer> <http://localhost:4000/>;
# To this
<#me> a <http://xmlns.com/foaf/0.1/Person>;
<http://www.w3.org/ns/solid/terms#oidcIssuer> </>;
But that didn’t work :(. I could log in, but then every container returned an unauthorized error, so I couldn’t browse beyond the first level of the hierarchy (and without seeing the contents).
However, creating a new account does work, so I suppose it’s an issue with CSS. I’ll try to find a solution because it’d be annoying if I have to create a new account every time.
In any case, it works now, thanks for your help :).
I also noticed that images don’t render properly, and the Content-Type header does say image/png so that could be another improvement.
A quick question about the syntax highlighting, did it come straight from Monaco or did you write your own extention for it? Turtle does not show up in the list of supported languages on the Monaco website.