System requirements


Functional:

  1. Server
  2. Database



Non-Functional:

  1. Cache





API design

  1. First api is a post req where we will take the url and change to shorted url in backend where we have a hashkey link to url in database
  2. We will extract the hash from url and return the url present in database matching that hash





High-level design

You should identify enough components that are needed to solve the actual problem from end to end. Also remember to draw a block diagram using the diagramming tool to augment your design...






Detailed component design

Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...






Database design

Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...