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

rhymin

i got stuck with words on this song that i want to finish by tomorrow. i have no instrument to use so im hoping to finish at least the lyrics. sad part is my rhyming brain is not that functional right now. so, i headed online to look for some sites or software that can help. here's what i got: analogx.com 's rhyme came to mind first as it's what i used before. a simple to install software that returns numerous results that, most of the time, ends up confusing. good thing is you can use it offline. so i started searching. 3d2f and the next one got my attention. but let me pour my heart out on this one first. one word: confusing! it gave me more list to figure out. so click on the first. then it lead me to several pages before i get to download. then, i have to figure out which of the links i needed. then after few minutes, i found it only to be more confused... i am to download a 249MB of a .dmg which turned out to be for mac engines and not for windows. i know, right?! w...

learning linux

i've always wanted to learn linux for years. but i'm still stuck with this crappy w!ndows v!sta - yes, v!sta. the crappiest of them all. and now that i have some time and a spare laptop to use, i managed to install ubuntu studio . why ubuntu studio? i just got fascinated with the programs it came with. the first thing i checked was if i could go online, wireless that is. sad to say, the browser couldn't fetch anything. fortunately, getting the laptop wired got me online. and that's one less trouble for me. now, the problem at hand is that there is no wireless connection. solution - search the web. i landed on ubuntuforums.com and found out that ubuntu studio doesn't install the gnome network manager which is like the "view available networks" on xp and "connect to a network" on v!sta. so, lets just install it. i mean, lets try to install it. next: installing a program in linux

Understanding the Economic Implications of Artificial Intelligence

The use of Artificial Intelligence (AI) is increasing in the modern economy, and it is having a huge impact on our daily lives. While AI offers many benefits, it also has some economic implications that the average middle income person should understand.  First, AI has the potential to automate many jobs. This means that some people may find themselves out of work as their jobs are replaced by machines. This could have a detrimental effect on the economy as a whole, as fewer people are employed and more money is taken out of circulation. Additionally, AI could also lead to greater inequality in our society, as those with higher levels of education and skill may benefit more from automation than those with lower levels of education and skill. Second, AI can also create new markets and opportunities for businesses. Companies are using AI to develop new products and services, and this can lead to increased profits and growth. AI can also be used to increase efficiency in production pr...