CodeIgniter 4-based application skeleton

Overview

Bonfire 2

Just getting started. More details at Patreon

What is Bonfire?

Bonfire will be a robust application skeleton for CodeIgniter 4-based applications. It provides a number of helpful libraries to assist you in making better software for your clients, faster, while allowing you to focus on the new parts that matter to each specific application.

Currently includes the following features:

  • Theme/template system, that ships with a flexible Auth and Admin theme.
  • View Components to reduce the complexity of your UI by allowing you to create reusable HTML snippets, that can be optionally controlled via code.
  • A Settings library that allows you to save config file values to the database and access them whether they're in the db or just in the files.
  • Resource Filter system to make filtering lists of User, Post, etc, simple to implement and with a comfortable, consistent UI.
  • A powerful, very customizable, user authentication/authorization system, Shield.
  • and more to come...

Server Requirements

This currently has the same requirements as CodeIgniter 4.

Third Party Software Used

Comments
  • - Initial dashboard widget system

    - Initial dashboard widget system

    A little color in the dashboard :)

    widgets

    Following the way you created the menus, I tried to create a widget system that, via Dependency Injection, allows you to add statistics, graphs, etc. on the dashboard

    In the Bonfire class I added:

    	/**
    	 * Creates any admin-required widgets so they're
    	 * available to use by any modules.
    	 */
    	private function setupWidgets()
    	{
    		$widgets =  service('widgets');
    
    		$widgets->createWidget(Stats::class, "stats");
    		$widgets->widget("stats")
    			->createCollection("users");
    		$widgets->widget("stats")
    			->createCollection("groups");
    		$widgets->widget("stats")
    			->createCollection("other");
    	}
    

    The configuration takes place within each single module, which can decide to expose a widget in the isAdmin () function

    For example, in the user module I added:

    		// Settings widgets stats on dashboard
    		$widgets = service('widgets');
    		$users = new UserModel();
    		$statsItem = new StatsItem([
    			'bgColor' => 'bg-blue',
    			'title' => 'Users',
    			'value' => $users->countAll(),
    			'url' => ADMIN_AREA . '/users',
    			'faIcon' => 'fa fa-user',
    		]);
    		$widgets->widget("stats")->collection('users')->addItem($statsItem);
    

    It is an initial version, but working.

    Graphics are adaptive on a per-device basis.

    What do you think?

    opened by atsanna 16
  • Composer install Ci bonfire2 error when starting

    Composer install Ci bonfire2 error when starting

    After a fresh installation of Ci bonfire2 and startup of the php spar server -> localhost:8080, the system reports an error

    mysqli_sql_exception #1054

    Unknown column 'auth_identities.secret' in 'where clause' databese table is 'bf'_ prefixed as you see from other code

    slika

    opened by colonelo 12
  • View Components need refactoring

    View Components need refactoring

    Currently, use paired tags (<x-foo></x-foo>) only works when we override an ini setting. This works fine when you run your own server, but anything on shared hosting will crap out. It does this to store the info in the middle $slot of the tags, and hits PHP's built-in limits, so I've currently got those turned off.

    This needs to be refactored to get around this.

    One idea I've had (and is just something rumbling around inside my head) would be to modify the preg_replace_callback() being currently used to modify the tag name with a unique id. It would then save the info needed to replace those tags with. This helps ensure that the correct opening/closing tags are discovered, and then the open and close tags would have to be modified separately.

    Not sure if this would work as I think, and I have a feeling it would maybe lose out on some features, but I wanted to include it here so I didn't forget it when I could come back to it. Or if anyone else beats me to it.

    opened by lonnieezell 7
  • feat(component-renderer): look for components in default paths as fallback

    feat(component-renderer): look for components in default paths as fallback

    Hey @lonnieezell, I've made a not so interesting change in order to create the PR for discussion.

    After the comment I've made (https://github.com/lonnieezell/Bonfire2/issues/5#issuecomment-908423807), I now realize that the structure of Bonfire2 is quite different from what I have, so I'd like to know what you are thinking about when locating view components.

    If I understand correctly, in Bonfire2, each view in a theme can access the local components in the theme folder. And it would be nice to have a way to access common base components like buttons, links, form elements, or whatever to use across themes? So, one way would be to consider the default views folder a good place to put them, or even a Components folder directly in the default app path or themes path? Or another way would be to add a Components config file where we would add other discovery paths?

    Also, I'm thinking maybe we would want to share common components to multiple themes but not all. For instance, Admin and Auth themes would have the same base components that the App would not need/share. So maybe the configuration should be done in the Theme class?

    One more thing, when locating components, the Theme class is called to get the path, creating a coupling that may not be ideal for the future view components library.

    I don't use themes for my project yet, I have a ViewComponents config file where I put the paths to look in. Then, I compare them with the current view path when locating the Components.

    Anyways, sorry for the long comment, still trying to figure things out 😅

    opened by yassinedoghri 6
  • Bug in bonfire/Modules/Tools/Views/index.php

    Bug in bonfire/Modules/Tools/Views/index.php

    There is a bug with this View component such that if there is a file in the writable directory, it shows up as a number instead of the file's name (and is always unwritable.) This is due to how directory_map() returns results. I have a simple fix to address this and can issue a PR, but I was wondering if we couldn't improve the Filesystem section of the System Info admin area a bit to make it more useful. For instance, since file and directories can exist in the writable area, identifying whether something is a file or directory would be helpful. Perhaps create/last modified timestamps?

    opened by jeffstoner 5
  • Cookie bf_consent does not initially exist

    Cookie bf_consent does not initially exist

    Great work Lonnie PHP: 8.1.4 File: ConsentFilter.php

    $cookie      = get_cookie('bf_consent');
    $permissions = json_decode($cookie, true);    // Fails here because $cookie is NULL.  $cookie cannot be null, deprecated.
    
    // Do we already have consent from the visitor?
    // then nothing to do here...
    if ($permissions['consent'] ?? false) {
         return;
    }
    

    Presume just need to check for null and if so go straight to consent form

    opened by robertkendrick 4
  • Bonfire 2 web hosting

    Bonfire 2 web hosting

    Maybe I was one of the first to play around with installing bonfire 2 on web hosting.

    On my testing environment localhost via apache xampp environment httpd-vhosts everything works for me because I have access to apache config files. However, we know that we do not have access to apache config (eg httpd-vhosts etc) files on the hosting, except local .htacces.

    So I read the instructions on how to set up the case via .htacess I set it to the root folder /domains/brikelli.eu/public_html/ci4 where the bonfire 2 application is installed - ci4.brikelli.eu

    .Htaccess content

    RewriteEngine on RewriteCond% {HTTP_HOST} ^ ci4.brikelli.eu $ [NC, OR] RewriteCond% {HTTP_HOST} ^ ci4.brikelli.eu $ RewriteCond% {REQUEST_URI}! / App / public / RewriteRule (. *) / App / public / $ 1 [L]

    The BONFIRE settings on the host are

    .env setting is app.baseURL = 'http://ci4.brikelli.eu/' App setting is public $ baseURL = 'http://ci4.brikelli.eu/';

    If you click on URl http://ci4.brikelli.eu/

    The call works by calling the dasboard However, when I click login, the call loses the status 404 not found

    I ask for an expert opinion. I can also help with instructions if you guide me. We definitely need to make instructions for other users not to waste time with installations but to develop applications with this system. I am sure that this way more users will join.

    i read a lot on the forums i think they need to make uniform instructions

    Matteo, Ljubljana Slovenia

    opened by colonelo 4
  • [Recycler]  Add javascript function to manage dropdown with multiple resources

    [Recycler] Add javascript function to manage dropdown with multiple resources

    I have created a new module to test the Recycler.

    I noticed that a drop-down menu appears, but the javascript part is missing ...

    I thought about implementing it, adding a javascript file inside the Recycler module;

    I thought it was the best place to place it ...

    I hope it will be useful.

    opened by atsanna 4
  • New installation problem: missing composer package codeigniter4/codeigniter4

    New installation problem: missing composer package codeigniter4/codeigniter4

    I encountered an error following the steps outlined in the guide due to missing some requirements. I tried to fix it, but without success.

    These are the steps I performed:

    1. composer create-project codeigniter4/appstarter my-app --dev
    2. add "minimum-stability": "dev" in to composer.json:
    3. composer update
    4. composer require lonnieezell/bonfire --dev

    lonnieezell/bonfire dev-develop requires codeigniter4/codeigniter4 dev-develop -> could not be found in any version, there may be a typo in the package name.

    opened by atsanna 3
  • Email parameters and send mail  via magic-link

    Email parameters and send mail via magic-link

    I have made my own settings in the email bonfire, slika

    however, the e-mail sending procedure wants to be sent via other parameters, The program does not return an error to the user, but it is in the system log

    slika

    LOGS

    Logs

    Severity | Message -- | -- error | Email: sendWithMail throwed mail(): Failed to connect to mailserver at "localhost" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

    opened by colonelo 3
  • scss  folder inside themes/Admin is missing ??

    scss folder inside themes/Admin is missing ??

    webpackmix.js points to the missing scss directory in themes / Admin. There is already a css file already generated. package.json is missing to generate from IDE (npx mix watch)

    Thank you

    https://github.com/lonnieezell/Bonfire2/blob/6420c8acb0f1a3b99a730ed39c17f072497f30e0/webpack.mix.js#L4

    opened by churavka 3
  • Bump phpstan/phpstan from 1.9.2 to 1.9.7

    Bump phpstan/phpstan from 1.9.2 to 1.9.7

    Bumps phpstan/phpstan from 1.9.2 to 1.9.7.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.9.7

    Bleeding edge 🔪

    If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

    includes:
    	- vendor/phpstan/phpstan/conf/bleedingEdge.neon
    

    Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

    Improvements 🔧

    Bugfixes 🐛

    Function signature fixes 🤖

    Internals 🔍

    1.9.6

    Improvements 🔧

    Bugfixes 🐛

    1.9.5

    ... (truncated)

    Commits
    • 0501435 PHPStan 1.9.7
    • 707c831 Updated PHPStan to commit d279f388f5a1cb7a6f821dbecc4052a9ebbb8417
    • 23daeff Updated PHPStan to commit 091fcafb07ac0b3eb261285c049d9c0f214a535c
    • 1a28725 Updated Composer baseline
    • af72eaa Updated PHPUnit baseline
    • c0d39c1 Updated PHPStan to commit 28c2c79b16cac6ba6b01f1b4d211541dd49d8a77
    • 45dbb01 Updated PHPStan to commit 752baaf49f65586b79ab24d5beb4b385c65a281c
    • 7f88292 Updated PHPStan to commit 02753c6883677edd87d40f397f057daddd103a05
    • b4c0d3f Updated PHPStan to commit 6debffdb5892f7fb311a60634ec9cda79b6e3154
    • 92ac649 Reproduce progress bar crash if all passed paths to analyse are excluded
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 0
  • chore: fix phpunit.xml coverage.exclude

    chore: fix phpunit.xml coverage.exclude

    Fix the following error:

    Generating code coverage report in Clover XML format ... Call to undefined method SebastianBergmann\CodeCoverage\CodeCoverage::extend()
    Error: Process completed with exit code 2.
    

    https://github.com/lonnieezell/Bonfire2/actions/runs/3798657461/jobs/6460512391

    opened by kenjis 0
  • Bump codeigniter4/framework from 4.2.10 to 4.2.11

    Bump codeigniter4/framework from 4.2.10 to 4.2.11

    Bumps codeigniter4/framework from 4.2.10 to 4.2.11.

    Release notes

    Sourced from codeigniter4/framework's releases.

    CodeIgniter 4.2.11 release.

    See the changelog: https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md

    New Contributors

    Full Changelog: https://github.com/codeigniter4/CodeIgniter4/compare/v4.2.10...v4.2.11

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 0
  • Bump codeigniter/coding-standard from 1.7.0 to 1.7.1

    Bump codeigniter/coding-standard from 1.7.0 to 1.7.1

    Bumps codeigniter/coding-standard from 1.7.0 to 1.7.1.

    Release notes

    Sourced from codeigniter/coding-standard's releases.

    v1.7.1 Coding Standard

    Fixed 🔧

    • Fix php-cs-fixer version to v3.13.0, to avoid changes in binary_operator_spaces brought by v3.13.1

    Please refer to the CHANGELOG for the detailed list of changes.

    Changelog

    Sourced from codeigniter/coding-standard's changelog.

    v1.7.1 - 2022-12-22

    • Fix php-cs-fixer version to 3.13.0
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 0
  • Bump fakerphp/faker from 1.20.0 to 1.21.0

    Bump fakerphp/faker from 1.20.0 to 1.21.0

    Bumps fakerphp/faker from 1.20.0 to 1.21.0.

    Release notes

    Sourced from fakerphp/faker's releases.

    v1.21.0

    • Dropped support for PHP 7.1, 7.2, and 7.3 (#543)
    • Added support for PHP 8.2 (#528)
    Changelog

    Sourced from fakerphp/faker's changelog.

    2022-12-13, v1.21.0

    • Dropped support for PHP 7.1, 7.2, and 7.3 (#543)
    • Added support for PHP 8.2 (#528)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 0
Releases(v1.0.0-beta-1)
Owner
Lonnie Ezell
Lonnie Ezell
CodeIgniter 4 Application Starter

Tensaran-Inventories merupakan website pendataan inventaris di desa Tensaran yang saya buat untuk memudahkan pendataan inventaris di kantor desa Tensaran. Aplikasi ini saya buat untuk memenuhi program kerja Kuliah Kerja Nyata (KKN) 2022

Fikrul Akhyar 1 Aug 18, 2022
This is a skeleton to quickly set up a new Slim 4 application.

Slim 4 Skeleton This is a skeleton to quickly set up a new Slim 4 application. Requirements PHP 7.4+ or 8.0+ MySQL 5.7+ or MariaDB Recommended Apache

Daniel Opitz 376 Jan 2, 2023
Slim Framework 4 Skeleton Application

Slim Framework 4 Skeleton Application Use this skeleton application to quickly setup and start working on a new Slim Framework 4 application. This app

Cleonildo Soares Guimaraes Junior 5 Nov 21, 2021
Reverse proxy skeleton built for docker with traefik, showcasing a Symfony + React application

Decoupled Backend(Symfony) + Frontend(React ts) built with Traefik & Docker Reverse proxy skeleton built for docker with traefik, showcasing a decoupl

Sergiu 1 Dec 13, 2021
A skeleton application using the Zend Framework MVC

This is a skeleton application using the Zend Framework MVC layer and module systems. This application is meant to be used as a starting place for those looking to get their feet wet with Zend Framework.

Zend Framework 1.5k Dec 15, 2022
CodeIgniter 3 + Vue.js 3 + Vite with supported Hot Module Replacement (HMR)

CodeIgniter 3 + Vue.js 3 + Vite Looking for Vue 2? Please check branch vue2 Just a basic example how to integrating CodeIgniter 3 + Vue.js 3 + Vite wi

Nur Muhammad 44 Dec 15, 2022
a simple and secured RESTful API made with codeIgniter and JSON Web Tokens

CodeIgniter 4 Application Starter What is CodeIgniter? CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure. More in

null 2 Oct 8, 2021
Integration of the popular AdminLTE dashboard for CodeIgniter 4

Tatter\AdminLTE Integration of the popular AdminLTE dashboard for CodeIgniter 4 Description This library leverages Tatter\Assets to automate asset dis

Tatter Software 1 Dec 7, 2021
CodeIgniter 4 + Svelte App Starter

CodeIgniter4 + Svelte Application Starter ?? Features: ⚡ Super fast single page application (SPA). ?? Hot Module Replacment (HMR). ?? Easy to install

Mihatori Kei 11 Dec 5, 2022
CodeIgniter 4 + Vue3 App Starter

CodeIgniter 4 + Vue3 Application Starter Features: ?? Super fast single page application (SPA). ?? Hot Module Replacment (HMR). ?? Easy to install and

Mihatori Kei 15 Dec 17, 2022
A skeleton for creating applications with CakePHP 4.x.

CakePHP Application Skeleton A skeleton for creating applications with CakePHP 4.x. The framework source code can be found here: cakephp/cakephp. Inst

Fabiano Araujo 1 Oct 13, 2021
Simple skeleton for the PHP Slim framework

Simple skeleton for the PHP Slim framework

Andrew S Erwin 2 Nov 13, 2021
A skeleton for build your Kata with Docker

A skeleton for build your Kata with Docker

Raúl Coloma Bonifacio 1 Nov 12, 2021
Project skeleton generator for Laravel & Lumen projects

Skeletor Skeletor is a PHP based CLI tool that has been built to take away the pain of setting up a base project skeleton for Laravel & Lumen projects

Wouter 39 Oct 4, 2022
A skeleton WordPress project to be used as a base for new WordPress projects.

BoxUK WordPress Project Skeleton A base WordPress project from Box UK to get you up and running quickly. Installation Create a new project with compos

Box UK 33 Dec 14, 2022
⚡️ This package provides a wonderful PHP skeleton to start building your next package idea.

This package provides a wonderful PHP Skeleton to start building your next package idea. Requires PHP 8.0+ ⚡️ Create your package using Composer: comp

Nuno Maduro 383 Dec 20, 2022
SPA Skeleton with Mithril.js and Slim Framework

A single-page application (SPA) skeleton based on Mithril.js and Slim Framework 4 trying to use good practices

tebe 5 Oct 23, 2022
This is Slim 3 API skeleton project for Composer

Slim 3 API skeleton This is Slim 3 API skeleton project for Composer. Project uses Zend Table Gateway and Phinx for database operations, Monolog for l

Mika Tuupola 304 Dec 28, 2022
This repository is pre-configured, clean and empty skeleton for creating a new projects using Kraken Framework.

Kraken Application Skeleton Note: This repository contains pre-configured application skeleton for fast creation of new projects with Kraken Framework

Kraken 79 Aug 6, 2022