ContriHUB / CP-Grind

0 stars 6 forks source link

Add Codeforces and Atcoder Profiles #10

Open sharmavasant opened 11 months ago

sharmavasant commented 11 months ago

@dhanrajchaurasia

Description

Added Codeforces and Atcoder profiles and stored profile data in postgresql database.

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. Made profile page and added codeforces and atcoder profiles. Stored data without redundancy in database. Downloaded Emoji dependency for profile page.

Related Issue

Fixes # issue

Type of change

Motivation and Context

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Profiles can be seen by entering codeforces handle or atcoder handle and respective email associated with the account. These data will be stored in database.

Screenshots (if appropriate):

https://github.com/ContriHUB/CP-Grind/assets/97390538/8eac46cf-c537-47e6-b63c-61ea0194de62

Checklist:

Test Configuration:

dhanrajchaurasia commented 11 months ago

Don't use api everytime once user enters the handle fetch that time and reuse that data everytime to show at profile (also allow user to rechange the handle and fetch that time)

Current Profile isn't good, it's a medium level issue show some creativity. (Refer Codeforces official Profile or other OJ profiles)

Also Profile should be same and is divided by OJs (Cf and Atcoder) maybe u can display them in a single page maybe vertically division would help!

sharmavasant commented 11 months ago

Don't use api everytime once user enters the handle fetch that time and reuse that data everytime to show at profile (also allow user to rechange the handle and fetch that time)

Current Profile isn't good, it's a medium level issue show some creativity. (Refer Codeforces official Profile or other OJ profiles)

Also Profile should be same and is divided by OJs (Cf and Atcoder) maybe u can display them in a single page maybe vertically division would help!

sir im not able to retrieve data from database it is giving some errors.

dhanrajchaurasia commented 11 months ago

Don't use api everytime once user enters the handle fetch that time and reuse that data everytime to show at profile (also allow user to rechange the handle and fetch that time) Current Profile isn't good, it's a medium level issue show some creativity. (Refer Codeforces official Profile or other OJ profiles) Also Profile should be same and is divided by OJs (Cf and Atcoder) maybe u can display them in a single page maybe vertically division would help!

sir im not able to retrieve data from database it is giving some errors.

can you describe the errors? (or share some screenshots)

sharmavasant commented 11 months ago

Don't use api everytime once user enters the handle fetch that time and reuse that data everytime to show at profile (also allow user to rechange the handle and fetch that time) Current Profile isn't good, it's a medium level issue show some creativity. (Refer Codeforces official Profile or other OJ profiles) Also Profile should be same and is divided by OJs (Cf and Atcoder) maybe u can display them in a single page maybe vertically division would help!

sir im not able to retrieve data from database it is giving some errors.

can you describe the errors? (or share some screenshots)

Screenshot (9)

dhanrajchaurasia commented 11 months ago

Don't use api everytime once user enters the handle fetch that time and reuse that data everytime to show at profile (also allow user to rechange the handle and fetch that time) Current Profile isn't good, it's a medium level issue show some creativity. (Refer Codeforces official Profile or other OJ profiles) Also Profile should be same and is divided by OJs (Cf and Atcoder) maybe u can display them in a single page maybe vertically division would help!

sir im not able to retrieve data from database it is giving some errors.

can you describe the errors? (or share some screenshots)

Screenshot (9)

don't fetch the data from cookie (that is actually a temp storage for the current session) instead fetch it from the db (postgresql)

sharmavasant commented 11 months ago

Don't use api everytime once user enters the handle fetch that time and reuse that data everytime to show at profile (also allow user to rechange the handle and fetch that time) Current Profile isn't good, it's a medium level issue show some creativity. (Refer Codeforces official Profile or other OJ profiles) Also Profile should be same and is divided by OJs (Cf and Atcoder) maybe u can display them in a single page maybe vertically division would help!

sir im not able to retrieve data from database it is giving some errors.

can you describe the errors? (or share some screenshots)

Screenshot (9)

don't fetch the data from cookie (that is actually a temp storage for the current session) instead fetch it from the db (postgresql)

ok

sharmavasant commented 11 months ago

Don't use api everytime once user enters the handle fetch that time and reuse that data everytime to show at profile (also allow user to rechange the handle and fetch that time) Current Profile isn't good, it's a medium level issue show some creativity. (Refer Codeforces official Profile or other OJ profiles) Also Profile should be same and is divided by OJs (Cf and Atcoder) maybe u can display them in a single page maybe vertically division would help!

sir im not able to retrieve data from database it is giving some errors.

can you describe the errors? (or share some screenshots)

Screenshot (9)

don't fetch the data from cookie (that is actually a temp storage for the current session) instead fetch it from the db (postgresql)

@dhanrajchaurasia sir

I have made functionality to retrieve data from database if it exists otherwise fetch from api and store in database but unable to enhance frontend of profile page

dhanrajchaurasia commented 11 months ago

Don't use api everytime once user enters the handle fetch that time and reuse that data everytime to show at profile (also allow user to rechange the handle and fetch that time) Current Profile isn't good, it's a medium level issue show some creativity. (Refer Codeforces official Profile or other OJ profiles) Also Profile should be same and is divided by OJs (Cf and Atcoder) maybe u can display them in a single page maybe vertically division would help!

sir im not able to retrieve data from database it is giving some errors.

can you describe the errors? (or share some screenshots)

Screenshot (9)

don't fetch the data from cookie (that is actually a temp storage for the current session) instead fetch it from the db (postgresql)

@dhanrajchaurasia sir

I have made functionality to retrieve data from database if it exists otherwise fetch from api and store in database but unable to enhance frontend of profile page

okay will check!

sharmavasant commented 11 months ago

Don't use api everytime once user enters the handle fetch that time and reuse that data everytime to show at profile (also allow user to rechange the handle and fetch that time) Current Profile isn't good, it's a medium level issue show some creativity. (Refer Codeforces official Profile or other OJ profiles) Also Profile should be same and is divided by OJs (Cf and Atcoder) maybe u can display them in a single page maybe vertically division would help!

sir im not able to retrieve data from database it is giving some errors.

can you describe the errors? (or share some screenshots)

Screenshot (9)

don't fetch the data from cookie (that is actually a temp storage for the current session) instead fetch it from the db (postgresql)

@dhanrajchaurasia sir I have made functionality to retrieve data from database if it exists otherwise fetch from api and store in database but unable to enhance frontend of profile page

okay will check!

@dhanrajchaurasia sir you need to download emoji dependency go get github.com/enescakir/emoji

dhanrajchaurasia commented 11 months ago

@sharmavasant I have tried running it locally but data is fetching on inputting right? it shouldn't have been like that as I said earlier you should show the old stored profile until he changes the handle, haven't you done anything about that? also why I am seeing two input tags for each platform? and the details are not even in the ordered format.

Maybe something like below! image

sharmavasant commented 11 months ago

@sharmavasant I have tried running it locally but data is fetching on inputting right? it shouldn't have been like that as I said earlier you should show the old stored profile until he changes the handle, haven't you done anything about that? also why I am seeing two input tags for each platform? and the details are not even in the ordered format.

Maybe something like below! image

@dhanrajchaurasia -> It is fetching data if profile is not stored in database but if it is stored then it is showing from database not from api. -> Two input tags just to reduce redundancy as a user can have multiple handles but single email.

this is screenshot where it decides whether to choose data from database or api Screenshot (10)