dhruv125 / ownwork
OwnWork - Minimal PHP Framework for an MVC Project
Package info
github.com/Sanatani-Dhruv/ownwork
Language:CSS
Type:project
pkg:composer/dhruv125/ownwork
v2.0.3
2026-07-06 16:30 UTC
Requires
- php: ^8.0
- dhruv125/coretex: ^1.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.
- Amazing Blade like View templating Engine
Dependencies
- php (version: 8.0 or greater).
- composer (version: 2.9 or greater).
Optional Dependencies
- nodejs (version: 20.0 or greater)
- npm (version: compatible with nodejs)
Structure
ownwork ├── app │ ├── Controller # Your Controllers directory │ │ └── UserController.php │ ├── Http # Your Controllers directory │ │ └── Kernel.php # Main module running your Organising Routes, Middlewares, responses, etc. │ └── Model # Your Models directory │ └── UserModel.php ├── bundle # Files Which run when starting ownwork, like loading dotenv, etc │ ├── Bundler.php # This File Bundles your App │ ├── Helper.php # Global Helper Functions are defined here │ └── Routes.php # Your Routes are defined here ├── composer.json ├── composer.lock ├── node_modules ├── package-lock.json ├── package.json ├── public # This Directory will be exposed to User Side, Static Assets should be placed in it │ ├── .htaccess # Config file for Apache web server │ ├── build # Will contain build file of Tailwind CSS │ ├── index.php # Entry level file, starting point of App │ └── styles │ └── tailwind.default.css # Compiled CSS file for default page(don't delete this file) ├── resources │ ├── appviews # Views required by OwnWork like error pages │ │ ├── error_layout.php │ │ ├── no-info-error.php │ │ ├── script │ │ │ └── script.js │ │ ├── stackTrace-block.php │ │ └── styles │ │ └── index.css │ ├── css │ │ └── tailwind.css # Default tailwind source file │ ├── template # Default Templates for Component's like controller, view, model │ │ ├── Controller.php # Default Controller template │ │ ├── Model.php # Default Model template │ │ └── View.php # Default View template │ ├── views # Your Views directory │ └── views.json # Contains mapping of template files to their compiled form ├── vendor # Application dependecies and autoloader directory │ ├── autoload.php # Include this to autoload files │ ├── other_dependencies... │ └── dhruv125 │ └── coretex # Main Coretex module, installed upon 'composer run setup'. │ ├── composer.json │ ├── composer.lock │ └── src │ ├── ConsoleHelper.php # Command Line Helper │ ├── Environment # Setting Environment like Loading .env │ │ ├── DotEnvironment.php │ │ └── Environment.php │ ├── Exceptions # Exceptions used by framework and coretex itself. │ │ ├── InternalErrorException.php │ │ ├── PageNotFoundException.php │ │ ├── ViewJsonNotFoundException.php │ │ └── ViewNotFoundException.php │ ├── Handler │ │ └── GlobalErrorHandler.php # If Error Goes unhandled, this handles it. │ ├── Helper.php │ ├── Pager.php # Contain Methods to display error pages │ ├── Router # Route Related Files │ │ ├── Route.php │ │ └── RouteResolver.php │ ├── Support # Request, Response Objects │ │ ├── Request.php │ │ └── Response.php │ ├── Templater # Templating Engine for '.temp.php' files │ │ └── Template.php │ └── Viewer # View related operations, like displaying and fetching transpiled views │ └── View.php └── worker # Your Command Line Manager
Installation
- Make sure your composer version is atleast 2.9 or greater.
npm installation is appreciated for ease of workflow
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 orcomposerrun-script
composer run dev # or # 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
- Run the view template transpiler in another terminal
php worker transpile # or # composer run transpile
if You have npm installed, all this process can be avoided
- Run below command to install dependencies:
npm i
- After Successful installation message, whenever you want to run server + transpiler + tailwind dev server, run the command:
npm run dev
Documentation
Documentation is incomplete
- 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 Link
License
Ownwork Project is licensed under MIT License