Abstract Modern Content Management Systems (CMS) have become increasingly complex, often relying on heavy relational databases and monolithic plugin architectures to serve simple content needs. This paper introduces mvcms-lite, a lightweight, flat-file CMS architecture strictly adhering to the Model-View-Controller (MVC) design pattern. By leveraging native file systems for storage and a minimalist routing engine, mvcms-lite demonstrates that secure, scalable, and maintainable web applications can be built without the overhead of traditional database drivers or administrative bloat.
In the sprawling ecosystem of web development, frameworks like Django, Ruby on Rails, and Spring Boot offer immense power but often at the cost of steep learning curves and significant overhead. For the student, the hobbyist, or the developer building a lightweight prototype, such complexity can be a barrier. Enter MVCMCS-Lite—a conceptual architectural pattern that distills the classic Model-View-Controller (MVC) methodology into its purest, most accessible form. While not a single, off-the-shelf product, “MVCMCS-Lite” represents a philosophy of minimalism: maintaining separation of concerns without the weight of enterprise tooling. Its core value lies in demonstrating that good architecture is a matter of discipline, not dependency.
The Controller acts as the traffic cop. It is the only entry point for the application, handling URI routing and business logic. mvcms-lite
index.php file utilizes URL rewriting (Apache/Nginx) to capture requests. It maps URIs to specific Controllers.
GET /posts/welcome maps to Controllers/PostController.php.The primary advantage of MVCMCS-Lite is pedagogical clarity. For a beginner, opening a full Laravel or Spring project can be overwhelming, with its dependency injection, middleware stacks, and service providers. MVCMCS-Lite exposes the raw request-response cycle. The student sees exactly: “This URL hits this controller function, which queries the database (the Model) and then renders this HTML file (the View).” This transparency builds foundational understanding.
Furthermore, performance can be surprisingly high. Without an ORM’s lazy loading or a framework’s autoloading overhead, MVCMCS-Lite applications can serve requests with minimal memory footprints. For small-to-medium projects—like a personal blog, a survey tool, or an internal dashboard—the lack of abstraction means faster execution and easier debugging. Routing: A single index
Finally, maintainability is enhanced for the solo developer or small team. Because the separation of concerns is strict but simple, a developer can locate a bug quickly: incorrect data? Check the Model. Wrong HTML? Check the View. Strange routing? Check the Controller. There are no magic annotations or convention-over-configuration puzzles to solve.
Unlike traditional CMS platforms that interact with MySQL or PostgreSQL, mvcms-lite utilizes a Flat-File ORM (Object-Relational Mapper). with its dependency injection
.md (Markdown) files with a YAML Front Matter header. This allows data to be human-readable and version-controllable via Git.Model layer does not execute SQL queries. Instead, it parses directory structures and file contents.Example Data Structure (content/posts/welcome.md):
---
title: Welcome to mvcms-lite
date: 2023-10-27
layout: post
tags: [php, architecture]
---
# Hello World
This is the body content rendered from Markdown.
A common critique of flat-file systems is I/O speed. mvcms-lite addresses this through:
.index file containing a JSON map of all content URLs and metadata. This allows the router to find content without scanning directories.