When I met my other 3 co-founders on February this year, I was convinced that their business plan could work — connect multiple delivery partners along cross-border routes on one single platform, enabling Janio to expand our network quickly with minimal setup time and cost.
"When are we expected to go live?" I asked.
"June, this year."
I was shocked. 3 months? I had 3 months to develop a system with:
To be honest, I did initially think that it was impossible. It would have been safer to give an end-of-year deadline to our potential clients but that would not have worked out because of the 10/10, 11/11 and 12/12 promotional shopping seasons — no client will migrate their operations to us during such a busy delivery period.
"Sure, June it is," I answered, knowing that there was little choice.
Fortunately, the next 3 months went by smoothly and we launched successfully in June 2018, with only two developers, one of them being me. How did we do it?
This was our tech-recipe:
Apart from briefly explaining each point, I will also provide links to the tutorials and sites that have helped me significantly along the way.
My first Django app was just a year ago done for my university's final year project. It was definitely an enjoyable framework to code in; Guidance can easily be found online due to how established the framework is and it helps that it is based on Python. Okay, I could give hundreds of other reasons but the main reason was simply because I already learned the framework and there was no time to learn another.
The secret sauce was Django Rest Framework (DRF). It allows me to create REST APIs quickly based on Django models. GET, POST, PUT, PATCH, DELETE logic can be created literally within minutes. If I needed more customization, I could choose what level of abstraction the custom logic should be on. DRF also creates a web-browsable API testing page and includes helper classes that extend Django's amazing test framework. Writing test cases and running those tests could not have been easier.
Oh yes, I wrote test cases for commonly used and critical parts of the code - less time testing, and more time to code.
Online courses used:
https://www.udemy.com/django-python/
We wanted our platform to be as accessible on a desktop as it is on a mobile phone, hence our platform is a single-page web application. It should also be able to create multiple API requests to our server and the page should update dynamically as responses come in.
It was thus natural for us to pick React-Redux as our framework. Our front-end developer spent only a few days filling up the Redux actions and reducers with all our API endpoints, and the next few days implementing a dashboard template. The most difficult part was to render the UI based on which API request has been responded but since we used React-Redux, it was simply a matter of using a few simple if-statements for the props.
Also, every drop-down selection and parameter is obtained by our backend. This meant that once the web application is up and running, any changes in parameter needed can be made by the backend developer without communicating with the front-end. In fact, the front-end developer and I only video-called once or twice per week.
Online courses used:
https://www.udemy.com/react-redux/
https://www.udemy.com/react-redux-tutorial/
Setting up Heroku took less than 2 hours as it only required me to install the buildpack and connect to GitHub to allow auto-deployment after every commit. On top of that, setting up SSL certificates only required adding 2 entries into our GoDaddy's DNS settings.
As the number of orders per day grew and there were thousands of queries for order track and trace updates, we had to upgrade and increase the number of Heroku "dynos". This can be done by adjusting the slider on the Heroku resource tab. Plus, we had to adjust the WEB_CONCURRENCY environment variable in our settings, affecting the number of instances that can run at the same time.
We also used Semaphore (free 100 builds/month) for continuous testing and integration. When we connected Heroku to GitHub, we were able to select a checkbox that will wait for the CI tests to pass before auto-deploying.
Heroku also allowed us to commit and deploy changes throughout the day, even during peak operational hours. We do this by enabling preboot that starts a new set of web dynos before stopping the current ones - leading to zero downtime deployments.
We use RDS for our Postgres database. Setting it up was easy and only required a few drop-down selections, most of which can be left as default. When we needed to upgrade, we adjusted the database settings and the database will re-instance during a selected maintenance window.
With RDS, we could create a read-replica with a few clicks. This read-replica is used mainly for our order track and trace API as we can receive thousands of requests per minute and this should not affect the delivery order creation API.
Most importantly, we could launch in 3 months because we designed the system in a modular fashion. When business requirements changed, there was no need to worry about system-wide impacts to code changes.
Our current tech stack has a lot of limitations, and right from the start, I knew it will reach its limit pretty soon. Nonetheless, because of it, we were able to launch on time and deliver internationally within just 3 months.
As I write this article, the Janio tech team, which has grown in size, is hard at work moving our systems onto AWS's Singapore servers. Moving to AWS will allow us to tinker with load balancing logic more granularly. We will be adding Redis cache to speed up the queries. Eventually, we hope to cut our response times by 50%.
Thank you so much for reading this and we hope this gave you some ideas to quick-start your next tech project!
Janio is an integrated logistics solutions provider based in Singapore, providing solutions across 12 different locations in Asia, including Indonesia, Malaysia, Taiwan, Mainland China and Thailand.
If you'd like to find out more about our business, come and have a conversation with us
Mohamed is the Co-founder and CTO of Janio Asia, heading a tech team that built the company's proprietary logistics network platform. Together with his group of capable developers, he launched the platform in just 3 months - but his journey has just started. He spends his free time catching up with the latest technologies, before his job is replaced by bots.