Web App URLs and Functionality

Warning

🚧 This section is still in active development and is subject to changes 🚧

Based on the naming scheme, this document describes the core, user-facing web app URLs and functionality provided within sprout/app/. See the outputs document for an overview and explanation of the file and folder structure outputs of Sprout. There are some differences between the naming scheme and the web app URLs:

  1. Instead of singular nouns like package and resource, the URLs use plural nouns like packages and resources since they represent a collection of items traditionally shown in a folder or list view. For instance, packages/ is the URL/folder that contains all the packages, but packages/1/ is the folder for the package with the ID of 1.
  2. Since the default action for viewing a list of items or details of a specific item are the same, unlike for the Python functions that include list and view, the URLs do not have a list action. The default action is view. Viewing a URL doesn’t just show a basic description of the object, but also has options to edit, delete, or create new objects.
  3. Unlike the Python functions which start with the action, in the URLs, the action is at the end. For instance, packages/create is the action to create a package.
  4. When a URL ends without an action, the default action is view.
  5. Databases and resource data file objects do not have any view or edit action, as we do not want to allow view access to data in the raw files and database. This is done for security, privacy, and legal reasons, and it is also out of scope of Sprout.

Following these principles, the URLs would be:

packages

View all packages found by the app by showing a list or table of packages and some basic information about each of them. From here, a user can select a package to view the package’s own landing page.

packages/create

Create and set up a new package, with basic information (i.e. properties) about the package. At the beginning, there are no resources inside a package. This URL will prompt the user to add details about the package.

packages/<id>

View the landing page of a package by showing its properties and resources. Users can move forward from here by either creating a data resource, adding more data to a data resource, or editing the package’s or resource’s properties.

packages/<id>/edit

Edit the properties of a specific package.

packages/<id>/delete

Delete a specific package. This action is permanent, so the user will be asked to confirm the deletion.

packages/<id>/resources/create

Create a new resource for data and associated properties. The user can upload a file with data, which will be used to extract some basic properties. The user will then be prompted to fill in the remaining properties and validate the extracted properties. When this is done, the properties are completed and created. The user can continue to edit the resource after creation.

packages/<id>/resources/<id>

View the properties of a specific resource. From here, a user can move forward by adding more data to the resource or editing the resource’s properties.

packages/<id>/resources/<id>/edit

Edit a resource’s properties, but not the data itself. We intentionally don’t allow access to data to minimise potential security and privacy concerns and to reduce the amount of work we have to do to develop safe ways to show the data. Editing the data is also outside the scope of Sprout.

packages/<id>/resources/<id>/add

Add more data to a specific resource. The uploaded data must conform to the existing properties of the resource, otherwise, the properties will need to be updated first (via edit). Either that, or the new data will need to be edited manually before it can successfully be uploaded.

packages/<id>/resources/<id>/delete

Delete all associated data and properties of a specific resource. This is permanent, so the user will be asked to confirm the deletion.