Meeds-io / MIPs

The Meeds Improvement Proposal repository
0 stars 0 forks source link

Contribution Center #13

Closed srenault-meeds closed 1 year ago

srenault-meeds commented 2 years ago

Rationale

Challenges feature has been provided lately to enable users to declare what they have done using the platform or not. This was the beginning of the engagement / contribution center we want to implement. FYI, challenges is related to domains, to achievements and to rewards features. And to conclude this first information, the challenges app was the first way to hilight the way the platform can help companies and any other kind of organizations to engage users, employees, volunteers.

Now that this first use case of declaring and gathering challenges has been implemented and used, we would like to enhance this use case with a whole Contributions center. This, to be consistent with the Meeds project and its White paper The Work Metaverse.

This Contributions center aims to elaborate our way of engaging people as well as it aims to make it easier: as a user

1. Functional requirements

Contributions center perequirements

Contributions center display

From the first tab which gathers any program running in the organization, the user will access by default enabled programs. Admin can see disabled programs thanks to a dropdown. Programs are listed from the more recently created to the less one, 9 programs per page

image

From this tab, I can click to each program to see the detail full page. This full page display the details of the program: cover, description, rules (automatic rules, manual rules like challenges). Each program is accessible from a direct link. (/progams/[id])

image

From the second tab, the user list the challenges grouped by the more recent created to less ones and challenges are grouped by programs itself sorted from the more recent created to the less ones. He will have the choice to filter by all, active, upcoming and ended challenges. image

By clicking to a challenge, a challenge details drawer displays the informations for the challenge: description, audience, points, programs, participants.

image

From the third tab, users depending their role (see above) will see achievements with the ability to sort by date (by default), action type and status. And actions for admin can be done from there.

image

Advanced filters will be added so the user depending its role can filter the list per program and/or per grantee.

image

In the future, we plan to improve way items are displayed and way items are accessible (i.e announce a challenge from the challenge details drawer). For now, we aim to make sure the whole contributions center gives an easy way for differents users persona to manage contributions.

2. Non Functional Requirements

2.1. Performance requirements

The needed volumetry shouldn't change, since the programs, challenges and rules already exists. In term of realizations, we should expect to have the same data volumetry as well. For performances, no special requirement is needed.

2.2. Security requirements (Authentication, Authorizations, Audit track / traceability, data retention…)

Some administrative elements will be visible by simple users and external users at the same time for administrators. The UI has to be adapted to end user profile and permissions, especially for REST endpoints that has to constantly verify and secure access to all elements.

2.3. Requirements related to existing users data

The pre-defined domains (AKA programs) will not change for fresh and existing installations. In fact, the predefined programs (Social, Knowledge ...) will be displayed as any other programs that will not be assigned to an audience (space) by default. Besides, when editing one of those programs, the administrator will have to choose an audience in order to save the changes.

2.4. Requirements related to existing features (ex: Add a button to existing modules...)

No changes are required by this new feature, except that when the Contributions center feature is finished, we may delete Administrative pages for:

2.5. Feature Flag

3. Software Architecture

3.1. Security

In REST APIs, we will have to use @RolesAllowed to restrict access to endpoints for authenticated internal and external users. In addition, the Service Layer has to make a fine security check for access & modification of elements switch program owners, platform administrators and roles of the authenticated user.

3.2. Access (GUI, API…)

The UI will be made using Vue 2 & Vuetify inside portlets. The frontend will access data through REST APIs.

3.2.1. Portlet

A New Portlet will be defined for Contributions Center. As long as this feature remain in development phase, we should keep this portlet merged at the same time with challenges portlet. Thus a single portlet has to be used for both UIs to be able to display only one UI depending on Feature flag status.

3.2.2. Rest API Design

We will define REST APIs for : Programs CRUD (update)

3.3. Services & processing

Comparing to existing business rules, those new business rules will be applied when the feature flag of engagement center is enabled:

3.4. Data and persistence

The data model of gamification domains will be changed to allow adding :

EngagementCenterV1

3.5. Migration strategy

No migration procedure is needed but liquibase changelogs to add new fields. The newly added fields of type enum will have as default value the first item, such as EntityType.AUTOMATIC for programs/domains & achievements.

boubaker commented 1 year ago

Ready to tech review @rdenarie

boubaker commented 1 year ago

ready to review @rdenarie

boubaker commented 1 year ago

Ready for PR review @rdenarie

https://github.com/Meeds-io/gatein-portal/pull/483 https://github.com/Meeds-io/social/pull/2049 https://github.com/Meeds-io/gamification/pull/709 https://github.com/Meeds-io/kudos/pull/256 https://github.com/Meeds-io/app-center/pull/254 https://github.com/Meeds-io/notes/pull/646 https://github.com/Meeds-io/task/pull/151 https://github.com/Meeds-io/gamification-github/pull/65

rdenarie commented 1 year ago

All open PR are validated. Social one is closed so I think it is not necessary.

Ok for merge

boubaker commented 1 year ago

MIP merged