Case Studies 7 min read

Why We Rebuilt Our CRM in Laravel (and What We Learned)

We spent years working with vTiger CRM. If you’re not familiar with it, vTiger is an open-source CRM — flexible, customisable, and a reasonable choice when you need something that does most things out of the box without a large upfront build cost.

For Blue Horizon and their Smartblood clinical diagnostics platform, vTiger handled a lot over the years. Contact management, sales pipeline, integration with their laboratory management system. We built custom modules, maintained it through version upgrades, and generally kept it running well. I have genuine respect for what vTiger can do.

But eventually, every customised off-the-shelf system hits a ceiling. And when Blue Horizon hit theirs, the right call was to build something purpose-built.

Why Custom Won

The conversation about moving to a custom CRM isn’t “off-the-shelf is bad.” It’s “what are you actually paying for?”

With vTiger, Blue Horizon was paying for a lot of functionality they didn’t use. The system has modules for project management, help desk ticketing, inventory management — features built for a generic business that didn’t map to what a clinical diagnostics company actually needs. Every update to the core required checking that none of those unused modules had broken their custom ones. Every integration with their lab systems involved working around assumptions baked into vTiger’s data model.

More importantly, they had specific requirements that off-the-shelf CRM systems genuinely can’t accommodate well. Their pipeline wasn’t a standard sales pipeline — it tracked samples through clinical processing stages, not deals through sales stages. The reporting they needed was tied to clinical metrics, not sales metrics. The contact model had to support a network of healthcare professionals, clinics, and individual patients in ways that standard “contact” and “account” concepts don’t capture cleanly.

When we added up the cost of continued customisation — the maintenance burden, the integration friction, the workarounds — versus the cost of building something that fit precisely, the numbers weren’t as far apart as you’d expect. And the custom option would fit better, be easier to maintain, and be something we fully owned and understood.

So we built it.

The Tech Stack Decision

We went with Laravel 12, Livewire, PostgreSQL, and Tailwind CSS. If you’ve seen our services page, that’s our standard stack for CRM work and it wasn’t a close call.

Laravel gives you a mature, well-structured framework with an excellent ORM, solid authentication scaffolding, queue system for background jobs, and an ecosystem we know deeply. We’ve used it for 10 years across dozens of projects. There are no surprises in Laravel.

Livewire was the interesting addition. For a CRM, you need a lot of interactivity — inline editing, real-time search, dynamic forms, pipeline drag-and-drop — without the overhead of building a full SPA. Livewire lets you write that interactivity as server-side PHP components that re-render over a websocket-like connection. The developer experience is excellent and the result is fast without the complexity of maintaining a JavaScript frontend separately from your backend.

PostgreSQL over MySQL was about the reporting requirements. Blue Horizon’s team needed aggregate queries across clinical data that benefit from PostgreSQL’s more powerful window functions and its JSON column support for flexible metadata. Once you’ve worked extensively with PostgreSQL’s query planner, it’s hard to go back.

What We Actually Built

The core feature set for the initial release:

Contact and Organisation Management — with a data model built around how Blue Horizon actually works. Healthcare professionals are linked to clinics, clinics are linked to health systems, patients are linked to healthcare professionals. The relationship structure reflects the real world, not a generic CRM’s assumptions.

Pipeline Management — configurable pipeline stages that map to the clinical journey, not a sales funnel. Each stage has its own required fields, validation rules, and automations. A sample reaching the processing stage triggers different actions than a deal moving to “proposal sent.”

Reporting — the piece that probably took the most careful architectural thought. We built a reporting engine that can handle the aggregate queries Blue Horizon needs without locking the UI while reports generate. Reports run as background jobs, and the UI polls for completion. For complex queries against large datasets, this matters.

AI Meeting Notes — this was the feature that surprised us with how well it worked. After a meeting with a healthcare professional or clinic representative, a user can paste their rough notes and the system uses the Claude API to structure them into a standardised contact note, extract any follow-up actions, and suggest updates to the contact record based on what was discussed. It sounds like a small thing but it’s the feature users mention most.

The AI-Augmented Build Process

Building this CRM was where we really developed confidence in our AI-augmented workflow. The project was well-scoped, the domain was one we knew well, and the stack was one we could direct AI tools in confidently.

For the data model, I did the architectural work myself — drawing out the entity relationships, the key queries we’d need to support, the indexes that would matter. This isn’t something I’d delegate to an AI. The data model is the foundation of everything; getting it wrong means pain for the lifetime of the system.

Once the model was solid, AI tools accelerated the implementation enormously. A complete Eloquent model with relationships, scopes, and casts that would have taken a couple of hours to write carefully took about fifteen minutes to generate and review. The migration files, the form request classes, the API controllers — all generated quickly and reviewed against the spec.

The Livewire components required more back-and-forth with AI tools. Livewire’s reactivity model has specific patterns and the AI would sometimes generate components that worked but didn’t follow Livewire conventions well. That’s where human review caught things: not “this is broken” but “this will become hard to maintain.”

Tests were a genuine highlight. We asked Claude Code to generate feature tests for each pipeline stage transition and it produced thorough test coverage — including edge cases we hadn’t explicitly specified but the AI inferred from the business logic. We extended those tests but the foundation was solid.

Total build time for the core CRM was about six weeks with a two-person team. We estimate the equivalent build without AI tooling would have been twelve to sixteen weeks.

What We Learned

AI is excellent at implementation, not at knowing what to implement. The best AI-generated code in this project came from the most precisely specified prompts. Every time we were vague, the output was vague. The discipline of thinking clearly about what you want before prompting is the same discipline that produces good software regardless of how you’re writing it.

The review step is not optional. We caught security issues (input validation missing on a file upload endpoint), performance issues (an N+1 query in a report that would have been fine in testing but catastrophic in production), and UX issues (a Livewire component that re-rendered too aggressively and caused input focus loss). None of these were obvious from a quick look; they required careful reading.

Data migrations are where you earn your money. Moving data from vTiger’s MySQL schema to our PostgreSQL schema required careful mapping, transformation scripts, and a parallel running period where both systems were live. AI tools helped write the transformation scripts but the mapping logic — understanding how vTiger’s data structures related to our new data structures — was pure human domain knowledge.

Users adapt faster than you expect when the new thing is actually better. The team at Blue Horizon was apprehensive about moving away from a system they knew. Within a month of launch, nobody wanted to go back.

If you’re thinking about whether a custom CRM might be the right move for your organisation, have a look at our CRM services page for more on our approach, or get in touch for a conversation about your specific situation.

Let's build something great

Tell us about your project and we'll get back to you within one working day. No hard sell, just a straight conversation about what you need.

Start a conversation