This project consists of a Svelte application with it's supporting development, testing, and deployment tools. The application was requested by Norsk institutt for naturforskning and is designed to let them view and interact with their environmental data, as they previously have had to use excel sheets for this purpose. The project is indended to integrate with their infrastructure, however it is still possible to run it locally with test data.
The application uses SvelteKit to deliver a single page application. It utilizes client side hydration to dynamically update the webpage with environmental data as the user navigates the web application.
The application can either be used with the test docker compose in this repostory, or used in a custom docker compose with upload, authentication, and postgrest services.
This is to set up the application with basic testing data. The upload functionality does not actually upload any files.
git clone <url>
docker compose up --build -d
to build and run the Svelte applicationSee usage for how to use the application.
This is how to set up the application as it was intended to be used.
Create a docker compose in a Git repository which has the following services:
Add this repo (link) as a submodule to your Git repository, placing it in a folder compatible with the service which should use the dockerfile. For example /frontend/
. This should enable your docker compose to access the Dockerfile in the root of this repository. (Git submodules guide)
(Optional) If you want to use custom endpoints for the different services, configure the following envrionment variables:
VITE_POSTGREST_URL=<postgrest endpoint>
VITE_UPLOAD_URL=<upload endpoint>
VITE_AUTH_URL=<auth endpoint>
Then run the command docker compose up --build -d
to build and run the Svelte application and the other services it uses
Add the SQL views outlined in the PostgREST API documentation to the Postgres database. This will ensure that PostgREST exposes the required endpoints for the application.
Upload your excel files containing your data in the web application following the schema in the upload documentation
To use the application simply visit the website on the following which applies:
http://localhost
for accessing locallyhttp://<your-ip>
for accessing by ip address http://<your-domain>
for accessing by domainIf the application was set up for testing, you can log into the website with the following credentials:
admin
admin
If needed, the user guide can be found here