-
Notifications
You must be signed in to change notification settings - Fork 36
Badge System-Feature #426
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
Comments
@janareddyc7 these are great ideas! We have thought about implementing this here: #260 Is this something you'd like to see in the near future? I can start developing this very soon if that's the case? I would need to scope out schema changes, different levels etc so I am happy to have some conversations with you on what you feel would be the best way to do this 😄 |
i wanted to add it in the schema then create a model badge and then pass it out and then creating a seed.js for it and then creating a api endpoint followed by frontend logic |
do you want to add schema changes |
@janareddyc7 that's a good shout - maybe we could use server actions over API endpoints? also that schema looks great - maybe we could change it slightly to match the current style guide:
I suppose we should also be adding relations to the user? this way if we ever need to filter the leaderboard page by badge in the future it would be really simple? 🤔 |
yeah sure thing, let me change those and I will let you know once they've been done! |
sure |
model Achievement { user User @relation(fields: [userId], references: [id]) const badges = [ |
what do you think of this?
|
umm LEADERBOARD_POSITION could be tied to specific times or dynamic data. probably enum BadgeType { model Badge { name String requirements Json // store as json achievements Achievement[] model Achievement { badgeUid String userUid String unlockedAt DateTime model Users { achievements Achievement[] // User's earned achievements |
that looks perfect @janareddyc7 . Let me get that in, run a migration on it and get it merged! |
sure |
pr here for the schema #427 |
ok |
logic in application backend to track users' progress towards badges and unlock them next right |
if i can can i add more badge types to the schema a lot more for users to exprience |
@janareddyc7 yeah that's right - we will have to ensure when a user answers a question we update their achievement appropriately |
yep go for it! I was thinking it would also be great to have a 'misc' badge type - we can have badges such as 'open-source contributing' and more along those lines |
sure im in a class right now i will get the code to later |
@janareddyc7 not a problem! No rush, if you can't pick it up for any reason, just let me know and I can finish it off 😄 |
Spent some time herer `enum BadgeCategory { enum BadgeSubType { enum CompletionStatus { model Badge { model Achievement { |
let me know about it |
@janareddyc7 I love all of these. You've thought of some really good ones there. I like it! 🙌 |
I see there is a lot there (which is not a bad thing), I reckon we start off by adding these enums, but only implementing the logic for some? Otherwise we'll be here for weeks! What do you think of some of the first ones we could add in, @janareddyc7 ? |
we could do open source misc and the question types like 10 questions abadge and the speed contribution and first time login ive acually added a bit uncessary given the feature is not avalable like teams i think we can go ahead with those ive mentioned |
Yeah, i'm happy with that, i'll just sum them up below:
🚀 |
enum BadgeCategory { enum BadgeSubType { // STREAK // MILESTONE // ENGAGEMENT // CONTRIBUTION // EXPERTISE } model Badge { model Achievement { enum CompletionStatus { |
try to adjust to your needs |
@janareddyc7 love it, definitely feels like the right amount of badge for this to initially go in 🙌 |
sure |
what about the images of the badges |
@janareddyc7 yeah good thought - maybe we can not add them in for MVP and add them later on? feels like some icons will need to be designed which could take a while |
ok |
Answer 50 Questions Badge: A badge that users receive after answering 50 questions, showcasing their commitment and engagement. You can create different badges for different milestones (e.g., 100, 500, 1000 questions answered).
Streak Badges: Users earn badges for consistent activity, such as answering questions for 7 days straight, completing challenges daily for a week, etc.
Speciality Badges: Based on the type of questions answered, such as “Algorithms Pro,” “Frontend Specialist,” or “Python Enthusiast.” These would be unlocked by answering a certain number of questions in a specific category.
Challenge Completion Badges: For completing specific coding challenges, users could earn badges that recognize their success, e.g., “Algorithm Master” or “Full Stack Guru” for completing a particular challenge type.
Bronze, Silver, Gold Tiers: Reward users with tier-based achievements. For example:
Bronze: Answer 50 questions, complete 5 challenges.
Silver: Answer 200 questions, achieve a 10-day streak.
Gold: Answer 500 questions, win a monthly competition, or complete 50 challenges.
I can implement this
The text was updated successfully, but these errors were encountered: