hack4impact-uiuc / 7000-languages

Helping Indigenous communities around the world teach, learn and sustain their languages
GNU General Public License v3.0
12 stars 2 forks source link

Admin Support #296

Open ashayp22 opened 1 year ago

ashayp22 commented 1 year ago

Goals

The final feature before the app can get released to the public. 7000 Languages needs a way to approve/reject course applications in order to ensure that not anybody can create a course. We can set-up a simple system that lets them review courses.

  1. When a person submits the Apply to Contribute form, we email 7000 Languages we information about the course along with an approve/rejection button. We can send the information and button in a HTML page.
  2. After clicking approve/reject, we hit an API endpoint that updates the approved field for the course.

Steps

  1. Build out the HTML page for the email sent to 7000 Languages. It can be coded with plan HTML and CSS.
  2. Use a template engine like Pug and Node fs to read in the template and format it with actual course info from the database.
  3. Use Nodemailer to send the email to 7000 Languages after the POST '/language/course' endpoint is hit.
  4. Create an endpoint that approves/rejects a course. The input for the endpoint should be the course_id and accept/reject, but course_id should be encrypted in some way so that not anyone can call this endpoint with any course_id should they get their hands on a course_id. Up to you to decide which encryption algorithm to use.

This is a tricky issue with multiple parts, so I recommend doing it one step at a time and merging individually parts.

Resources