This project was bootstrapped with Create React App and uses some components/utilities from Generator Solid React.
- solid-ui-react:
- React components: LoginButton, LogoutButton
- useSession-Hook for login state and webId
- query-ldflex:
- access data in Solid pods through LDflex expressions
- solid-auth-cli,
solid-file-client,
solid-node-client: see
deployment
- bulma: styling and css framework
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
This runs publish.js
.
This script uses solid-file-client to copy
the build
folder to a specified folder in a pod to deploy the webapp.
It uses solid-auth-cli for authentication.
For this the environment variables pod_username
and pod_password
need to be set.
This also automatically runs build
before deployment.
publish2.js
uses solid-node-client, but doesn't work for now. See comment in file.
App
:- entry component
- uses
useSession
to check if the user is logged in - depending on that renders
WelcomeComponent
orLoginComponent
LoginComponent
:- shows registration link, provider selection and LoginButton
- after login redirects to app entry, which then shows
WelcomeComponent
WelcomeComponent
:- 'main' component with
NavBar
- show data form and uploads file to pod on submit
Overwrite
checkbox:- if checked creates new file with the data from template
- if not checked: appends data to existing file (or creates new file)
- 'main' component with
NavBar
:- Header with {username}
- Logout button: removes session from storage and refreshes page
UserdataFrom
:- render form for data input
- takes
onSubmit
function
FileViewer
:- shows files in app-folder
FileUploader
:- not used: allows selection of file from local filesystem
useFiles
:- needs a session and uses solid-file-client to query and return files in app-folder
GENERATE_SOURCEMAP=false
in .env
prevents the creation of sourcemaps and reduces build
size for upload/hosting in pod.