SocialHackersClass10 / ChalleduApp

This repository contains the Code of the project, ChalleduApp, as a result of the collaboration between SHA-students of Class 10 & Challedu.com.
1 stars 5 forks source link

Technical architecture choices - backend #8

Closed zannis closed 4 years ago

zannis commented 4 years ago

Select our datastore Add its dependency on package.json Figure out the main entities Decide on the schemas that these entities are going to have

Check out https://docs.google.com/document/d/1GLzZhdC4OKpwZWtJiuhBEsYBMn6ZDMR2irrgVWtTZtI/edit#heading=h.dsjc9qdzdo47

for further info

student0b4dc0d3 commented 4 years ago

I see I should have added a comment here, instead I opened a new issue named "Thoughts on underlying data schema". Can a mod / admin please move this here? ty

zannis commented 4 years ago

Pasting @student0b4dc0d3 's comments here for visibility

Most projects are about collecting and manipulating Information.

Likewise, this project is data-driven, so I took the liberty to note a few thoughts about the underlying data schema.

Based on the initial draft, I discern following distinct data entities

"users" is a collection of information about people. Attributes of this entity may include : id, approval_pending, login_name, password, role, name, title, email, webpage phone, cell, physical_address, gender, birth_date affiliated_org (empty for private mentors), picture, description, etc...

"organizations" is a collection of info about organizations Attributes of this entity may include : id, approval_pending, title, info_email, phone, physical_address main_representative, contact_hours, webpage, picture, ( needs clarification ) documents, ( needs clarification, may produce additional entity ) etc...

"affinities" is a collection of information about areas of expertise an organizarion may strive for or "areas of activity" an organization includes

They are an entty, and not an enumeration, because
they are submitted together with the organization submission
so the org-rep should be provided the means to "create" them

Attributes of this entity may include : id, org_id approval_pending, title, description, webpage, etc...

As you can see, I have purposefully omitted any specifics of an underlying data management system/technology

Since the client has expressed a desire to further develop the project and has stated they "employ" their own dev(s), it should be reasonable to poll the client for any specific preference, which should be our guideline.

I would appreciate your thoughts and feedback. Thank you.

NickPapacostas commented 4 years ago

Assignees:

zannis commented 4 years ago

Good work @student0b4dc0d3! I am in favor of adopting your proposed structures for our entities with the following considerations:

With that said, let's continue the discussion to finalize our library choices based on the required functionality and close this ticket by adding the mongoose dependency as well as the necessary dependencies for uploading files.

Feel free to ask anything I might have not covered in this comment.

student0b4dc0d3 commented 4 years ago

I have some minor concerns about the affinities being an enumeration array, and would like to elaborate on it : suppose there comes a rep one day, trying to register while representing an NGO with the affinity "Black Lives Matter". Now, since we haven't predicted such an affinity beforehand, they would have to register without it, and then somehow request from the admins to kindly add that affinity and also edit his registration to include it? Imho, this is a very round-about and time-consuming method to solve this. My suggestion would be to have the 17 default affinities in the enum, but also offer a free-edit affinity field. It would not endanger invalid data (such as cursing etc.. ) since all registrations, before opening to the public, have to receive an approval from an admin. I am, as always, happy to converse about any additional thoughts on this or any other matter. T.y.

zannis commented 4 years ago

My suggestion would be to have the 17 default affinities in the enum, but also offer a free-edit affinity field. It would not endanger invalid data (such as cursing etc.. ) since all registrations, before opening to the public, have to receive an approval from an admin. I am, as always, happy to converse about any additional thoughts on this or any other matter. T.y.

Hey @student0b4dc0d3 first of all, thanks for stating your concerns and for the time you put into this. Indeed, looking at this project at a mid/long-term basis, your engineering approach is definitely correct. I would also like affinities to be an entity and to be able to add new ones dynamically etc. However, we have a really specific scope in terms of time and limited resources so that is why I am pushing towards the simplest approach possible. This is why for the time being, I would encourage we stick to the most dumb and straight-forward implementation and iterate over it if and when we are requested to do so. (I wouldn't like to overengineer a graduation project right now). I am sorry if it seems pushy and it might turn out that a more holistic and future-proof approach would be better, but with the current requirement plan we have no indication that it might happen during the timeframe of this project. I hope you understand.

student0b4dc0d3 commented 4 years ago

I see the point, and I agree with the simplification. I just needed to voice something that was growing on my mind since day 1 and I was trying to concentrate to put my finger on, until I did. Thanks for the clarification and consideration