DataCater/datacater

Introduce Top Level Project resource

ChrisRousey opened this issue · 2 comments

In order to support team and project collaboration within the application, we would like to introduce the concept of 'Projects'.

With Projects, it will be possible to group other resources (Streams, configs, etc.) into units, so that teams and users can collaborate within one context, instead of manging user rights for each resource separately.

The conceptof projects is outlined in the following chart:
DC_Projects_Concept

The steps to add Projects, which should be impolemented with this ticket are as follows:

  1. Add project entity
  2. Add project endpoint
  3. Implement a default-project
  4. On startup, a default project should be created as defined in application.yml
  5. Disable Default creation either through a parameter or when none is defined in application.yml
  6. If no project definition exists in the application.yml, A project must be created before other resources can
  7. Create a project mapping in other resources. A string representation should be enough.
  8. Update other resource endpoints with a project path parameter (Default being the default value) to filter by project
    i.e. GET /api/v1/projects/$uuid$/streams
  9. A project dropdown should be created in the frontend
  10. the project flag should be added to api calls automatically from inside the frontend
  11. Changes should be documented in gitbook by added a new "project" section under building blocks, Using datacter open-core, and API

Notes:

  1. Projects will not reference configs
  2. When a resource is created, a project must be set
  3. project labels should be immutable

@flippingbits I've created a ticket for the project concept. Feel free to leave any feedback that should be added to the ticket!

Thanks for creating the ticket, looks good to me!

Please see below my feedback:

  • We should allow to turn off the creation of the default project, via a setting in the application.yml.
  • Instead of using a flag (I guess you are referring to a query parameter?), you might want to discuss/consider making the project part of the URL (e.g., something like GET /api/v1/projects/$uuid$/streams or in the default case: GET /api/v1/projects/default/streams)