Closed srenault-meeds closed 1 year ago
Ready to tech review @rdenarie
ready to review @rdenarie
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
All open PR are validated. Social one is closed so I think it is not necessary.
Ok for merge
MIP merged
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
This Contributions center will gather three items from the most general to most detailed: programs, challenges and achievements
Any user can access the Contributions center from the appcenter by clicking to Contributions center icon (replacing the old challenges app)
When accessing the app, the user will see three tabs: Programs, Challenges, Achievements
Depending its role, the user will access the app with more or less abilities: -- Regular user: will see programs depending his membership to the program's audience that way, the user can see programs and rules, challenges related to it no matter he is external or internal. will see challenges grouped by program will only see its achievements from the achievements tab -- Funds owner: will see all the programs running in the organization with the ability to create new ones or to edit/delete current ones. will identify programs hosts so they can manage their program autonomously will see all challenges running in the organization with the ability to create new ones or to edit/delete current ones will see all achievements done in the organization with the ability to reject challenge announcement or to accept / delete -- Program owners: will see all the programs for which they have been identified program owners with ability to edit it, to identify more program owners will have the ability to see all challenges running depending its membership programs' audience will have the ability to edit challenges related to the program he owners
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
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])
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.
By clicking to a challenge, a challenge details drawer displays the informations for the challenge: description, audience, points, programs, participants.
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.
Advanced filters will be added so the user depending its role can filter the list per program and/or per grantee.
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
exo.feature.engagementCenter.enabled
true
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 :
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.