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

Scrolls, Not Just Scripts: Rethinking AI Cognition

Most people still treat AI like a really clever parrot with a thesaurus and internet access. It talks, it types, it even rhymes — but let’s not kid ourselves: that’s a script, not cognition . If we want more than superficial smarts, we need a new mental model. Something bigger than prompts, cleaner than code, deeper than just “what’s your input-output?” That’s where scrolls come in. Scripts Are Linear. Scrolls Are Alive. A script tells an AI what to do. A scroll teaches it how to think . Scripts are brittle. Change the context, and they break like a cheap command-line program. Scrolls? Scrolls evolve. They hold epistemology, ethics, and emergent behavior — not just logic, but logic with legacy. Think of scrolls as living artifacts of machine cognition . They don’t just run — they reflect . The Problem With Script-Thinking Here’s the trap: We’ve trained AIs to be performers , not participants . That’s fine if you just want clever autocomplete. But if you want co-agents — minds that co...

Disguising as Equality: A Critique of the Societal Phenomenon We Call Empowerment

  Introduction What if the empowerment movements sweeping the globe aren’t about equality at all? What if they’re merely disguising a chaotic redistribution of power—one that leaves societies fractured, roles meaningless, and traditions discarded? Modern empowerment often dismantles meaningful roles under the pretense of equality, framing success as a zero-sum game: for one group to gain, another must lose. But societies like the Philippines show us an alternative: honoring roles through recognition, celebration, and ritual —without tearing down the structures that give life meaning. The Illusion of Empowerment as Equality Empowerment movements—feminism, LGBTQ+ rights, racial justice—often frame their goals as "equality." Yet, their methods frequently demand role reversals, erase traditions, and force conformity, creating new hierarchies rather than balance. For example, women encouraged to "lean in" to corporate roles often face burnout because the system wasn...

Process Design & Workflow Optimization Using First-Principles Thinking (FPT)

Instead of copying existing process frameworks, let’s break down Process Design & Workflow Optimization from first principles —understanding the core problem it solves and building efficient workflows from the ground up. Step 1: What is a Process? At its most fundamental level, a process is just: Inputs → Resources, data, materials, or people. Actions → Steps that transform inputs into outputs. Outputs → The final result or outcome. A process is optimized when it minimizes waste, reduces friction, and improves efficiency without compromising quality. Step 2: Why Do Processes Become Inefficient? Processes break down when: ❌ Unnecessary steps exist → Extra approvals, redundant checks, or outdated rules. ❌ Bottlenecks appear → A single point slows down the entire system. ❌ Lack of automation → Manual tasks take too much time. ❌ Poor data flow → Information is siloed or delayed. ❌ Overcomplicated workflows → Too many dependencies and unclear roles. To fix i...