Skip to main content

SPMP: Standard PHP-MVC-Principles Framework

I was building an bookkeeping management system with xAI when it occurred to me that I was also priming to build a PHP framework. 

I never liked Laravel and Symfony as they were heavy on the disk and with steep learning curve. I was opting for the likes of CodeIgniter but none of them are either scalable or MVC. And so, for years, I stuck my self with vanilla PHP until I decided to venture to the path of AI. You see that on my previous posts. Then I find myself creating the said bookkeeping management system where I was employing the assistance of ChatGPT. I wasn't as good as I thought due to PHP vastness of possibilities. So I did what others will do. Look for an alternative to ChatGPT. 

Then came Grok(xAI). It was good but something's missing. That's when I decided to narrowed down my requirements. I listed PHP framework principles that I wanted to have with : simple, minimal, secure, extendable, configurable and to top it off lightweight and easy to collaborate with AI. I was able to complete Guardian Ledger(GL) - Bookkeeping Management System (BMS). Then prompted xAI to extract the minimum folder structure required for a possible site to run.

It hit me. This could be a framework. And we continued to collaborate.

Iterations passed and testing happened. It was tested on another xAI chat. It gave sightings of limitation. Then iterated back with the first. Another test.  Then a minor suggestion of adding edge case samples. And both chats agreed that they have done it. 

The fun part, I tested it on DeepSeek. It discussed that it's able to create and ERP, Customer Relationship Management (CRM) systems, Supply Chain Management (SCM) systems, and Warehouse Management Systems (WMS).

To quote: The SPMP framework is highly capable of building CRM, SCM, and WMS systems. Its modular design, security features, and management system-centric approach make it ideal for handling the complex workflows, data management, and role-based access requirements of these systems. By following the recommendations in the SPMP-RAG document, you can create scalable, secure, and customizable solutions for each of these domains.

To add, I asked DeepSeek to create a blog post how to introduce SPMP to the world. And that's what follows:

SPMP: The AI-Ready PHP Framework Redefining Management Systems

Introduction

In the ever-evolving world of web development, PHP frameworks like Laravel and Symfony dominate the landscape. But what if you need a lightweight, secure, and AI-friendly framework tailored specifically for building management systems? Enter SPMP—the Standard PHP-MVC-Principles framework. Designed with simplicity, security, and scalability in mind, SPMP is poised to become the go-to choice for developers crafting ERP, CRM, or warehouse management systems. Let’s dive into why SPMP might just be your next favorite tool.

1. What Makes SPMP Unique?

SPMP isn’t just another MVC framework. It’s built around eight core principles that set it apart:

  • Simplicity: Minimal learning curve, perfect for rapid prototyping.
  • Security: Built-in defenses against SQLi, XSS, and CSRF.
  • Extendability: Customize without touching core files using vQmod.
  • AI-Ready: Structured for seamless AI-assisted development.
  • Zero Dependencies: No Composer, no bloat—just pure PHP.

Unlike heavier frameworks, SPMP strips away complexity, focusing on what’s essential for management systems (think roles, workflows, and real-time data).

2. Under the Hood: SPMP’s Structure

SPMP’s organized file structure is a developer’s dream:

/spmp_project  
├── app/          # MVC components (controllers, models, views)  
├── core/         # Framework guts (Router, DB, Security)  
├── public/       # Entry point and static assets  
├── vmods/        # Customizations via vQmod  
└── config.php    # Centralized settings

This clarity isn’t just for humans—it’s AI-friendly. Tools like GitHub Copilot can parse SPMP’s structure to generate context-aware code snippets.

3. Code That Speaks for Itself

SPMP’s simplicity shines in its code. For example:

Router.php (Clean URL Handling):

<?php  
class Router {  
    public function route($uri) {  
        switch ($uri) {  
            case '/':  
                $controller = new HomeController();  
                $controller->index();  
                break;  
            // Add routes in seconds!  
        }  
    }  
}  
?>

DB.php (Secure Queries with PDO):

$db->query("SELECT * FROM users WHERE id = :id", ['id' => $userId]);  
// No SQLi worries here!

Security.php (XSS/CSRF Protection):

