SaaS product
Building and evolving an analytics SaaS
A multi-tenant SaaS product where tracker, API, reports, billing and advertising platforms must continue to operate as one system.
The situation
The application is a Laravel product for first-party lead tracking and attribution. It combines a JavaScript tracker, tracking API, Livewire administration, reporting, a Google Ads integration, Stripe billing and separate PostgreSQL data per company.
Where it got stuck
A seemingly small product change often crosses several layers. A new conversion type affects the tracker or webhook, storage, queue processing, reports, settings and an external API. Without clear boundaries, logic is quickly duplicated.
The technical question
The product must absorb new sources and customer requirements without breaking existing tracking or tenant isolation. Deployments must remain repeatable, while incidents need to be traceable to one customer, job or integration.
My approach
I use domain-oriented services and repository contracts around shared data flows. Critical paths are tested across the boundary between browser event, API, queue and database. Redis handles background work; Sentry and structured logging add error context; roles and tenant selection are enforced centrally.
What changed
The product can be extended step by step with new conversions, reports and integrations without restructuring the entire architecture. That end-to-end ownership forces choices that work today and remain operable and understandable later.
Under the hood
Decisions that made the difference
Database per company
Tenant data remains physically separated while the application retains shared product logic and administration.
One conversion flow
Leads, reservations and orders follow the same principles for consent, attribution, deduplication and export.
Product and operations
Deployments, queues, monitoring, billing and support scenarios are part of the same technical decision.
Focused tests
The transitions between tracker, webhook, queue and external API receive end-to-end coverage.