Skip to content

dushimsam/GSoC-22

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Google Summer of Code 2022

A full report on my Google Summer of Code 2022 work with FOSSology

Project: "REST API and UI improvements" πŸ‘¨β€πŸ’»

image

Google Summer of Code 2022 🚩 Report: "REST API and UI improvements" πŸ‘¨β€πŸ’»

About me πŸ‘©β€πŸ’»

I am Samuel Dushimimana, a graduate from the first cohort in Software Engineering and Embedded Systems at Rwanda Coding Academy with more than 4 years of experience in building full stack applications. I'm so excited to be a part of FOSSology community in Google Summer of Code 2022.

In this article am going to outline the details of my contributions as a reference of project completion during the 12 weeks of coding.

🌏 CONTRIBUTIONS

During this period i have been working on different modules of the project in the three categories:

  • EXISITING FEATURE ENHANCEMENT: In this category i have been fixing existing bugs in the REST end points and introducing new features on the UI to enhance the user experience.

  • UI EMPROVEMENT: Introducing new pages to the frontend.

  • BUILDING REST APIS: The formal backend did not expose all the required APIs to satisfy the UI. I raised more APIs that were on demand to be consumed by the client.

Let's dive into each category in details to showcase all the contributions with the corresponding tests in screenshots where possible and the respective links to the Pull requests.

FEATURE ENHANCEMENT AND BUG FIX πŸ›

I fixed the existing problem that could arise in uploads such as FILE , VCS or the ULR type. After submitting the file to the backend for-instance the client could also wait up to 10 adjacent calls checking if the ununpack and adj2nest agents has completed their role on the uploaded item so that it can goes on requesting for the creation of the corresponding job of the item.

Sometimes the 10 adjacent calls were not enough for the agents to having completed the work;as the result the corresponding job for the uploaded item could not be created.

My work here was to merge these processes into one in other words through one upload request from the client; i will do the rest of the work on the backend side. Here the client will not need again to wait so that it can continue with the request of the job creation.

image image

Major Pull Requests

UI EMPROVEMENT (FRONTEND) ✨

The major contributions on the frontend side in this period was focused on enhancing the 3 modules of the project which are GROUPS , FOSSOLOGY MAINTENANCE and LICENSE.

1. GROUPS

i. DELETE GROUP PAGE

Created the Delete group page to avail the user to delete a particular group. I developed the page in the REACT Js and the useful components for the page such as the POPUP modal. This UI work was also proceded by integrating the page to the REST-APIs to make it more dynammic.

image

Pull request:- feat(ui): added delete group page

ii. MANAGE GROUP USERS PAGE

Created the Page for managing group users. The application admin needs to manage the users in different groups. This page needed to meet all these user requirements:

  • Admin can add new users to any group as members.
  • Admin can view the different existing group and non group members in each group.
  • Admin can remove a member from as specific group.
  • Admin can change the permission of any member from any group.

My ui-page has satisfied all requirements that were requested.

image

Pull request:- feat(UI): added manage group-users page

2. MAINTENANCE

Created the maintenance page to help the user request the running of the FOSSology maintenance operations. The operations can be like validating folders , removing specific rows from the database , removing files and tables etc. The work involved were to create the UI Page and integrate it to the respective end point.

image

Major Pull Requests

3. LICENSE

i. IMPORT LICENSE

I created the page to help the user to upload any license csv file. The license can be created manually by filling the forms but there was no way through the page to help the user also import existing license files.

The page i created allows the user to upload the license csv file with corresponding delimiter and enclosure properties. The properties are useful parameters used on the backend to extract significant information from the license file.

image

Pull Request : feat(UI): Import CSV-license file PAGE

REST-APIS (BACKEND) ✨

I fixed and created the new REST-APIs on the FOSSology backend. Some pages on the UI were not integrated due to the absense of the required end-points to be consumed. Others were there but some of them could not work as expected. My work on the backend was to fix and introduce new END-POINTS there. Some of my major modules i focused on to improve were GROUPS , UPLOADS , MAINTENANCE AND LICENSE.

1. GROUPS

i. DELETE GROUP API

I added the delete functionality from the groups module to remove any specific deletable group. This API was required to be consumed by the Delete group page. Through the given GROUP_ID in the request params, my API can manage the rest of the work.

image

Pull request: - feat(API): delete user group

ii. GET DELETABLE GROUPS

