mshumayl / ai-daleel

AI Daleel source code.

Home Page:https://ai-daleel.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Premium feature - Save Quran snippets

mshumayl opened this issue · comments

  • Create a new database table to store saved verses (Save in rendered text form to reduce API calls)
  • Create tRPC procedure to store verse into table
  • Add button to save verses
  • Create a page to view single verse
  • Create a page to view all saved verses
  • Add button to remove verses

SUPER CRUCIAL SECURITY FEATURE

When querying for a user's saved features, the tRPC endpoint will make a call based on the user passed to the client.

In the tRPC logic, implement a check that the current user is the same as the queried user. If it passes, then make the query. If it does not pass, raise an error.

Better yet, do not get any query parameters from the client. Just get the current logged in user at server-side and make the call using this value.