This article is a case study in systems design. The premise of the project is fictitious, but the concepts demonstrate how you might design a system like Robinhood or Fidelity.
This particular case study is presented from a Full Stack perspective and dives into details of both the back end and front end.
Product Requirements
Background
- We need to design a mobile-friendly trading app that allows a user to buy and sell an asset.
- We are making use of an exchange API, so the technical complexities of creating and executing an order book are not covered in this design.
User Stories
- As a user, I want to be able to log into a demo account to access the MVP.
- As a user, I want to be able to view a list of the top stocks by market cap.
- As a user, I want to be able to see a list of the assets I own.
- As a user, I want to be able to select an asset and view the real-time price.
- As a user, I want to be able to place a limit or market order to buy the asset.
- As a user, I want to be able to place a limit or market order to sell the asset (if I already own it, short-selling is not supported yet).
Non-Functional Requirements
- All major modern browsers should be supported, except for internet explorer.
- The first release will be an MVP, so we do not need to worry too much about scalability yet, although we should make sure that we can support the scale in the future.
- Our target audience is located in the US in one region.
- We do not need to support internationalization or worry too much about global availability for the MVP.
- We should balance designing for the scale that we intend to reach in the future with the MVP timeline.
- We will make use of an existing Auth as-a-service provider for the MVP, such as Auth0 or Firebase.
- The MVP should be installable on a mobile phone.
- Acceptable to install through a bookmark flow, but in the future the app should be in the app store.
- The design should be mobile-first and will not be used on a desktop during the MVP. Responsive design should be used to support desktop use in the future.
- Latency is important, we do not want a user to be surprised by sudden price swings and should make our best effort to secure the lowest price.
- Prices should be updated in real-time so that a user can make a decision based on confidence in the current market price.
User Interaction Considerations