Tech Stack —>

Backend :- Typescript , Node.js

Frontend :- React +Typescript , Tailwind CSS , Chart-js for bar chart and doughnut chart ,

Database Primary :- Postgres (neon db cloud provider) along with Prisma as ORM.

Caching —> MongoDB (indexed on username)

MongoDB caches user’s problem set, AI responses for the next 15 days and after 15 days user Data from the caches vanishes . the 15 days period is chosen assuming it would take 15 days for user to solve all the problems in the problem set and It would take around 15 to 20 days in the improvement from the current reported level of the user.

Mathematics behind problem set generation —>

problem set generation is completely based on the user’s submissions history on Codeforces , his current rating , and the various tagged problems solved by the user over time and expert recommendation at the current rating level of the user.

Basic Idea ➖

The problem set is based on the idea that Tags have different importance for a perticular user based on what he have solved so far on the platform and also keeping in mind about his current rating level on Codeforces.

Calculation —>

For each tag on the Codeforces platform , first of all we calculate a tag relevance score . This score for each tag is very specific to the User . For a same tag , this relevance score is going to be different for two different users.

Mathematical formula behind this score —>

$$ W(t)=\frac{E(t)\times G(t)}{P(t)+0.01} $$

E(t) , Expectation Score →

This score tells us the expectation of a perticular Tag from the user . To understand this in mode detail lets take an example :- lets suppose the user is rated 800 and he is solving a problem which is of Dynamic programming . this perticular tag is not relevant to the user , user should practice fundamental tags like implementation etc first instead of DP. so this expectation score assigned score to each tag with respect to the user rating .

This score is based on the gaussian normal distribution curve and uses the exact same formula.