Understanding the frontend system design patterns is crucial to taking care of the most commonly asked system design questions or any new questions based on the same pattern. Here are the details of frontend system design questions & patterns
❇️ Quickly revise the Frontend System Design Flow - Frontend System Design Interview Cheat Sheet
21 Frontend System Design Interview Questions & Patterns
Here are the patterns, their associated questions and important resources
Table of content
- Infinite-scroll
- Autocomplete or Type ahead widget
- Data Table / Data Grid
- Image/data Carousel
- Tree View Component
- Document Collaboration
- Image Sharing / Photo management
- Video Streaming Application
- Audio Streaming Application
- Video Conferencing/Meetings
- Kanban Board / Sprint Board
- File System Application
- Collaborative Design Tools
- Chat Application
- Seat Reservation Application
- Ride-hailing Application
- Hotel Reservation Application
- Food Delivery Application
- Game Application User Interface(UI)
- Calendar Application
- WYSIWYG Editor Application
1. Infinite Scroll
Frontend system design for Infinite scroll component or Infinite news feed application feature
Application examples
- Facebook News Feed
- LinkedIn News Feed
- Instagram Image feed
Questions with commonly asked features
- Design a Facebook/LinkedIn/Instagram news feed feature, assuming data for the feed is available as part of the endpoint and dynamically add new feeds into the data.
- Users can scroll the feeds, and take action on the feeds as well, Like comments etc.
Main concepts to focus
- Handling a large data set using the Virtualization technique.
- Data modal to store the dynamic data
- Store a big chunk of data in the store vs dynamically appending data into the store by async data fetching.
- Preferable Data Fetching protocol, REST vs GraphQL (Facebook is using GraphQL for Facebook News Feed implementation)
- How to determine the number of records fetched from the server
Resources
- Videos - Resources for Infinite Scroll System Design
- Web vitals patterns - infinite scroll
- Infinite Scroll without layout shift
2. Auto Complete or Type Ahead Widget
Frontend system design for auto-complete search box or Type ahead widget
Application examples
- Google search box
- E-commerce product search box
Questions with commonly asked features
- Designing an autocomplete search box or a type-ahead widget similar to a product search box at e-commerce websites
- Including both local and remote data (using fetch API) support
- Template support - The user can provide a complex template to show the search results
- Loading, Error handling, and retry support
- Accessibility support - keyboard support, aria-roles
- Style and other configurations, Ex number of elements to show in the search
- Fuzzy search - correct suggestions for misspelt words.
Main concepts to focus
- De-bouncing support in the search to optimize network calls.
- Fetch API calls and error handling
- Configurable component design
Resources
- Resources for Auto Complete System Design
3. Data Table / Data Grid
Frontend system design for data table or data grid with long list support (searching, filtering and pagination)
Application examples
- Data Grid similar to E-commerce product listing
- Data table for showing user's information
Questions with commonly asked features
- Design a data grid component to show the list of products with below capabilities
- Data can be static or remotely fetched using API calls.
- Adaptive to the user's device size
- Able to show more content when reaching the end of the page or a defined number of products, behaves like an infinite scroll
- Configurable to show different data types in the data table like date, or custom component
- Reflect on the data in real time to see if there is any change in the inventory or price.
- Handle loading and error conditions.
Main concepts to focus
- Understanding of Intersection Observer to implement infinite scroll or load more scroll future for Data Grid.
- Media queries to implement responsive grid behaviour for Data Grid.
- Configurable to different data type support and implementation of custom sorting, and filtering support as per data type in Data Table.
Resources
- Resources for Data Grid System Design
4. Image/Data Carousel
Frontend system design for Image or data carousel
Application example
- e-commerce product carousel
- Website product listing
- Feedback/Testimonial carousels
Questions with commonly asked features
- Design an Image Carousel to show multiple local or remote images in a marquee fashion
- Images/data from the local system or fetch from API endpoint.
- Configuration support is available for an automated marquee at a certain interval or a user who can manually click to explore.
- Loading and error handling cases.
- Ability to support any fixed number of images and text gracefully.
- Perceived performance using progressive image rendering.
Main concepts to focus
- Fetching data from API only when there is any action happening.
- Implementation of progressive images.
- How to hide and show images based on the actions.
Resources
- Resources for Image Carousel System Design
5. Tree View
Frontend system for tree view component and this design question can be extended to Checkbox tree view selection type of variations as well.
Application examples
- Product side navigation at E-commerce websites
- Confluence Side file/folder navigation
Questions with commonly asked features
- Design a tree view feature to show parent and child file folders, other functional and Non-functional requirements
- Implementation of expandable and collapsible functionality.
- Tree view should be able to handle any depth of file/folders
- Only folders with at least a child can be expandable
- Able to show Large amounts of files and folders for example 10k files/folders
- Data can be static or available as part of API calls in JSON format.
- Customisation of icons and limit to show scrolling behaviour.
- Accessibility support - keyboard support, aria labels for the tree, expand and collapse functionality.
- Loading and error handling.
Main concepts to focus
- Recursive implementation of tree based on JSON input.
- Virtualization support to showcase a large number of elements as part of the tree view
Resources
- Resources for Tree View System Design
6. Document Collaboration
Document collaboration applications with collaborative editing support
Application example
- Google doc
- Confluence document
- Google Sheet
Questions with commonly asked features
- Design a document editor application, with the support of collaborative editing. For example, more than 1 user can access and make updates to the document. All the users can view the real-time changes in the document done by the other users
- Document updates can include add, edit and delete operations on the document.
- Add formatting to the text - basic formatting - bold, underline, italic
- Real-time changes should reflect on the other documents, keeping the overall document the same for all the users at a given moment in time.
- The application should be performant and can support large documents.
- Offline support - keeps the document in the browser cache, if the system is offline, and push to the server when becomes online.
Main concepts to focus
- Concurrent Editing Approaches
- Locking - Not user-friendly and requires more time for edits (this won't work for real-time updates)
- Operational Transformation - An Event-based syncing, where all types of events (adding, deleting, formatting) will be shared by other users (Word by word)
- Differential synchronization - In simple terms, Diff sharing, the difference in the document is shared across the users and as per the diff the document patch will be applied
- Use contentEditable & custom event listeners on the root element to create a document editor.
- JavaScript's Service workers for offline support.
Resources
- Resources for Document Collaboration System Design
7. Image Sharing / Photo Management
Image sharing and hosting services
Application example
- Instagram
- Imgur
- Flickr
Questions with commonly asked features
- Design an image-sharing application which can have one more features
- Upload an image or video to the application
- Many images/videos can be uploaded and shared with loading progress support.
- Performance while loading the multiple images - perceived performance using progressive images
- Infinite scrolling to view the image uploaded by uses
Main concepts to focus
- API to upload the image and video files - using a multipart request
- Infinite scroll using virtualization technique
- Progressive image for perceived performance
Resources
- Resources for Image-Sharing System Design
- Image upload in javaScript
8. Video Streaming
Frontend system design for Video streaming services
Application example
- Youtube
- Vimeo
Questions with commonly asked features
- Design a video streaming application to play video from a remote server
- Minimize buffer or no buffer while playing the video.
- Adapt video quality as per the high and low bandwidth.
- Peek video Support - jump to any section of the video and it starts playing from that point.
- Multi-lingual Support for the video
Main concepts to focus
- Understanding of Video HTML5 Elements.
- Understanding HTTP Range requests to fetch specific time chunks of video from the server.
- Media Source Extensions (MSE) - A JavaScript API that lets you build streams for playback from segments of video
- Video Delivery mechanisms
- Streaming protocols
Resources
- Resources for Video Streaming System Design
- HTML5 Video elements
- HTTP Range request
- Progressive download vs Streaming
- DASH Streaming for HTML5 video
9. Audio Streaming
Audio streaming application frontend interactions
Application example
- Spotify
- SoundCloud
Questions with commonly asked features
- Design an audio streaming application to play audio from a remote server
- Minimize the initial buffer or no buffer while playing the audio.
- Peek audio Support - jump to any section of the song/audio and it starts playing from that point.
- Multi-lingual Support for the audio
- Support for a change in Streaming Speed like 1.25x, 1x, 2x
Main concepts to focus
- Understanding of Audio HTML5 Elements.
- Understanding HTTP Range requests to fetch specific time chunks of audio from the server.
- Media Source Extensions (MSE) - A JavaScript API that lets you build streams for playback from segments of audio or video
- Audio Delivery mechanisms
- Streaming protocols
Resources
- Resources for Audio Streaming System Design
- HTML5 audio element
10. Video Conferencing
Frontend System design for Video conferencing service
Application example
- Google Meet
- Zoom
Questions with commonly asked features
- Design a video conferencing application, where 2 or more users can interact with each other including audio/video
- large number of users can participate in the communication
- Real-time audio/video support
Main concepts to focus
- WebRTC (web real-time communication) protocol is used for this kind of peer-to-peer communication.
- Difference between TCP/UDP protocols supported by webRTC
- Websockets connections for real-time sharing
Resources
- Resources for Video Conferencing System Design
- WebRTC JavaScript API
11. Kanban Board / Sprint Board
Frontend System design for Jira Sprint board or kanban board
Application example
- Jira Sprint board
- Trello Kanban board
Questions with commonly asked features
- Design a Kanban board to manage the tasks assigned with different statuses
- Create a task with metadata and the required status
- Configurable number of lanes based on the Status types
- Tasks can be moved from one lane to another lane, with some restrictions if applicable
- A large number of tasks can be rendered in a single lane with performance
- Accessibility support - keyboard navigation
- Role-based access to the Kanban board.
- Drag and drop the tasks from one lane to another (optional requirement)
- Offline support - tasks can be updated offline and reflected once the system is online
Main concepts to focus
- Store large amounts of data in the optimized format, and use Normalization to easily access the details.
- Service workers to enable offline support
- Data representation of several tasks in the API response
Resources
- Resources for Kanban Board System Design
12. File System Application
Frontend system design for file system applications
Application example
- Google Drive
- Dropbox
Questions with commonly asked features
- Design a file system application to store the files on the cloud for anywhere anytime access
- Upload a file and folders and delete the resources.
- Enable support for viewing files in different formats like images, PDFs, Word documents, or PowerPoints.
- Show the progress of the uploads and downloads.
- Efficiently handle rendering a larger amount of files/folders using the virtualization technique.
- Permission-based access to files and folders. Files and folders can be shared with other users as well.
Main concepts to focus
- Upload a single file or a folder containing multiple files using a recursive approach
- Virtualization techniques are used to render a large number of files and folders.
- Techniques to view different files like PDFs, PPTs
Resources
- Resources for File System UI System Design
13. Collaborative Design Tools
Frontend system for collaborative design tools
Application example
- Figma
- Whiteboard
Questions with commonly asked features
- Design a collaborative design system, that can be used by one or more than one users simultaneously.
- Support for free-flow drawing, text or predefined shapes like rectangles or square
- DOM element-based approach vs canvas-based approach for collaborative design.
- Real-time communication using web sockets
Main concepts to focus
- How to use Canvas? and how to Draw different shapes, free free-flowing drawings on canvas using JavaScript.
- Real-time WebSocket communication, pros and cons
Resources
- Resources for Collaborative Design Tools System Design
- HTML5 Canvas
- WebSocket communication
14. Chat Applications
Frontend design for chat applications
Application example
- WhatsApp
- Telegram
Questions with commonly asked features
- Design a chat application to share text and other media content
- Create one-to-one communication with the contacts.
- Send text messages and other media items to the contacts
- Create a communication group with the contacts, with a higher limit of contact members
- Real-time communication support
- Show delivery receipts and online/offline indicators.
- Highlight new messages from contacts
- Maintain a large list of message history
Main concepts to focus
- Websocket connection creation and how real-time communication happens using web sockets. Its limitation over HTTPS.
- Limitation of the number of simultaneous websocket connections in case of group communication.
- A large message history of support using lazy loading (fetch from the server only when reaching that point) and virtualization.
- REST APIs to send messages and media payload.
Resources
- Resources for Chat App System Design
- Websockets and their limitations
- REST API to send messages and media payloads like location, video, images etc.
15. Seat Reservation Applications
Frontend system design for seat reservation applications
Application example
- BookMyShow
- RedBus
Questions with commonly asked features
- Design a Seat Reservation application to reserve seats on the flight, buses, theatres or stadiums.
- List of options available while seat reservation for flights and buses.
- Create configurable seat maps for different types of vehicles or locations
- Enable seat booking as per the selected preferences, and lock the seats for certain durations.
- Seat map representation as part of the REST API response.
Main concepts to focus
- Data store working and Normalize the API data for quick access.
- Working on a locking-based mechanism.
- REST API request and response calls to fetch seat map.
Resources
- Resources for Seat Reservation System Design
16. Ride-hailing Applications
Frontend system design for ride-hailing applications
Application example
- Ola Cabs
- Uber Cabs
- Rapido
Questions with commonly asked features
- Design a Ride-Hailing application which allows users to book cabs, and bikes from source to destination location.
- Search for source and destination using Map APIs.
- Showcase available types of rides with prices through APIs.
- Reflect the ride movement on the map.
- Internationalization.
- Progressive Web Apps (PWA) to support native notifications and offline apps.
Main concepts to focus
- Understanding Progressive Web Apps (PWA) and offline caching.
- Understand Debouncing while searching source and destination.
- REST API calls, retry API calls, and API cancellation
- Server Sent Events (SSE) to push from server to client
Resources
- Resources for Ride-Hailing System Design
17. Hotel Reservation Application
Frontend system design for hotel reservation applications, and this System Design is quite similar to seat reservation system.
Application example
- MakeMyTrip
- Airbnb
Questions with commonly asked features
- Design a Hotel Reservation Application, to reserve rooms in hotels at a particular location
- Support for a wide range of devices, especially mobile, tablets and laptops.
- Search for the location, to view all the hotels available through API calls.
- Listing of all the hotels in a performant way.
- Server Sent Events (SSE) to push live room rates to the users.
- Server-side rendering (SSR) for the hotel details for the SEO and improved load time performance.
- Image optimizations, and performance improvements using progressive images, for hero images and other hotel rooms images.
- Internationalization(i18n) and localization
- Accessibility especially keyboard support and using semantic HTML elements for screen readers.
Main concepts to focus
- Understand Debouncing while searching source and destination.
- REST API calls, retry API calls, and API cancellation
- Understanding Server side rendering and Server side rendering with Hydration for performance SEO
- Understanding Server-Sent Events to push text from server to client.
Resources
- Resources for Hotel Reservation System Design
- Rendering techniques
18. Food/Goods Delivery Applications
Frontend System design of Delivery applications is quite similar to the Ride-hailing application where through this application movement of goods happens rather than persons.
Application example
- Zomoto
- Swiggi
Questions with commonly asked features
- Design a Food/Goods Delivery Application to deliver the foods or goods from the supplier to the consumer
- Location detection to know the current location or user-provided location to confirm the availability of goods.
- Showcase Catalogue of the available foods/goods in a performance way by using progressive images and virtualization.
- Food/Goods details page uses Server Side Rendering with Hydration for faster load time and SEO.
- REST API calls to fetch the live menu, and the Server Sent Events to push live changes in the Menu or Restaurants availability.
- Constant monitoring of the order preparation, and ride status through Server-Sent Events / Long polling to update application details.
- Localization of the application to support local language.
Main concepts to focus
- Usage of compressed, Progressive Images and Virtualization to render a large list of items.
- Understanding Server-Side Rendering with Hydration to improve the initial load time to improve SEO performance.
- Server Sent Events or Long polling for delivery monitoring, from server to client.
- HTTP Caching, browser caching and CDN to improve caching for Images.
Resources
- Resources for Delivery App System Design
- Long polling & Server-Sent Events
- Server Side Rendering with Hydration
- Geolocation Web APIs for location detection
- Caching
19. Games Applications User-Interface (UI)
Frontend design for web game applications
Application example
- Chess
- Snake & Ladder
- Ludo
Questions with commonly asked features
- Design Chess Game Application user interface. where the chessboard is initialised with the initial set of Chess Pieces and users can move the chess pieces to the right position (Assuming chess piece SVG image are given)
- Configurable UI, where the Chessboard can be initialized with any set of chess pieces provided as part of JSON input.
- Recursion to find out all the valid positions for the particular chess piece as per its current position and highlight the same
- Cache the whole chess board other than the chess piece which is moving to the new location of the chess board.
- Optimizing the rendering of Chess piece images
- Lock the chess piece as per the current turn of the user.
Main concepts to focus
- Understanding of Object Oriented JavaScript implementation of classes to instantiate Chess Board (Singleton pattern), Chess pieces as objects
- CSS Flex or Grid to render chess board.
- Image rendering optimizations
- Recursion and backtracking to find valid positions
Resources
- Resources for Games UI System Design
- Object Oriented JavaScript implementation
- CSS Flex or Grid
- Image performance
20. Calendar Web Application
Frontend for online calendar view
Application example
- Google Calendar
- Outlook Calendar
Questions with commonly asked features
- Design a Web Calendar, to show the Weekly, Monthly views and Create Events. These events can be viewed on the calendar
- Rendering calendar in the different views and showing events accordingly.
- Render events on top of the Calendar.
- Handling of overlapping events.
Main concepts to focus
- CSS Flex or Grid to render the calendar on the browser
- z-index values to show overlapping events
- Finding overlapping events through the Overlapping Algorithm
Resources
- Resources for Online Calendar System Design
21. WYSIWYG editor
Frontend System Design for WYSIWYG Editor component. which is a complex component and required for taking Rich inputs from the users.
Application example
- Comment box
- Feedback sections
- Blog writers
Questions with commonly asked features
- Design a WYSIWYG editor, which can format the text and render the exact same formatting on the browser.
- Div element to writing text, select the existing text to apply to format or enable formatting that will be applied to the subsequent text.
- Configurable, to change the positioning of the options, and apply middleware while applying any action.
- Initialize the editor with predefined Rich text.
Main concepts to focus
- Understanding ContentEditable to create an editable area to write content
- Understanding Iframe to wrap the formatted text as part of the editor window.
- Understand, how to store data elements including all the formatted options as part of the JSON format.
Resources
- Resources for WYSIWYG Editor System Design
- ContentEditable
📣Final Note:
After going through all the above Important Frontend System Design Interview Questions, you have noticed that most of the system design questions shared many concepts in a different type of applications. Understanding these concepts will help in designing any of the above-mentioned Frontend Systems or any other frontend system.
A good understanding of the above concepts will definitely help you to Ace the Frontend System Design Interview. 🙏