Skip to content

Project management api

aolopezeafit edited this page Jul 28, 2023 · 5 revisions

Architectural drivers

The following is a description of the quality attributes with their respective order of priority and the reason why they were chosen. It should be clarified that the architectural drivers are selected to satisfy and promote compliance with the scope, business context, constraints and specifications of the system.

ArchitecturalDrivers

Technological Stack

Technological Stack

Technical architecture

The technical architecture is composed of:

Cloud Architecture

The entire VariaMos infrastructure is deployed in Azure, app service resources such as web server and azure data base for postgresql are used for information persistence.

Clean Architecture

Each component is built with clean architecture principles, incorporating the following structure:

Clean architecture

Continuous integration and deployment strategy

The integration and continuous deployment strategy is based on the github tool, action workflows are used to synchronize with dockerhub and Azure to immediately execute the deployment when committing to the master branch.

Data base model

The data model is composed of a table for the languages, a table for the external functions, a set of tables for the RBAC model management and a set of tables for the management of the user projects.

Data base model

Architecture extension points

External function

  • Database: VariaMos has a database that stores the structure of the languages that are incorporated by each member of the community, this structure has an autonomous interpretation from the frontend that allows extensibility in a fast and agile way.
    microservices
  • External functions: Each language has the ability to establish standard communications with any API, created in any language, as long as it is a REST type communication through http/s. You can create external functions here.

Functional features

Transactional workflow

The following is an illustration of the transactional flow of some of the VariaMos functionalities.

Definition of the project tree

In VariaMos the creation of several product lines is enabled, which in turn includes domain and application engineering, within each application engineering the creation of N applications is allowed and in turn, within each application N adaptations.

LPS

Authorization & Authentication

VariaMos uses the Google Auth service to authenticate and authorize users inside the platform, after Google authenticates a new user, this user gets registered into the VariaMos database and their user permissions are sent to the browser, these permissions are stored into the session storage for future use.

Once the application has all the permissions together with the user information, VariaMos can use it to validate which views certain users have access to.

image

Sign Up API

Verb POST
URL /signup/
Payload { email: 'email@email.com', name: 'John Smith' }
Response { user: { id: 1, name: 'John Smith' }, permissions: [ { id: 1, name: 'Settings' } ] }

Local Storage Management

Item Description Content
currentUserProfile This item contains all the user information gathered from the Google authentication {"googleId":"113994333450415707380","imageUrl":"https://lh3.googleusercontent.com/a/AEdFTp4GAuXNcCRAOZ_3vJN4MECdgxpgb0WSW4jr2PDg_A=s96-c","email":"john.smith@starmedia.com","name":"John Smith","givenName":"John","familyName":"Smith"}
userPermissions This item will store the user information together with the user permissions from the Database {“userId”: 3, “permission”: [{"id": 1,"name": "Create languages"},{"id": 2,"name": "Aprobe languages"},{"id": 3,"name": "Create product lines"}]}

Get projects URL: /getprojects/«userid» Verb: GET Authentication: Bearer Response: { "projects": [ { "id": 1, "name": "Project 1" }, { "id": 2, "name": "Project 2" }, ... } Exception response: Http response code 40x, body: {message:«message error»}

Load only if user is authenticated. Get user projects (own and shared).

Notes: Add name attribute in table project.

Get project Verb: GET URL: /getproject/«projectid» Authentication: Bearer Response: «project json» Exception response: Http response code 40x, body: {message:«message error»}

Load content only if the user is authenticated and the project is either owned by the user or shared with them.

Save project Verb: PUT URL: /saveproject/«projectid» Authentication: Bearer Payload: «project json» Response: 200 OK Exception response: Http response code 40x, body: {message:«message error»}

Save content only if the user is authenticated and the project is either owned by the user or shared with them with "Modify permission".

Notes: Add table permission_project and add foreing key in table user_project

Share project Verb: PUT URL: /shareproject/«projectid» Authentication: Bearer Payload: { "users": [ { "userId": «user id», "permissionIds": [«permission ids»] }, { "userId": «user id», "permissionIds": [«permission ids»] }, ... ] } Response: 200 OK Exception response: Http response code 40x, body: {message:«message error»}

Save content only if the user is authenticated and the project is either owned by the user or shared with them with "Modify permission".

Get users project Verb: GET URL: /usersproject/«projectid» Authentication: Bearer Response: { "users": [ { "userId": «user id», "permissionIds": [«permission ids»] }, ... ] } Exception response: Http response code 40x, body: {message:«message error»}

Load content only if the user is authenticated and the project is either owned by the user or shared with them.

Find user Verb: GET URL: /finduser/«user email» Authentication: Bearer Response: { "userId": «user id», "userName": «user name», "userEmail": «user email» } Exception response: Http response code 40x, body: {message:«message error»}

Load content only if the user is authenticated.

Get permission list Verb: GET URL: /permissionproject Authentication: Bearer Response: { [ { "permissionId": «permission id», "permissionName": «permission name» }, ... ] } Exception response: Http response code 40x, body: {message:«message error»}

Load content only if the user is authenticated.

Clone this wiki locally