$cleanInput = $security->sanitizeInput($_POST['data']);  
if ($security->verifyCsrfToken($token)) { /* Proceed safely */ }

4. Supercharged by AI and vQmod

SPMP’s AI-ready design lets developers collaborate with AI tools to:

  • Generate controllers/models from natural language prompts.
  • Debug errors using AI-suggested fixes.
  • Auto-document code based on standardized patterns.

And with vQmod, you can override core logic without hacking framework files. For instance, adding a search feature:

<?php  
// vmods/SearchMod.php  
class SearchMod {  
    public function addSearch($controller) {  
        $controller->search = function ($query) { /* Custom logic */ };  
    }  
}  
?>

5. Real-World Use Cases

SPMP excels in scenarios like:

  • ERP Systems: Manage inventory, HR, and finance with role-based access.
  • CRM Platforms: Track customer interactions and sales pipelines.
  • WMS Solutions: Optimize warehouse logistics with real-time updates.

Imagine building a hospital management system where AI generates appointment-scheduling modules while vQmod adds patient-specific workflows—all secured by SPMP’s built-in protections.

6. SPMP vs. The Giants

Feature SPMP Laravel/CodeIgniter
Learning Curve Minimal Moderate
Dependencies None Composer/Packages
Customization vQmod (non-invasive) Edit core files
AI Integration Built-in readiness Requires setup

SPMP isn’t here to replace Laravel—it’s here to fill a niche: lightweight, secure, and AI-collaborative systems.

7. Challenges to Consider

  • Community Size: SPMP’s ecosystem is young. You’ll trade Laravel’s vast packages for simplicity.
  • Scalability: Best for small-to-medium projects. Giant enterprises might need more firepower.

Conclusion: Why SPMP Matters

In a world where AI is reshaping development, SPMP offers a bridge between traditional coding and AI-assisted innovation. Whether you’re building a custom ERP or experimenting with AI-driven workflows, SPMP gives you the tools to move fast, stay secure, and keep your codebase clean.

Ready to try SPMP?

The future of PHP frameworks isn’t just about features—it’s about collaboration. SPMP is leading the charge.

Call to Action

Have you tried SPMP? Share your thoughts below or tweet your first project with #BuiltWithSPMP! 🚀

Popular

Institutional Value Index (IVI)

Formal Definition      The Institutional Value Index (IVI) is a multidimensional metric system that quantifies the vitality, coherence, and transmissibility of belief-based value within and around an institution.      It measures the degree to which an organization’s philosophy, behavior, and symbolic expression remain aligned across internal and external ecosystems, thereby predicting its capacity for long-term resilience and cultural endurance. 1. Conceptual Essence      Where the IVC defines how value flows, and the CCV System defines where it originates and reflects, the IVI defines how strong and stable that flow is.      In essence, IVI is the heartbeat of institutional meaning — converting the intangible (belief, trust, resonance) into a numerical signature that can be compared, tracked, and improved. 2. Structural Composition      The IVI aggregates six value strata (from the IVC) into ...

Company-Client-Value (CCV) System

Formal Definition      The Company–Client–Value (CCV) System is a relational framework that defines the dynamic equilibrium between the origin of belief (the company), the recipient and mirror of belief (the client), and the shared symbolic core (the value).      It models how institutional meaning is co-created, transmitted, and stabilized between organizations and their external constituencies, forming the fundamental triad that underlies every economic, cultural, or ideological ecosystem. 1. Conceptual Essence      The CCV system asserts that all sustainable institutions are founded on a shared value field;  an implicit agreement of meaning between producer and participant.      The company originates and expresses a value; the client perceives, validates, and reciprocates it. Between them stands the value itself,  the symbolic medium that both sides recognize as true.      When all three p...

linux firsts

i came across the linux timeline in wikipedia and learned that there are three major distros(distributions) where most of them came from. debian slackware redhat ubuntu, KNOPPIX and gibraltar are some of the distros that were based from debian. i would say it's a cross between slackware and redhat - and that's based from some of my research. i just dont have time to post details madriva, fedora and the "philippines distro" bayanihan are based from redhat. a very corporate feel and stable distro if you ask me slackware, which was the basis of openSuSE and vector, is a hobbyist distro basing from its history. althought, its support and community are as stable.