notsoocool / codecache

CodeCache is a dynamic web application designed to streamline the way developers manage and access code snippets. The platform provides a comprehensive library of code snippets, allowing users to save, organize, and retrieve useful code snippets for various programming languages and use cases.
https://codecache.tech
MIT License
18 stars 54 forks source link

Implement User Profiles and Contribution Tracking #16

Closed notsoocool closed 1 month ago

notsoocool commented 2 months ago

Description: Create detailed user profile pages showcasing the user's contributions, such as submitted snippets, bookmarked snippets, and rated snippets.

priyanshuverma-dev commented 2 months ago

May I work on this issue @notsoocool

notsoocool commented 2 months ago

Hi @priyanshuverma-dev ,

Thanks for your interest in contributing! 🙌 You are welcome to work on this issue. Feel free to start by creating a branch and share updates or questions as you progress.

Looking forward to seeing your contributions! 🚀

priyanshuverma-dev commented 1 month ago

May I Integrate Prisma ORM also as using raw mongodb will increase complexity.

Should create a new issue related to this and assign me if you (please 😁).

I will solve that first then this issue. Let me know if it sounds good to you.

Thanks Priyanshu Verma

@notsoocool

notsoocool commented 1 month ago

@priyanshuverma-dev comment on the new issue and i will assign it to you

priyanshuverma-dev commented 1 month ago

@notsoocool I have pulled PR for prisma migration #29 . Approved and merge so that I can work on this issue

priyanshuverma-dev commented 1 month ago

@notsoocool Which branch should I clone for this Issue. I will use Prisma ??

notsoocool commented 1 month ago

@priyanshuverma-dev Please pull the develop branch only and continue working with MongoDB for now. I have kept your Prisma ORM integration under consideration, and if it aligns well with the project, I will merge it later. For the time being, let's proceed with MongoDB.

priyanshuverma-dev commented 1 month ago

@notsoocool Sounds good to me but it will conflict because use native mongodb that is not done in prisma. Let me work on this and update you.

notsoocool commented 1 month ago

@notsoocool Sounds good to me but it will conflict because use native mongodb that is not done in prisma. Let me work on this and update you.

no it wont conflict because i haven't merge you pr in develop branch, it is stored in diff branch Its just that now you have to work with Mongoose for a while, sorry for that

priyanshuverma-dev commented 1 month ago

@notsoocool How do we fetch user submitted snippets as we don't store submitted by in snippet model??

priyanshuverma-dev commented 1 month ago

And profile requires these fields

const user = {
  name: "Alice Johnson",
  username: "alice_j",
  avatar: "/placeholder.svg?height=100&width=100",
  bio: "Passionate coder and open-source contributor",
  joinDate: "January 2022",
  contributions: 127,
  rank: 5,
}

Current have only email. Profile Page can be only user centric mean logged user can see his own profile only.

Profile I have created till know

image

For mobile

image

notsoocool commented 1 month ago

Its looking great, so for contributions add points for adding snippets, for bookmarks, editing comments etc etc also you can fetch every thing including name, email, avatar using clerk auth.

notsoocool commented 1 month ago

@notsoocool How do we fetch user submitted snippets as we don't store submitted by in snippet model??

using snippetRequest Model, but you have to add field

notsoocool commented 1 month ago

Please check : review comment