Rebuilding an education CRM from CodeIgniter 3 to Laravel 11
Trechto is an education CRM that grew up on CodeIgniter 3. I am rebuilding it as a standalone Laravel 11 application on the same MariaDB database, keeping the design and features while making it faster. The dashboard went from 589 database queries to 9.
Same product, no legacy runtime
The brief was clear: the new app had to be fully independent of CodeIgniter 3, match the existing design and features or improve on them, and be fast. The existing data had to stay where it was, because the business runs on it.
Dropping the strangler for a clean break
The first plan was a strangler migration, with Apache routing some URLs to Laravel and the rest to CodeIgniter, and a bridge sharing login sessions between them. That keeps two runtimes alive and ties the new app to the old session format.
So I dropped it. The rebuild became a single standalone Laravel app served by one Apache virtual host, with native Laravel authentication against the existing user records. The session bridge and proxy layer were retired completely.
What the rebuild involved
- Same database, new app: Laravel runs against the existing MariaDB database, so no data migration stands between the old system and the new one.
- Multi-branch tenancy: a branch scope resolved from the signed-in user keeps every query inside that user's branch, including data that is stored differently from branch to branch.
- Permissions: role-based access for staff screens, with branch and subscriber management restricted to superadmins.
- Dashboard rewrite: a new dashboard service replaced repeated per-row lookups, taking the page from 589 queries to 9 and making it about 12× faster.
- Feature tests: 234 feature tests cover the rebuilt screens, so changes can ship without guessing.
Current status: everything is built and tested except two screens, bulk SMS/email sending and video upload, which are waiting on credentials for the external gateways they use.
Results
Tech stack
- Laravel 11
- CodeIgniter 3
- PHP
- MariaDB
- Apache
- Feature testing