Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agungsugiarto/boilerplate
CodeIgniter4 Boilerplate based on AdminLTE 3 with user management, roles, permissions, ...
https://github.com/agungsugiarto/boilerplate
boilerplate codeigniter-boilerplate codeigniter-skeleton codeigniter4 codeigniter4-boilerplate
Last synced: 4 days ago
JSON representation
CodeIgniter4 Boilerplate based on AdminLTE 3 with user management, roles, permissions, ...
- Host: GitHub
- URL: https://github.com/agungsugiarto/boilerplate
- Owner: agungsugiarto
- License: mit
- Created: 2020-02-27T04:41:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-13T23:23:08.000Z (9 months ago)
- Last Synced: 2025-01-25T16:06:41.881Z (11 days ago)
- Topics: boilerplate, codeigniter-boilerplate, codeigniter-skeleton, codeigniter4, codeigniter4-boilerplate
- Language: PHP
- Size: 2.93 MB
- Stars: 158
- Watchers: 16
- Forks: 49
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
CodeIgniter 4 Application Boilerplate
=====================================
This package for CodeIgniter 4 serves as a basic platform for quickly creating a back-office application. It includes profile creation and management, user management, roles, permissions and a dynamically-generated menu.Feature
-------
* Configurable backend theme [AdminLTE 3](https://adminlte.io/docs/3.0/)
* CSS framework [Bootstrap 4](https://getbootstrap.com/)
* Icons by [Font Awesome 5](https://fontawesome.com/)
* Role-based permissions (RBAC) provided by [Myth/Auth](https://github.com/lonnieezell/myth-auth)
* Dynamically-Generated Menu
* Localized English / IndonesianThis project is still early in its development... please feel free to contribute!
------------------------------------------------------------
Screenshoot | Demo On [Heroku](https://boilerplate-codeigniter4.herokuapp.com/)
-------------------------------------------------------------------------------
![Dashboard](.github/dashboard.png?raw=true)Installation
------------**1.** Get The Module
```bash
composer require agungsugiarto/boilerplate
```**2.** Set CI_ENVIRONMENT, baseURL, index page, and database config in your `.env` file based on your existing database (If you don't have a `.env` file, you can copy first from `env` file: `cp env .env` first). If the database does not exist, create the database first.
```bash
# .env file
CI_ENVIRONMENT = developmentapp.baseURL = 'http://localhost:8080'
app.indexPage = ''database.default.hostname = localhost
database.default.database = boilerplate
database.default.username = root
database.default.password =
database.default.DBDriver = MySQLi
```
**3.** Run publish auth
```bash
php spark auth:publishPublish Migration? [y, n]: y
created: Database/Migrations/2017-11-20-223112_create_auth_tables.php
Remember to run `spark migrate -all` to migrate the database.
Publish Models? [y, n]: n
Publish Entities? [y, n]: n
Publish Controller? [y, n]: n
Publish Views? [y, n]: n
Publish Filters? [y, n]: n
Publish Config file? [y, n]: y
created: Config/Auth.php
Publish Language file? [y, n]: n
```> NOTE: Everything about how to configure auth you can find add [Myth/Auth](https://github.com/lonnieezell/myth-auth).
Is it ready yet? Not so fast!! ;-) After publishing `Config/Auth.php` you need to change
`public $views` with these lines below:
```php
public $views = [
'login' => 'agungsugiarto\boilerplate\Views\Authentication\login',
'register' => 'agungsugiarto\boilerplate\Views\Authentication\register',
'forgot' => 'agungsugiarto\boilerplate\Views\Authentication\forgot',
'reset' => 'agungsugiarto\boilerplate\Views\Authentication\reset',
'emailForgot' => 'agungsugiarto\boilerplate\Views\Authentication\emails\forgot',
'emailActivation' => 'agungsugiarto\boilerplate\Views\Authentication\emails\activation',
];
```Open `app\Config\Filters.php`, find `$aliases` and add these lines below:
```php
public $aliases = [
'login' => \Myth\Auth\Filters\LoginFilter::class,
'role' => \agungsugiarto\boilerplate\Filters\RoleFilter::class,
'permission' => \agungsugiarto\boilerplate\Filters\PermissionFilter::class,
];
```**4.** Run publish, migrate and seed boilerplate
```bash
php spark boilerplate:install
```**5.** Run development server:
```bash
php spark serve
```**6.** Open in browser http://localhost:8080/admin
```bash
Default user and password
+----+--------+-------------+
| No | User | Password |
+----+--------+-------------+
| 1 | admin | super-admin |
| 2 | user | super-user |
+----+--------+-------------+
```Settings
--------Config Boilerplate
You can configure default dashboard controller and backend theme in `app\Config\Boilerplate.php`,
```php
class Boilerplate extends BaseConfig
{
public $appName = 'Boilerplate';public $dashboard = [
'namespace' => 'agungsugiarto\boilerplate\Controllers',
'controller' => 'DashboardController::index',
'filter' => 'permission:back-office',
];
// App/Config/Boilerplate.php
```Usage
-----
You can find how it works with the read code routes, controller and views etc. Finnally... Happy Coding!Changelog
--------
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.Contributing
------------
Contributions are very welcome.License
-------This package is free software distributed under the terms of the [MIT license](LICENSE.md).