dhruv125 / ownwork
OwnWork - Minimal PHP Framework for an MVC Project
v1.0.4
2026-03-06 10:20 UTC
Requires
- php: ^8.0
README
- Don't go into major dependencies rabbit hole.
- Build your MVC app with PHP.
- Simple Routing.
- Easier View Creation.
- Build a Large Web App with minimal but useful base.
Dependencies
- php (version: 8.0 or greater).
- composer (version: 2.9 or greater).
Structure
ownwork ├── app │ ├── Controller # Your Controllers directory │ │ └── UserController.php │ ├── Helper # This file includes Helper and Support Files which handles important functions like Routing, Viewing │ │ ├── AppViews # Views Required by OwnWork like Error Pages │ │ │ ├── general-notfound-error.php │ │ │ ├── styles │ │ │ │ └── index.css │ │ │ └── view-notfound-error.php │ │ ├── ConsoleHelper.php # Pretty Printing for Console │ │ ├── Router │ │ │ └── Route.php # This File handles Routing, should not be modified, unless you know what you do. │ │ └── Viewer │ │ └── View.php # This File handles calling views, should not be modified, unless you know what you do. │ └── Model # Your Models directory │ └── UserModel.php ├── bundle # Files Which run by you in manual manner to handle certain things like env, helper function routes │ ├── Bundler.php # This File Bundles your App │ ├── Environment # Directory Which Setups your Environment Settings │ │ ├── DotEnvironment.php │ │ └── Environment.php │ ├── HelperFunction.php # Global Helper Functions are defined here │ └── Routes.php # Your Routes are defined here ├── composer.json ├── composer.lock ├── public # This Directory will be exposed to User Side, Static Assets should be placed in it │ ├── build │ ├── index.php # Entry Level File, Starting Point of App │ └── styles │ └── index.css ├── resources │ ├── scripts │ ├── styles │ ├── template │ │ ├── Controller.php # Default Controller Template │ │ ├── Model.php # Default Model Template │ │ └── View.php # Default View Template │ └── views # Your Views directory │ ├── main.php │ └── welcome.php ├── vendor # Application Dependecies and autoloader directory │ └── autoload.php # Include this to autoload files └── worker # Your Command Line Manager
Installation
- Make sure your composer version is atleast 2.9 or greater.
composer --version
- Run the Composer Command to Create Project
composer create-project dhruv125/ownwork # Or # composer create-project dhruv125/ownwork ProjectName # This is will create project in ProjectName Directory
- cd to Project Directory
ownworkand Runcomposer run setupcommand.
cd ownwork/
composer run setup
- Edit .env file.
APP_NAME=Ownwork
DB_NAME=mysql
DB_HOST='127.0.0.1'
DB_USER=root
DB_PASS=
That's it, your OwnWork application is ready to run it's Hello World Program.
Usage
- Run The Server through
workerscript
php worker serve
- Supposed Output:
Starting OwnWork server at port:8000... [Mon Jan 01 00:00:00 2026] PHP 8.2.XX Development Server (http://localhost:8000) started
Or
Just Run Command
composer run dev
Documentation
- Go through Documentation of OwnWork Here!
Recommended Packages
- Since our OwnWork is really minimal Framework, you may require other packages for functionality like Database interactions.
- Recommendations are:
delight-im/db: For database interaction - Github Linkphpunit/phpunit: For testing - Github Linkilluminate/support: For Illuminate Support like in Laravel
License
Ownwork Project is licensed under MIT License