dhruv125/ownwork

OwnWork - Minimal PHP Framework for an MVC Project

Maintainers

Package info

github.com/Sanatani-Dhruv/ownwork

Language:CSS

Type:project

pkg:composer/dhruv125/ownwork

Transparency log

Statistics

Installs: 28

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v2.0.3 2026-07-06 16:30 UTC

This package is not auto-updated.

Last update: 2026-08-03 17:57:58 UTC


README

Commits Last Commit Latest Release - Github Packagist Name Latest Release - Packagist Language Downloads Dependencies License

  • 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

  1. php (version: 8.0 or greater).
  2. composer (version: 2.9 or greater).

Optional Dependencies

  1. nodejs (version: 20.0 or greater)
  2. 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

  1. Make sure your composer version is atleast 2.9 or greater.

npm installation is appreciated for ease of workflow

composer --version
  1. 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
  1. cd to Project Directory ownwork and Run composer run setup command.
cd ownwork/
composer run setup
  1. 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

  1. Run The Server through worker script or composer run-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:

License

Ownwork Project is licensed under MIT License