Refactoring a SaaS Advertising Platform and Migrating It to Multi-Tenant Architecture
Summary
INNERLUXES took full ownership of modernizing a niche digital-advertising agency's legacy SaaS platform — auditing and refactoring the code and re-architecting it into a secure multi-tenant model. The result is a more maintainable, marketable application with lower maintenance overhead and total cost of ownership.
About the Client
The Client is a digital marketing and branding agency specializing in the phytotherapy (herbal-medicine) niche. It owns a SaaS advertising platform that helps businesses navigate a restrictive advertising environment, letting phytotherapeutic companies serve media advertisements and connect with their global audience.
The Challenge: A Stalled Update of a Legacy Ad Platform
The Client planned a significant update of its legacy advertising platform, which automates the management of digital ad campaigns, to handle future growth and evolution. A key business goal was to implement multi-tenancy so customers could share application resources while keeping their data isolated and secure — a change that required an all-new architecture. But the update had stalled: the platform ran on old technologies and was poorly architected, and after several teams had been involved in the original development, the Client had lost control over the platform's health.
Audit, Refactoring, and Multi-Tenant Re-Engineering
Tasked with the overall modernization, INNERLUXES assumed full ownership of the process, providing the Client with all the required technical documentation along the way. The team started with an application audit and a detailed report on the code-quality and architecture issues it uncovered, then prioritized fixes and drew up a modernization roadmap.
To clean up the code and eliminate technical debt, INNERLUXES carried out refactoring — splitting the code into smaller, testable components for unit testing to locate and fix discrepancies, and improving readability and consistency with coding standards to ease future growth and reduce the risk of changes cascading into existing functionality. The team used AWS Elastic Beanstalk to deploy code changes and introduced a staging environment to test code before pushing it live, achieving the maintainability and extensibility needed for cost-effective long-term evolution.
INNERLUXES then re-engineered the application into a multi-tenant one, sharing computing resources and application code across all tenants while giving each tenant its own authentication and guaranteeing isolation of tenant data.
Results
INNERLUXES increased the platform's marketability by bringing the source code in line with single standards and reviving the application with modern coding approaches, and moved the Client's advertising platform to a multi-tenant model — reducing the overhead of maintaining the application across multiple deployments and optimizing its total cost of ownership.
Technologies and Tools
Python, Flask, React, Redis, PostgreSQL, Elasticsearch, AWS Elastic Beanstalk.