akai-org / ClubHub-Backend

0 stars 0 forks source link

DB/Add Project #3

Open McSymilian opened 1 week ago

Seweryn-Was commented 1 week ago

so what should be considered for project data model? My sugestion is like given example:

{
name : "project name", 
beganAt : 12.06.2024, 
visible : true, 
joinfree : true, 
description : "quick description of project", 
owner : "2345678", //user uuid
participants : [ 
{ userUuid: "12345678", responsibilities : ["backend"]} ,
{ userUuid: "34455314", responsibilities: ["frontend"]}
], 
externalSources :  [
"discord.com/private_project_server", 
"github.com/user/project_github"
],
involvedScienceClubs : [
"club_name_1", 
"club_name_2"
],
technologies : [ "React", "Nodejs", "javascript" ], 
tags : ["programming", "web", "API",],
currentState: "active", 
}
  1. Is there anything else what could be included in project schema/model or someting shouldnt be there?
  2. Who should be able to start a project a user of app, member of club or its admin?
  3. Should i store in "owner" var and "participants" array users by their uuid or their usrname?
  4. Should request when creating new project be rejected when user with given username/uuid be rejected or just be skipped when adding to participants / owner?

@McSymilian

Seweryn-Was commented 3 days ago

if one API endpoint will be /project/getAllProjects should it have a posibility to provide some kind of filters or search function so user could write in request body:

{
    match : {
                 university : "PUT", 
                 joinFree : "true", 
                 involvedScienceClub : "AKAI", 
                 technology  : ["REACT" ],
       }  
}

and it would return all matching projects. Or for now lets just keep it simple and should return all projects in Database?