My first commercial project

Online auto parts store Dok.ua

as Junior PHP developer

Leading Ukrainian e-commerce platform specializing in automotive parts, fluids, and accessories

How it was?

Parsing process

The first thing I had to deal with here were scrapers. The team and I needed to process a large amount of data - information about engine oils. There were descriptions of oils, characteristics and photos from manufacturers that needed to be systematized, which I did very well. This task was solved by using pure PHP and Javascript PhantomJS library. I want to say thanks to my mentor Yuri Smiyan, who then instilled in me an interest in Javascript by showing me some "magic".

I had already dealt with the CodeIgniter PHP framework, but in dok.ua I first encountered another framework which was called Yii. In any case, I had very little experience with such tools. Both frameworks had a lot in common, they both used the MVC data splitting pattern, which I found pretty handy and easy to understand. The project was running on PHP 5.6, which was up-to-date at the time. The entire front-end was built with jQuery library due to its popularity and large number of plugins.

Due to my little experience, almost all my tasks were related to the admin panel, where there was nothing urgent, and speed and convenience of work were not critical. I remember how I set up a schedule for the delivery of goods by suppliers and was proud of myself. I also worked on the order details page and added new functionality there. That's when I learned the "state" design pattern. I also had tasks related to setting up products and access rights (RBAC) for admin users.

Later, when I gained some experience, I began to receive more complex and responsible tasks. I started dealing directly with the site of the online store, which was used by customers, not only the backend, but also the frontend. I added functionality to the product details page, improved the shopping cart, and also updated the buyer profile page. I connected third-party services, for example, a new version of the "Nova Poshta" delivery service API.

All website data was stored in a MySQL database, so I had to learn it too. Thanks to my team leader Nikolai Polimushket for helping me fall in love with SQL. He showed me how complex queries can be and how fast they can run if everything is set up correctly. After that, learning PostgreSQL became much easier to me.

Achievements

This company employed a lot of sales managers, and when a buyer placed an order on the website, one of the managers accepted it, receiving some bonus to their salary. Later there was a problem, sales managers were taking a lot of orders and put them off "for later" in order to get a big increase in salary. They even used special clicking apps to automate this process.

I designed a fairly good solution and implemented it. I made a daemon that recorded the acceptance of orders by managers in a table in the database and put this manager in idle for a certain time. The algorithm also sorted managers in such a way that the new order was shown to the one who was out of work the longest. If this manager did not accept the order after a certain time, then this order will see the next one in a line.

Then if the manager had accepted one order, he would not see new orders for some time. Thus, orders were more evenly distributed among managers. I consider this decision to be my biggest achievement on this project. Of course, after a while I understand that I could solve this problem in a completely different way, more correctly, using the queue system for this.

Web application with content tools

For a long time I worked with the content department and developed tools for them. These were sections in the admin panel for uploading product photos, editing product descriptions and adding characteristics (product sizes, colors, manufacturer, etc.). There were quite a few of these tools. And at that time I was just studying the Angular 2 javascript framework and in order to consolidate what I learned, I decided to write a separate web application for the content department.

Using this framework and the Materialize library, I developed a fairly handy tool that not only simplified the work of employees, but also allowed them to monitor the progress of their work using a dashboard. The application worked with data through a simple REST API written as part of a common CRM system. After a while, I concluded that Angular is too cumbersome for small applications and Vue would be more suitable.

The challenge

Sales managers took more orders than they could manage to get bonus to their salary and used cheating software. Order weren't distributed normally.

The solution

I designed and implemented Round-robin-like algorithm so that a new order was shown to the one who was out of work the longest. If this manager did not accept the order after a certain time, then this order would be shown the next one in a line.


The challenge

Content department needed numerous admin tools for uploading photos, editing descriptions, and adding product details. Managing all these features became complex, and as I was learning Angular 2 at the time, I decided to tackle the problem by building a dedicated web application to streamline their work.

The solution

Using Angular and Materialize library, I developed a handy tool that not only simplified the work of employees, but also allowed them to monitor the progress of their work using a dashboard. The application worked with data through a simple REST API written as part of a common CRM system.

Technology Stack

Frontend

HTMLCSSJavaScriptjQueryAngular 2Bootstrap 3

Backend

PHP 5.6Yii 1MySQL 5.7Sphinx Search

Tools & DevOps

GitGitHubSublime Text 2