First thing first; I needed a domain name and as always most of them are taken but I was lucky to register whocalled.today. Which turned out to have a `history`, more about that later.
Choosing stack / languages
Aiming to create a site quickly excludes new tools and frameworks with high initial learning curves, which is why I chose to set up a LEMP LXC Container in one of my dedicated servers.
LEMP - Linux (Debian), nGinx, MariaDB, PHP 7.3.
LXC - Virtual server controlled with Proxmox.
This is also my favorite setup because there are very few issues in this Stack I can’t handle.
I created my own backend framework back in 2007, it's not modern but it is robust. It's a very simple MVC thingy that initially used MySQL which later on was updated with both MariaDB and PDO, and a couple more modern Trix, to make sure it stays secure.
Bootstrap - Frontend framework, perfect for responsive sites.
Libphonenumber - Handles phone numbers, makes the site work. A must have.
For the frontend I’m using Bootstrap 4, mainly because I appreciate the rapid development made possible using it, I know there are a couple more modern alternatives. But Bootstrap solves my needs related to creating a responsive site.
There are as many opinions about good designs as there are developers/designers in the world, and to make the choices easy I just simply had a look at ~10 different sites I like and then cherry-picked the solutions and ideas I like the most. The important thing is to get a good working site up and running quickly in step one. Achieving perfection takes years when it comes to the UX, I'm choosing a middle way, for now, aiming to beat the majority but admitting there are still possible improvements.
Structure the database - How hard can it be?
Setting up a database with a couple of tables containing numeric phone numbers and adding a couple of indexes for quick searches in the tables was done in minutes. Keeping it simple and not adding loads of unnecessary things, makes the development progress quickly.
Libphonenumber makes this easy
Even before starting to look at this project, I assumed there had to be a simple solution for formatting, locating/location and handling phone numbers, and that's where libphonenumber comes in. All I had to do was to create a new object/instance of libphonenumber and throw in the number in one end and then I could easily get the country, area code and area name, It was just so easy.
$gbNumber = \libphonenumber\PhoneNumberUtil::getInstance()->parse($input->search, "DE");
$geoCoder = \libphonenumber\geocoding\PhoneNumberOfflineGeocoder::getInstance();
$countryCode = $gbNumber->getCountryCode();
This gives me the correct countrycode from a phone number, Im sure its possible to optimize and improve my own code and solutions in time. But it all works and it has been a very straight forward development of the site.
Putting it all together
The biggest challenge was to make the site user friendly, enough. I hate sites that lack all sense of logic, at the same time I'm not a UX or designer myself so trying to put this all together into a usable interface does take time.
I decided to go with a simple front page with just a search bar and some basic links and texts. I think there is a lot more to do here in the future, I like to add latest searched and reported numbers and if possible also other user-generated content (which will be reviewed before publishing).
For the search results/numbers, I’m mainly looking at 3 well-established sites that present the numbers with comments and reviews and trying to come up with a unique design and presentation. At the same time, there is just not that much creativity to be spun from a phone number. But I tried, and I plan to add more.
It would be fun to add logic that presents if the number has high possibility to be located in the forest or in the suburbs and also illustrate that in the design and even combine it with the average salary in those areas and so on, pretty much make a judgment based on the average Joe living in that area. And in that way also create unique content that adds value to the reader/visitor. I'm sure this is the section I will spend most of my time in the future working on this site.
Why did I create it?
I guess just because I can, and I really appreciate self-running services where I code something that works with big data and requires a low amount of work in the long run, compared to a blog where you always need to post new fresh content and I wanted a small "random" challenge just to play with for a moment, and tracking phone numbers is a good match for a site that tracks IP's :)
Please visit it here: whocalled.today