splitting the front and the back ends - flow
-
need to implement auth token via API (i have personally only used this one django-rest-knox
this will allow us to keep track of which user sends which request, the token will have a life span, default to 24ish hours each request will only be treated if the token is authentic
-
would be great to add something like drf-yasg-demo https://github.com/axnsan12/drf-yasg/ auto-documentation for the API, with specifications on usage, this tool makes life so much easier and helps to debug a ton.
-
The relationship between the frontend and the backend the way I feel we should do it( there are other options) is by limiting the requests the front sends to the back, as much as we can one way to do it is by getting most of the data in the initial request (ranking, and all the stuff that changes less often)
I think we should decide in advanced, what endpoints the frontend will have for post requests (update, delete, create) and cut corners where we can with how often those happen another thing to consider is either adding an "update" button for the slow-changing data ( ranking etc ) or a hook that will update it every X time, both options are viable
I will add more information to this document in the near future