As the data is small. I created the list static on the UI and create a Data util to provide me with the countey codes and the regex for each country. For a large data I see that data should be on the database on table country of three Column.
country_name | country_code | country_regex |
---|---|---|
Cameroon | +237 | (237)\ ?[2368]\d{7,8}$ |
Then render them on the page on load and when search join the country tale to complete the task . here i decide to make it as simple and clean as i could.
It's a Spring-boot application with Thymeleaf using spring-data-jpa and sqlite3 database. You can filter using country and phone status Valid or Not Valid
Pull the project and create mvn clean instal :
git pull
> mvn clean install
Then run as a spring boot application then go to: localost:8090
- Setup Docker on ubuntu
- Dockrize home Country Api .
-
first build the project using maven
mvn clean install package
-
then go througth this tutorial
-