bravedave / dvc
DVC - General Purpose PSR-4 Data-View-Controller
Requires
- php: >=8
- ext-ctype: *
- ext-fileinfo: *
- ext-json: *
- ext-mbstring: *
- ext-posix: *
- ext-session: *
- giggsey/libphonenumber-for-php: ^8.11
- league/commonmark: ^2.4
- matthiasmullie/minify: ^1.3.61
- matthiasmullie/scrapbook: ^1.5
- nyholm/psr7: ^1.8
- nyholm/psr7-server: ^1.1
- symfony/mailer: ^7.1
- tijsverkoyen/css-to-inline-styles: ^2.2
Requires (Dev)
- ext-apcu: *
This package is auto-updated.
Last update: 2026-06-11 12:48:08 UTC
README
DVC is a lightweight, PSR-4-compliant PHP framework for building modern web applications and APIs. It comes pre-configured with Bootstrap but is flexible enough to work with any front-end you prefer.
📚 Documentation: https://brayworth.com/docs
🚀 Features
- MVC Architecture – Clean separation of concerns (Models, Views, Controllers)
- Built-in CLI Tool – Generate controllers, serve your app, and more
- Bootstrap-Ready – Ships with Bootstrap, easily replaceable
- Simple & Modern – No heavy abstractions, just solid structure
AI Coding in This Repo
- AI onboarding and governance: .github/AI-README.md
- AI tooling index: .github/AI-CODING-INDEX.md
- Primary coding standard: .github/copilot-instructions.md
- API contract parity standard: .github/prompts/api-contract-maintenance.standard.md
- AI context rule: In any folder,
README.mdis authoritative for that folder and should be read before planning or making changes there. - Exception: In
.github/, use.github/AI-README.mdas the authoritative governance document.
🛠️ Getting Started
Requirements
- PHP 8.0 or higher
- Composer
↓ Installation
1. create a composer.json
The application relies on the composer autoload features, this (very) basic composer.json file tells the autloader where to look for this application and installs bravedave/dvc
composer.json
{
"require": {
"bravedave/dvc": "*"
},
"autoload": {
"psr-4": {
"": "src/app/"
}
}
}
2. install the dependencies, create application and run the Dev server
composer u vendor/bin/dvc make::application vendor/bin/dvc serve
Then open http://localhost:1265 in your browser.
🎓 Tutorial
- there is a tutorial here
🧰 Command-Line Interface (CLI)
DVC includes a CLI tool to help you scaffold components and run useful commands.
Usage
php vendor/bin/dvc [command] [options]
Available Commands
-
serveStart a local PHP development server -
make::applicationCreates basic application structures includingpublicfolder andsrc/app/application.phpfile -
make::module <Name>Generate a module framework insrc/app/<Name>and a controller stub incontrollers
Example
vendor/bin/dvc make::module blog
- Creates
src/app/blog/controller.phpandsrc/controller/blog.phpwith a boilerplate structures. - Which is available to view at http://localhost:1265/blog in your browser.
📁 Folder Structure
src/
├── app/
│ ├── <module>/controller.php
│ └── <module>/views/..
├── controllers/
├── public/
│ └── _mvp.php
├── vendor/
│ └── bin/dvc
├── composer.json
└── README.md
📄 License
Licensed under the MIT License.