mauijay/boilerplate

v1.1.3 2024-11-24 21:26 UTC

This package is auto-updated.

Last update: 2025-03-24 23:33:16 UTC


README

Official Website
YouTube Channel

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:

Features

  • back end
  • tailwind css
  • Font Awesome
  • Access control by Shield
  • Dynamic Menu
  • Language Support

Dashboard

Requirements

Ensure you have the following installed before starting:

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.