I created the end point to return the list of the groups that can be deleted to the calling client. Some groups at FOSSology are there by default and cannot be deleted. The delete-group page from the UI needed to know which groups to be listed down which should be the ones that are possible to be removed.

image

Pull request:- feat(API): list groups that can be deleted

iii. GET GROUP MEMBERS WITH THEIR ROLES

I created the REST-API to return the a list of all group members from a specific group with corresponding roles. This API is integrated on the UI to allow the Admin view all group members from any specific group from the UI.

image

Pull request: - feat(API): get group members with corresponding roles

iv. CHANGE GROUP MEMBER'S PERMISSION

I created the API for modifying the permission of any member from a particular group. for-instance we want to change a specific member from being an Advisor to an Admin. This API manages that work.

Pull request: - feat(API): change group member's permission

v. REMOVE MEMBER FROM GROUP

I created the API to remove a specific user from a particular group. Instead of changing the permission of the user from the group only , we may also need to remove him/her permanently, this functionality is implemented by the API.

image

Pull request: - feat(API): remove member from group

vi. ADD USER TO A GROUP

I created the API to add the user who is not a part of the group as a member. Once the User is removed from the group, this API makes it possible to add him/her back into the group again.

image

Pull request: - feat(API): feat(API): add user to a group.

2. MAINTENANCE

I created the API to initiate the running of the FOSSology maintenance operations. This is a POST based API which requires the list of options in the request body from the client whose operations are to be run on the backend side.

image

Pull request: - feat(API): REST-API to initiate FOSSology maintenance.

3. LICENSE

i. IMPORT LICENSE

I created the REST-API to import the uploaded csv-license file into the backend. The API also returns the appropriate message if the license file was already imported before to handle the occurence of duplicates.

image

Pull request: - feat(API): import csv-license file

ii. REMOVE ADMIN-LICENSE-CANDIDATE API

I created the API to remove any admin-candidate-license from the database. The API provides more authorization features by allowing only admin to delete a license.

image

Pull request: - feat(API): delete admin-license candidate

iii. GET ADMIN-LICENSE CANDIDATES API

I created the API to give alist of the admin license candidates.

image

Pull request: - feat(API): get admin-license candidates

Documentation:πŸ“„

During the GSoC period, I got the time to create and organize documentation for both the FOSSology UI and FOSSology REST-API. The documentation contains all the user and developer information of the project and is organized in a way to be easily accessible by all.

The weekly documentation of updates can be found at FOSSology/gsoc

πŸ‘¨πŸ»β€πŸ« DELIVERABLES

Tasks Planned Completed Remarks
Adding new pages and improved existing UI Yes βœ”οΈ The UI still needs more work both on the look and functionalities to enhance the user experience.
Adding almost all APIs on GROUPs module , Maintenance and License Yes βœ”οΈ More APIs will continously need to be added as the UI Migration progresses
Fixing some potential the existing bugs Yes βœ”οΈ There're still alot of issues to work on , escpecially on the side of FOSSology
Fixing Vulnerable FOSSology UI's dependencies NO (WAS OPTIONAL) ❌ Dependencies are continously added so this's approgressive task
Integrating OAuth 2.0 NO (WAS OPTIONAL) ❌ Got the overview still needs more lessons to learn how to integrate it in the existing projects

Future enhancements:πŸš€

  • Adding the skeleton loading on the UI components when the items are being fetched.
  • Adding search utilities on the select components from the UI.
  • Adding the pagination to the GET list APIs where appropriate and it's applicable.
  • Completing to add all the remaining pages on the License Administration Section.
  • Adding more REST-APIs from the backend.
  • Implementing Data caching on the UI to speed up the data display.

Major Takeaways: πŸ“š

  • The project has familiarized me to write clean code for the REST-API end points.
  • I was taught how to write smart urls for my end points.
  • I explored the best practices of writing Javascript codes specifically for React Js.
  • Left me with a tangible experience of working remotely.
  • Gained the confidence of working on large codebases and learned how to meintain consistency in the enormous community of contributors.
  • I learned the power of collaboration and working in a team.
  • Got cool experience on contributing to the opensource projects.
  • The last but not least i learned how to code like an expert , it was a great privilege to learn from the previous work of the talented engineers a broad.

Links of work done: 🎯

Pull Requests πŸ”—

Let's get connected!

About

A full report on my Google Summer of Code 2022 work with FOSSology

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published