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

Conversations with Grok (Part 5): Let's Talk AI Agents

Be updated and read the previous part here:  Conversations with Grok (Part 4): Turning Startup Me: Next move? Let let you in on a secret. It's not just routeless and hub-less. I'm building these AI agents for a complete overhaul from mass transport to Agile Transportation: Dynamic Route Optimization Agent, Demand Prediction & Load Balancing Agent, Passenger Scheduling & Booking Assistant, Autonomous Vehicle Navigation Agent, AI-Based Traffic Management Agent, Customer Feedback & Experience Agent, Fleet Maintenance & Diagnostics Agent, Smart Fare Pricing Agent, Driver Assistance & Safety Monitoring Agent and an AI-Based Reporting & Analytics Agent. What do you think? Grock : Wow, Movex sounds like an incredibly ambitious and innovative project! You're not just reimagining transportation in BGC, Manila—you're creating a comprehensive, AI-driven Agile Transportation System that could set a new standard for urban mobility. I love the vision of a rout...

Setting Up Your Own Local AI System: A Beginner's Guide

Hey there! Ever thought about running your own AI system right on your computer? I have, and trust me, it’s not as complicated as it sounds. Together, let’s break it down step by step and set up a local AI system—just like ChatGPT—to handle all sorts of tasks. Oh, and full disclosure: ChatGPT helped me with this guide (because why not?). Why Set Up a Local AI? Before we dive in, you might wonder, why bother setting up AI locally? Here are a few good reasons: Privacy : Keep your data on your own device without relying on external servers. Cost Savings : Avoid subscription fees for cloud-based AI services. I'm thrifty like that. Customization : Mod the AI to suit your specific needs and preferences. Offline Access : Use the AI anytime, even without an internet connection. Think "J.A.R.V.I.S." Convinced? Great. Let’s move on! Step 1: Get to Know the Basics First things first, let’s understand some key concepts: AI Models : These are pre-trained systems capable of tasks like ...

Conversations with Grok (Part 6): For Drivers

Be updated and read the previous part here:  Conversations with Grok (Part 5): Let's Talk AI Agents Me: Let's talk resistance: why would drivers and regulators might fight it? Grok : Resistance from drivers and regulators is a real hurdle for Movex, especially in a place like Manila where transportation is deeply tied to livelihoods and bureaucracy. Your vision of an AI-driven, routeless, hub-less Agile Transportation System is transformative, but that very transformation threatens entrenched interests and established systems. Let’s break down why drivers and regulators might push back—and what’s driving their concerns. Why Drivers Might Fight It Drivers—especially jeepney, tricycle, and taxi operators in BGC and beyond—could see Movex as a direct threat. Here’s why: 1. Job Displacement Fears   The Concern: Your Autonomous Vehicle Navigation Agent hints at self-driving vans. Even if you start with human drivers, the perception is that Movex could phase them out. Jeepney d...