Create a simple web-app to lookup info for a text message.
The application should take a phone number and message string, and then send that data to a backend for analysis.
It should then display the following info:
- The matched
Country
,Region
,Operator
, andPrefix
- Message body with any urls highlighted and clickable
A sample dataset of country and operators prefixes is here for Canada, all numbers start with1
When matching a number to the prefix the application should select the record with the longest matching prefix from the supplied sample data set, for example Given a phone number14373293504
and a set of prefixes The application should select the record with prefix{"prefix": 1, "operator": "", "country_code": 1, "region": "", "country": "USA"}, {"prefix": 1, "operator": "", "country_code": 1, "region": "", "country": "Canada"}, {"prefix": 143, "operator": "", "country_code": 1, "region": "", "country": "Canada"}, {"prefix": 1437, "operator": "", "country_code": 1, "region": "Ontario", "country": "Canada"}, {"prefix": 1437329, "operator": "Lucky Mobile", "country_code": 1, "region": "Ontario", "country": "Canada"} {"prefix": 14372, "operator": "", "country_code": 1, "region": "Ontario", "country": "Canada"}
1437329
- As a user I can input a phone number and message string into the app
- I then see the country, region, operator and prefix of the phone number
- If the message contained a URL, I can click a link in the message to open the site
- React is prefered but not mandatory
- We also like Typescript
- Use any libraries
- The backend should provide a single RESTful endpoint or GraphQL edge to analyse messages (we use Python & Golang, but feel free to implement in your preferred language)
- Please write any tests you deem appropriate
- Write a docker-compose.yml to run the application (we'll run
docker-compose up
)
We don't need you provide a totally polished submission, your time is valuable! if something isn't perfect or you need to reduce the scope for any reason you're welcome to just talk to us about how you would improve your solution given more time.
Please commit your application to this repo