Individual Contributions (Milestone 3) ‐ Arda Vural - bounswe/bounswe2024group11 GitHub Wiki
Arda Vural
Role
- Backend
Responsibilities
- Development of the backend
- Project Design
Main Contributions
- Implemented Script for Resetting Leaderboard in Periods
- Implemented Block Filter for Quizzes, Forum Questions, and Answers
- Created and Documented Testing Strategies
- Implemented Leaderboard Logic and Endpoint
- Created Demo Scenario for Final Milestone
API Contributions
- Implemented leaderboard enpoint for user to see where s/he is ranked and the leaderboard with scores of other users aswell. This endpoint also filters blocked users. This feature is also a crucial aspect of the gamification part of the project.
Here is a sample call to the endpoint from the terminal using curl
(Do not forget to change Bearer token in the headers part with an active JWT access token of yourself):
curl -X 'GET' \
'http://138.68.102.215:8000/api/v1/leaderboard/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzM1MzA1NjcwLCJpYXQiOjE3MzQ3MDA4NzAsImp0aSI6IjU1ZWY2NGNlMDc5NjRmM2JiODA3MThjMjQyN2IzNGJlIiwidXNlcl9pZCI6OX0.DW35oDk_PvIxziHnwjRG2vG2307Ds28Ceb4Belzn1fo'
An example response:
[
{
"score": 535,
"user_info": {
"id": 3,
"username": "uce",
"email": "[email protected]",
"full_name": "Ümit Can",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Alexander Hernandez",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 270,
"user_info": {
"id": 38,
"username": "brainac",
"email": "[email protected]",
"full_name": "Brain",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Christian Yang",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 180,
"user_info": {
"id": 6,
"username": "muhammet_41",
"email": "[email protected]",
"full_name": "Muhammet",
"avatar": "https://api.tinify.com/output/ejyq0c6btrq4ybj1hygpp4t45fjcr796",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 165,
"user_info": {
"id": 1,
"username": "ozan",
"email": "[email protected]",
"full_name": "Ozan Karakaya",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Christine Chase",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 160,
"user_info": {
"id": 36,
"username": "ali",
"email": "[email protected]",
"full_name": "Ali Yılmaz",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Jonathan Dunn",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 100,
"user_info": {
"id": 39,
"username": "seker",
"email": "[email protected]",
"full_name": "seker",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Lisa Johnson",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 75,
"user_info": {
"id": 37,
"username": "kaan",
"email": "[email protected]",
"full_name": "Kaan Uskudarli",
"avatar": "https://api.tinify.com/output/ew5f7cxzqad8csvafjm2ecphdcdkea5r",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 70,
"user_info": {
"id": 35,
"username": "hks_2000",
"email": "[email protected]",
"full_name": "Hasan Kerem",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Alexander Shaw",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 35,
"user_info": {
"id": 4,
"username": "the_seeker",
"email": "[email protected]",
"full_name": "Memin Seeker",
"avatar": "https://api.tinify.com/output/kdjs75evvbjayk2h54gesd1vhy1z1tw6",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 30,
"user_info": {
"id": 8,
"username": "ucvet",
"email": "[email protected]",
"full_name": "Pelin Üçvet",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Juan Watts",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 20,
"user_info": {
"id": 5,
"username": "imam",
"email": "[email protected]",
"full_name": "imam",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Lisa Sherman",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 15,
"user_info": {
"id": 13,
"username": "y_yilmaz",
"email": "[email protected]",
"full_name": "Yunus Yilmaz",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Patricia Skinner",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 34,
"username": "onurkilic",
"email": "[email protected]",
"full_name": "Onur Kılıç",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Dustin Garza",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 33,
"username": "melikeren",
"email": "[email protected]",
"full_name": "Melike Eren",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Danny Ryan",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 32,
"username": "keremuysal",
"email": "[email protected]",
"full_name": "Kerem Uysal",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Stephanie Washington",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 31,
"username": "gulsah",
"email": "[email protected]",
"full_name": "Gülşah Aksoy",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Zachary Gray",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 30,
"username": "buraktan",
"email": "[email protected]",
"full_name": "Burak Tanrıverdi",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Heather Espinoza",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 29,
"username": "hulyacetin",
"email": "[email protected]",
"full_name": "Hülya Çetin",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Karen Lynn",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 28,
"username": "mustafapolat",
"email": "[email protected]",
"full_name": "Mustafa Polat",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Omar Chavez",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 21,
"username": "hasanozkan",
"email": "[email protected]",
"full_name": "Hasan Özkan",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Katherine Young",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 27,
"username": "jtr",
"email": "[email protected]",
"full_name": "Jack Trader",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=John Lee",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 26,
"username": "haticegunes",
"email": "[email protected]",
"full_name": "Hatice Güneş",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Kyle Bennett",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 25,
"username": "emreaydin",
"email": "[email protected]",
"full_name": "Emre Aydın",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Erin Collier",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 24,
"username": "zeynepkaraca",
"email": "[email protected]",
"full_name": "Zeynep Karaca",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Katelyn Navarro",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 23,
"username": "ahmetdogan",
"email": "[email protected]",
"full_name": "Ahmet Doğan",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Sarah Gentry",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 22,
"username": "elifsahin",
"email": "[email protected]",
"full_name": "Elif Şahin",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Erin Boyer",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 20,
"username": "fatmacelik",
"email": "[email protected]",
"full_name": "Fatma Çelik",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Stacy Weiss",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 19,
"username": "mehmetyilmaz",
"email": "[email protected]",
"full_name": "Mehmet Yılmaz",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Kevin Wong",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 18,
"username": "aysedemir",
"email": "[email protected]",
"full_name": "Ayşe Demir",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Diane Bailey",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 17,
"username": "alikaya",
"email": "[email protected]",
"full_name": "Ali Kaya",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Amanda Bartlett",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 16,
"username": "orhan",
"email": "[email protected]",
"full_name": "Orhan Mutlu",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Mrs. Brenda Barnes",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 15,
"username": "aliso",
"email": "[email protected]",
"full_name": "Ali Solak",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Tara Bailey",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 14,
"username": "jesse_white",
"email": "[email protected]",
"full_name": "Jesse White",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Tanya Beasley",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 12,
"username": "elifdemir",
"email": "[email protected]",
"full_name": "Elif Demir",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Kimberly Nguyen",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 10,
"username": "ahmetkaya",
"email": "[email protected]",
"full_name": "Ahmet Kaya",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Susan Pratt",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 9,
"username": "aylin",
"email": "[email protected]",
"full_name": "Aylin Tuna",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Eric Lam",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 7,
"username": "mami",
"email": "[email protected]",
"full_name": "mami",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Ashley Hodge",
"is_followed": null,
"is_blocked": null
}
},
{
"score": 0,
"user_info": {
"id": 2,
"username": "imma",
"email": "[email protected]",
"full_name": "imma",
"avatar": "https://api.dicebear.com/9.x/avataaars/webp?accessories=eyepatch,kurt,prescription01&seed=Benjamin Smith",
"is_followed": null,
"is_blocked": null
}
}
]
-
I have updated Forum Questions get endpoint to filter in such a way to prevent the main user from seeing the questions of the blocked users. I am not going to give the example call for that api since it is already given in another individual contribution.
-
I have also updated Quizzes in similar way for users not to see the quizzes of the other blocked users. Again, I am not going to give the example call for that api for cleannes since it is already given in another individual contribution .
Code Related Significant Issues
Issue Title | Description | Issue and/or PR Link |
---|---|---|
Implement Script for Resetting Leaderboard in Periods | I researched possible ways of implementing the related script for resetting leaderboard scores periodically and implemented the part of backend which can be adjusted. | #797 , PR #812 (solved and created) |
Implement Block Filter For Quizzes, Forum Questions and Answer | I have implemented block filter for various endpoints to prevent the user see the quiz questions and forum qestions of the blocked user to ensure clean user interactions. | #809 (solved and created) , PR #817 |
Add New Sub-Features to Forum | Created a detailed plan for adding new sub-features to the forum and specified the tasks properly. | #733 (created) |
Sound Effects on Take Quiz | Reviewed implementation of sound effects for coreect and incorrect answers in quiz-taking which Umitcan has implemented successfully. | #791 (reviewed) |
Add Proficiency Feature for Users | Reviewed the addition of a proficiency feature for users to allow them to define their skill or expertise level, which is an important issue for our domain and purpose. | #795 (reviewed) |
Implement Leaderboard Logic and Endpoint | I have developed an endpoint with its serializer to retrieve leaderboards sorted by quiz scores. Ensured that users can access the leaderboards and restricted quiz score comparisons to users within the same proficiency level for accuracy and fairness. | #785 , PR #808 (solved) |
Management-Related Significant Issues
Issue Title | Description | Issue and/or PR Link |
---|---|---|
Create Demo Scenario For Final Milestone | Prepared demo scenario for the project's final milestone presentation | #734 (solved) |
Create and Document Testing Strategies | We have developed comprehensive testing strategies and documented them with Arayıcı to ensure comprehensive quality assurance. The strategies cover general testing approaches including mobile, web and backend. | #818 (solved and created) |
PRs
PR | Summary |
---|---|
#812 | Implemented a cron script with dedicated classes to reset leaderboard scores periodically, ensuring seamless weekly resets without affecting user data. (Solved) |
#817 | Developed and integrated filtering mechanisms to exclude blocked users from appearing in feed and quiz pages, enhancing user experience and moderation. (Solved) |
#808 | Added leaderboard functionality with a robust backend implementation, including the creation of a view and serializer to retrieve and display user rankings efficiently. (Solved) |
#805 | Reviewed the addition of proficiency levels to the user model and profile serializer. Provided feedback to ensure proper integration and functionality. (Reviewed) |
#725 | Contributed to Lab 8 functionality, focusing on test strategies, design and integrating key features to meet Milestone 3 objectives. (Contributed) |