Web API Design

Architecture


https://s3-us-west-2.amazonaws.com/secure.notion-static.com/256f081f-5816-4f62-bad2-e2b706e85528/Screen_Shot_2020-07-08_at_17.12.03.png

Models


https://s3-us-west-2.amazonaws.com/secure.notion-static.com/03c1a7ee-6789-4f74-98fd-8e61a1ea1b26/Screen_Shot_2020-07-08_at_14.05.11.png

Authentication & Authorization


Response and Request workflow.

Every endpoint requires an access token that is given to the user after the "sign in" process, if the token is not valid, has expired, does not exists, the request will return an error referring to the token.

Once the user has its token, it will be able to perform a ton of different actions such as retrieve its information, list its habits, etc.