The official skeleton application for the JiNexus Framework. Use it as a starting point to build MVC applications with the JiNexus component stack (mvc, http, route, config, module-manager).
- Documentation: https://framework.jinexus.com/documentation
- Issues: https://github.com/jinexus-framework/jinexus-framework-skeleton/issues
- PHP
^8.5 - Composer
- Apache
mod_rewrite(or equivalent for your web server) - PHP
mbstringextension
Create a new project with Composer:
composer create-project jinexus-framework/jinexus-framework-skeleton path/to/my-projectThis downloads the skeleton and its dependencies, generates the directory layout, and configures autoloading — your application is ready to run.
Make the cache directory writable by the web server:
chown -R www-data:www-data path/to/my-project/data/cache
chmod -R g+rwX path/to/my-project/data/cacheStart the built-in PHP development server from the project root:
# Via Composer (recommended)
composer run --timeout=0 serve
# Or directly with PHP
php -S localhost:8000 -t publicBrowse to http://localhost:8000. You should see the default application page.
config/
application.config.php Module list for the application
modules.config.php Enabled module namespaces
module/
Application/
config/
module.config.php Route and view-manager configuration
src/
Module.php Application module class
Controller/
IndexController.php Default controller
view/
application/index/ View templates
error/ Error page templates
layout/ Layout templates
public/
index.php Front controller (document root)
.htaccess Apache rewrite rules
asset/ Static assets
test/
Application/ Unit tests mirroring the module structure
data/
cache/ Cache directory (must be writable)
- Create a namespace directory under
module/, e.g.module/Blog/src/. - Add a
Moduleclass extendingJiNexus\ModuleManager\ModuleManager\AbstractModulethat returns its config fromgetConfig(). - Register the namespace in
config/modules.config.php. - Add any routes, controllers, and view templates following the
Applicationmodule pattern.
Create a class under module/<Name>/src/Controller/ extending
JiNexus\Mvc\Controller\AbstractController. Action methods return a ViewModel:
namespace Application\Controller;
use JiNexus\Mvc\Controller\AbstractController;
use JiNexus\Mvc\Model\ViewModel;
class IndexController extends AbstractController
{
public function indexAction(): ViewModel
{
return new ViewModel([
'helloWorld' => 'Hello World!',
]);
}
}Register the route in the module's module.config.php.
composer test # or: ./vendor/bin/phpunit
composer test:coverage # text coverage reportThe suite is configured via phpunit.dist.xml. Use XDEBUG_MODE=off to silence the
local Xdebug notice, and --testdox for readable per-test output:
XDEBUG_MODE=off ./vendor/bin/phpunit --testdoxTests are under test/Application/ mirroring the module/Application/src/ structure.
The source ships at 100% line, method, and class coverage.
Please see CONDUCT.md for the code of conduct. Contributions should include
tests and a CHANGELOG.md entry. See AGENTS.md for detailed build, style,
and workflow conventions.
BSD-3-Clause. See LICENSE.md.