CodeIgniter 4 Dual-Mode and IgniteCore SDK for Perfex CRM

IgniteCore for Perfex CRM: CodeIgniter 4.7.6 Runtime Guide

Building complex integrations or SaaS-grade APIs directly inside Perfex CRM’s CodeIgniter 3 layer locks engineering teams into outdated patterns and brittle vendor conflicts. IgniteCore solves this by embedding a complete, isolated CodeIgniter 4.7.6 runtime inside Perfex CRM Classic so new modules run on modern PSR-4 architecture while legacy modules operate untouched.

Follow this operational runtime guide to structure IgniteCore directories, connect dual-mode routing, share Perfex database and session context safely, and deploy clean updates.

See real-world throughput results in our Data Builder and IgniteCore dual-mode API case study.

IgniteCore ComponentRuntime ResponsibilityUpgrade Safety Benefit
Isolated CI4.7.6 CoreDedicated app/, vendor/, and PSR-4 autoloaderZero dependency clashes with Perfex Classic vendor libs
Dual-Mode Router BridgeDispatches targeted routes directly to CI4 controllersStandard Perfex CRM admin pages remain on CI3 untouched
Shared DB & Auth BridgeReads Perfex DB prefix, session, and staff role contextNo duplicate login walls or credential sync drift
HTTP Filters & ServicesHandles CSRF, HMAC webhooks, validation, and DIConsistent security and clean modular domain code

Step 1: Initialize the Isolated CodeIgniter 4.7.6 Runtime

IgniteCore installs cleanly within the Perfex CRM module boundary without altering application/ or system/ core files. Before writing custom endpoints, review why CodeIgniter 4 and IgniteCore matter alongside Perfex CRM Next 1.0 so your team aligns on long-term module boundaries.

  • Activate IgniteCore from Setup > Modules and verify its isolated writable/ cache and log directories are writable by the web server user.
  • Confirm CI_ENVIRONMENT is set to production on live sites so stack traces stay inside protected log files.
  • Register your custom module namespaces in IgniteCore’s PSR-4 autoload configuration rather than loading helpers globally.

Step 2: Bridge Routes, Database Context, and Staff Permissions

With the runtime active, map clean CI4 route groups for your admin screens, JSON APIs, and webhook consumers. For multi-module teams deciding between Laravel Next 1.0 and Classic extensions, consult Developing for Perfex CRM: Laravel Next 1.0 vs CodeIgniter 4 Dual-Mode before finalizing API contracts.

  • Read Perfex CRM database credentials and table prefix dynamically through IgniteCore’s database bridge instead of hardcoding environment files.
  • Attach IgniteCore authentication and capability filters to staff routes so CI4 controllers enforce the exact Perfex role permissions admins configure in Setup.
  • Encapsulate business logic inside stateless CI4 Service classes and typed Models so automated unit and integration tests run independently of HTTP requests.

Common Pitfalls and Quick Fixes

  • Permission denied in CI4 cache or session logs: Apache or LiteSpeed workers cannot write to writable/. Set directory ownership to the PHP worker user with 0755 permissions.
  • Route returns Perfex 404 page instead of CI4 controller: Dual-mode route prefix registration was skipped or cached. Verify the IgniteCore hook registration and clear OPcache after adding new routes.
  • Unprefixed table errors on multi-prefix installs: Querying tblinvoices literally fails if an installation uses a custom prefix. Use IgniteCore’s prefix-aware Model helper on every table reference.

Frequently Asked Questions

What is IgniteCore for Perfex CRM?

IgniteCore is a dual-mode CodeIgniter 4.7.6 runtime bridge built for Perfex CRM Classic. It runs inside standard Perfex module boundaries so developers can ship PSR-4 services, modern REST APIs, and PHP 8.2-8.4 compatible modules without modifying Perfex core files or breaking legacy plugins.

Will official Perfex CRM Classic updates overwrite IgniteCore?

No. Because IgniteCore lives strictly within dedicated module directories and never patches Perfex CRM core files under application/ or system/, official Perfex platform updates apply cleanly. Your CodeIgniter 4.7.6 runtime, Composer dependencies, and custom routes remain intact across upgrades.

Can IgniteCore modules use modern Composer packages safely?

Yes. IgniteCore maintains an isolated Composer autoloader for the CodeIgniter 4.7.6 runtime, allowing teams to install modern SDKs, queue workers, and validation libraries for PHP 8.2-8.4 without conflicting with older libraries bundled inside Perfex CRM Classic.

How do staff users authenticate when opening an IgniteCore CI4 screen?

Staff authenticate once through standard Perfex CRM login. IgniteCore’s auth filter reads the active Perfex session and verifies staff status and module permissions automatically, providing a seamless single-login experience across Classic CI3 and modern CI4 pages.


Comments

Leave a Reply

Your email address will not be published.Required fields are marked *