akshitagupta15june / PetMe-Prod

PetMe-Prod is an all-in-one platform that allows animals to be adopted, donated to pet lovers, and provides emergency medical care to stray animals in need.
https://pet-me-prod-pet-me-frontend.vercel.app/
MIT License
13 stars 37 forks source link

[FEAT] Pet News Section backend support #46

Open cb7chaitanya opened 3 weeks ago

cb7chaitanya commented 3 weeks ago

Complete set of issues:-

  1. Create a role based system for allowing users to have a reporter role, which a user can apply for.
  2. An email should be sent to the mentors' or the project admin's email inbox for approving or declining the said user application with all the application details in a google doc like format or something better, I am open to ideas.
  3. A user if his/her application is accepted, should be given the perms for publishing news.

How to approach the issue:-

Will be a multiple person job, so not assigning it till I form a team around this functionality, so first come up with your ideas surrounding this, willing to hear ideas around this

BhattAnsh commented 3 weeks ago

Assign me this issue

kom-senapati commented 3 weeks ago

Idea...:

  1. A form for an user to become a reporter
  2. Notification goes to admin dashboard
  3. Admin can accept/reject
ShikharSinghKushwaha commented 3 weeks ago

Ideas to accomplish this feature --

1: Have to make another page with the link of Become a Reporter or something similar and shorter 2: There will be Form which will be in overlay effect , to become a Reporter , fields will Full Name, Email, and and a textarea to get that person accomplishment or passion for reporting and initially the field of accepted_as_reporter will be false. 3: After the user fills the form an Unique id ( uuid ) will get generated. 4: After the successful submission , an Email will be sent to the Admin's inbox which will include the Reporter's name , email and the message why he want to become a reporter. 5: The next steps is for Admin, he or she has to come back to this page where all the User who has registered himself for reporter will be displayed along with one Text input ,and in this text input Admin has to paste that UUID which is generated by that person to make him accepted as a Reporter. 6: Next steps will be like to update the user data in database making the field :Accepted_as_reporter as true, then the another email will be sent to that reporter informing that he or she got accepted as a reporter .

This is the wireframe for making this feature maybe it's little bit lengthy but most accurate (according to me) .

Will like to hear from you about this idea to make it @cb7chaitanya

cb7chaitanya commented 3 weeks ago

@ShikharSinghKushwaha you have got the wireframe spot on, we will just be replacing one thing, you don't have to send an email now you just have to send this reporter application to the admin dashboard, once the admin dashboard recieves the application, the admin can accept or reject the application for the user to become a reporter, if marked true reporter role will be alloted to the user in the database as @kom-senapati has mentioned and we have discussed in the discord server

@kom-senapati @ShikharSinghKushwaha @BhattAnsh For now as the admin dashboard application hasn't been initiated, you can create the basic crud API's for this route, also one of you can create the necessary schema changes so that others can start working on their set of API endpoints, you also have to probably create a middleware for protecting your post and put routes from users who are not reporters.

You guys can create another endpoint for sending the application for reporter to the admin dashboard app, when we start with the Next js app that is the admin dashboard, which would be your other point of communication, but that is for later

kom-senapati commented 3 weeks ago

Yeah lets discuss it in discord before we start working on it!

ShikharSinghKushwaha commented 3 weeks ago

okay lets start working on it