mauijay / boilerplate
CodeIgniter4 Admin Boilerplate based on SB2 by jay
Fund package maintenance!
mauijay
paypal.me/jay808biz?country.x=US&locale.x=en_US
808businesssolutions.com/about
Requires
- php: >=8.2
- codeigniter4/framework: ^4.5
- codeigniter4/shield: ^1.1
- codeigniter4/translations: ^4.0
- firebase/php-jwt: ^6.10
Requires (Dev)
- codeigniter4/devkit: ^1.2
- fakerphp/faker: ^1.23
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^10.5.16
- rector/rector: ^1.2
This package is auto-updated.
Last update: 2025-03-24 23:33:16 UTC
README
Overview *WORK IN PROGRESS
This package offers a quick setup for your ci4 projects that includes and admin panel, authorization and authentication, cms and a dynamic menu.
This repository includes:
- CodeIgniter https://github.com/codeigniter4/CodeIgniter4
- CodeIgniter Shield https://github.com/codeigniter4/shield
- Tailwind https://tailwindcss.com/
Features
- back end
- tailwind css
- Font Awesome
- Access control by Shield
- Dynamic Menu
- Language Support
Requirements
Ensure you have the following installed before starting:
- PHP 8.3 or later
- CI 4.5.5 or later
- Composer command (See Composer Installation)
- Git
Install Guide
1. Add to a fresh ci4 install or your ci4 project
composer require mauijay/boilerplate
And then "composer update" every time there is a new version of the framework. When updating, check the release notes to see if there are any changes you need to apply to your app folder.
2. Update Dependencies
Eevery time there is a new version of the framework, run the following commands to update dependencies and copy required files:
composer update cp vendor/codeigniter4/framework/public/index.php public/index.php cp vendor/codeigniter4/framework/spark spark
3. Set Up Environment File
Copy the .env file to the root directory:
cp env .env
Customize env for your application, specifically the baseURL and any database settings.
# .env file CI_ENVIRONMENT = development app.baseURL = 'http://localhost:8080' app.indexPage = '' database.default.hostname = localhost database.default.database = ci4 database.default.username = root database.default.password = root database.default.port = 3306
Database Config
- Before continuing, make sure you have created a database and your db credentials for MySQL or use SQLite3 has been set in .env file.
- Skipping this step will make database migration fail.
php spark 808:install php spark shield:setup -or- php spark:key:generate php spark migrate --all php spark db:seed mainseeder php spark shield:user create php spark serve
4. Start the Application
Run the app using the built-in server. If you want to use a custom port (e.g., 9000), specify it using the --port option:
php spark serve --port 8081
The application should now be accessible at http://localhost:8081.
Code Standards and Fixing
This project follows PHP coding standards. To automatically fix coding standard issues, run the following command:
composer run fix
Troubleshooting
If you encounter any issues during installation, feel free to open a discussion in the community.