Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flexible Schema Endpoints #104

Open
5 tasks
Leundai opened this issue Jul 5, 2021 · 0 comments
Open
5 tasks

Flexible Schema Endpoints #104

Leundai opened this issue Jul 5, 2021 · 0 comments
Assignees

Comments

@Leundai
Copy link
Member

Leundai commented Jul 5, 2021

Description

Create endpoints that will support flexible schemas for non-required fields and toggle their visibility (e.g. director can add a field called “areDuesPaid” which is or isn’t visible to members of their chapter)

Things to consider:

  • This is not only limited to the member schema, to ensure the highest code quality we want it to be versatile to other schemas that might exist like chapters and projects
  • Due to the optional nature of new fields we won't have issues if fields don't exist in all documents
  • Frontend needs to know the new fields so that they can be displayed
  • All-new optional fields must contain a viewable field within (view permissions)
  • Even though this is backend only while developing think of the frontend implementation too. This might save you from unnecessary endpoints or headaches

Learning objectives

  • MongoDB usage and its features

Todo

These points are a rough guideline. Please feel free to discuss with others on the team about the best way to design this component!

  • Brainstorm methods of storing new optional fields made by admins (maybe a new schema?)
  • Brainstorm endpoints that will be useful for the frontend to know
  • Look over ../models/members.js and linked related question
  • Implement endpoints in ../src/api/ folder
  • Test using Postman

Useful links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants