How I rewrote 20 years old php application in Laravel from scratch
03 May, 2023 Bedram Tamang

In June 2018, I was recruited by jobsnepal.com to completely rewrite their website from the ground up. Jobsnepal, being a recruitment company, did not have its own IT team. The primary motive behind rebuilding their entire application can be summarized as follows:

  • No responsive design: Jobsnepal.com lacked a responsive design and instead relied on a separate application for mobile devices. However, their mobile website was incomplete as it only provided a job listing feature, leaving both the company and job seekers unable to perform any actions on their mobile devices besides viewing job listings.

  • Security reason: In the past, Jobsnepal.com had experienced several instances of website hacking, indicating the presence of potential security vulnerabilities that could be exploited. It is possible that there may be other security loopholes that could also be exploited.

  • Application Errors: There were numerous errors present in their application, particularly in the account section. Since the application was fairly extensive, making changes in one area posed a significant challenge, as there was always a concern about inadvertently causing issues in other areas.

  • Fear of change: The complexity of the application structure meant that any modifications to the codebase required a deep understanding of the interdependencies between various components. As a result, there was a sense of caution when making changes, as even minor modifications could have unexpected consequences on other parts of the application.

  • Old Php 5.1: Back in 2018, Jobsnepal.com was running on PHP 5.1, which had been outdated for almost half a decade at that point. This meant that the website was not taking advantage of the latest features, security updates, and bug fixes available in newer versions of PHP.

The Challenge

Jobsnepal.com was the pioneer of job portals in the country, having started in 2004 and serving job seekers and companies for more than a decade. With a vast user base comprising hundreds of thousands of job seekers and employers, the pressure to complete the project within the given timeframe and meet their expectations was significant. As the sole developer, there was a considerable responsibility to design a website that accurately portrayed the company's reach and influence, while providing an engaging and interactive user experience for their users. The primary objective was to deliver a modern and user-friendly website that showcased its brand identity and helped them stand out as a leading job portal in the region.

As a developer at Jobsnepal.com, there were several major tasks accomplished, including:

  • Architecture: Designed, architected, and deployed the job portal system from scratch with modern tools and techniques
  • Database Redesign: One of the most intensive tasks I undertook was redesigning the database. The old database was poorly designed, with no adherence to any database design principles. Past developers had modified the database without considering performance or design, making it difficult to work with. To overcome these challenges, I redesigned the database from scratch using modern database principles and techniques
  • Data Migration: To address the issue of fitting almost 20 years of data from the old database into the new database with a different schema, I created a Python script project specifically for data migration. The project utilized Python packages like pandas and numpy to write the migration scripts.
  • Responsive Design: To ensure a responsive design, I utilized Bootstrap and later added Tailwind CSS to my toolkit.
  • TDD Development: I have implemented a comprehensive testing strategy for the project, covering both integration and unit tests. This has helped to ensure that the application is functioning as expected and that any future changes can be made with confidence, even as the project grows in size and complexity.
  • Optimizations:
    • Query Optimization: implemented various methods to improve the performance and efficiency of database queries, such as eager loading, indexing, normalization, normalization, denormalization, caching, view tables, etc.
    • optimized our assets by minimizing CSS and JS files using Minify and removing unused CSS using Purge CSS. Additionally, we cached our static assets on AWS S3 to improve loading times.
    • To optimize the loading speed of our homepage which contained numerous images, we employed image optimization tools and resized the images into three distinct sizes. We then loaded the images based on their requirement to ensure swift page loading. Additionally, we also implemented image lazy loading.


Profile Image

© 2024, All right reserved.