Design a financial platform to handle 100,000 users with sub-100 ms response time. The solution should outline:
Build one specified functionality from a given Node.js requirements list. After implementing the feature, provide:
Step 1: Chose to implement a Role-Based Authentication System to handle access control.
Step 2: Built the solution using core Node.js modules like express, jsonwebtoken, and bcryptjs, while following the Model-View-Controller (MVC) architecture to ensure clean and maintainable code structure.
Step 3: Solved the role-based access challenge by developing a custom middleware. This middleware takes a list of permitted roles and checks whether the user’s role (fetched from the permissions field in the user model) matches any of them. If a match is found, access is granted; otherwise, it is denied.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?