App Architecture
As Urban Fits is built on the Next JS, It uses Serverless Backend Architecture often referred as Lambda Functions.
Overall it uses an MVC Architecture as a whole app.
Since It's each API is a "Function as a Service", they're stateless and only use the server bandwidth during it's
execution time and server is not always active; resulting in preventing unecessary server bandwidth usage. The server will totally close after a certain period of inactivity and then it'll need a Cold Start when hit by an API call.
Since Next JS has advanced features like SSR (Server Side Rendering), CSR (Client Side Rendering) Urban Fits mostly uses CSR.
Reasons for using CSR
Why use CSR when SSR can result in faster initial loads? Well here are a few reasons to use CSR:
- Client Side Rendering prevents the further usage of Server bandwidth as SSR will render every page on server so that client don't have to parse it in the browser hence using Server bandwidth equivalant to all users combined.
- Since most of our content is likely to be static and not very complex, it makes it easy for client to render it fast.
- Our targeted audiance is likely to be those who do online shopping and have mid to high end devices.