Introduction

What is CodeIgniter Wizard?

It is a relational database-driven PHP code generator and a RAD tool for the Mac which reads your MySQL database tables and columns, presents you with some options to determine which ones to include, how to interpret them, and then quickly creates a working web application with full CRUD functionality using CodeIgniter 4.x framework complete with entity models, views and controllers (even entities) and a Bootstrap 4-based CSS layout. The generated code is secure, clean, highly re-usable, and portable.

Is CodeIgniter Wizard an IDE?

No, it is not. It is rather a code generator that creates laborous, boilerplate code.

Unless you are creating a very basic web application, you will need an IDE to customize a web application project generated with CodeIgniter Wizard.

Which databases are supported?

Currently CodeIgniter Wizard is compatible with only MySQL/MariaDB, but the web applications created with it can switch to different databases such as PostgreSQL and SQLite after the code is generated as long as CodeIgniter framework supports the database to be switched to - also assuming you can migrate your MySQL/MariaDb database to the desired platform.

Note: at the time of the development of this version and writing the manuals / help files, PDO was not yet supported by CodeIgniter v4.x itself.

What kind of applications can I produce with CodeIgniter Wiz?

CodeIgniter Wizard is currently most suitable for developing the basis for administrative control panels for back-ends such as custom CMS, or any database-driven records filing and management application such as CRM and HRM systems. Furthermore the generated entity-models can be used for any type of application including the end user-facing front-end layer, therefore saving an considerable amount of time in addition to the backend development.

Furthermore, since form design and validation is one of the most tedius and time-consuming tasks, the highly re-usable code generated by CodeIgniter Wizard for this can be used elsewhere - inside or outside the application.

Another use case might be that in case you are new to CodeIgniter and want to learn it by examining code written with good practices, CodeIgniter Wizard can add great value to your learning process with.

Similarly CI 3 developers who want the port their code base, but are unfamiliar with CI 4 can benefit a great deal from CodeIgniter Wizard.

How is CodeIgniter Wizard different from other code generators?

Code generators out there usually create some code sufficient enough to get the basic CRUD operations done at the expense of creating complicated - often cryptic - code, not necessarily providing a very elegant UX, and their code usually relies on some kind of heavy-weight custom library (even many of which are like framework-in-a-framework) and the code they generate is usually not portable elsewhere.

In contrast, CodeIgniter Wizard generates pretty standard and highly portable code which doesn't have any 3rd party dependency.

How CI Wizard Works

How much time can CodeIgniter Wizard save?

We measured that an average web developer can develop between 1 and 3 web application modules (being not so simple, not too advanced either) in a work day - that has more than, say, five fields (for the model, form, table view columns), and at least one foreign key relationship - excluding time spent on bugs and refinements after doing other modules. (Entity model, controller and views are meant by a module).

CodeIgniter Wizard performs the same work in about less than ten minutes including user's interaction in the GUI to point-and-select fields and customize form controls depending on data types.

What code does CI Wizard exactly generate?

Class files for entities, models and controllers, view files for grid / table list screens, and forms with a diverse possibility of fields like input text, textarea, number, email, checkbox, radio buttons, dropdown select options, sidebar content and a simple dashboard starter. The views built constitute basic master-detail functionality.

The generated code includes the necessary input sanitization and form validation, also whatever's required to select joined data across multiple database tables especially conforming to foreign keys or custom relationships set in the GUI by the user.

CodeIgniter 2.x also generates files needed for authentication / authorization as well as language localization files.

How does CI Wizard generate the code?

It reads your database, makes a few decisions about it, then asks you to make some decisions yourself such as to confirm the name the model and controller files, to select which columns you want, what fields should be generated from them, and where exactly you want them.

If your database table has foreign key relationships with other tables or you indicate them manually in the GUI, CI Wiz also includes the necessary joined queries and multiple choice select controls in the generated code.

I had to modify the database after I generated code in CodeIgniter Wizard. Now what?

Re-open the affected the modules for editing one-by-one in CodeIgniter Wizard:

If a table column has been modified or deleted in the database, CI Wiz will automatically update it in the module. (You still need to manually trigger 'Regenerate Code')

If a new table column has been added in the database, you will see a warning text at the bottom of the window indicating so. Click the corresponding checkbox(es) under 'Include in Grid' and/or 'Include in Forms' if you want CI Wiz to take them into account for code generation.

After completing the steps above, click 'Generate Code' button. And then, under the modules list, click either 'Re-Publish All Modules' or 'Publish' only the concerned module related with the modified database table.

The above process is typically accomplished in less than a minute or two.

Web Apps Created with CI Wizard

What backend library dependencies do web apps created with CodeIgniter Wizard have?

None. CodeIgniter Wizard creates pretty standard code and the classes it generates rely on a couple of base model and controller classes, also a standard CodeIgniter helper file all of which you can customize to your own needs.

What software license is required?

Web applications created using CodeIgniter Wizard contain open-source software and they come with a MIT license which you are granted. CodeIgniter Wizard itself requires a proprietary commercial license per user which you will have automatically obtained by purchasing the product from the Mac app store. Ozar, the developer does neither have, nor will claim any rights on what you create with CodeIgniter Wizard.

What is the easiest and shortest way to add authentication and authorization to my CodeIgniter 4.x project?

You need the below:

  1. CodeIgniter Wizard 2.0 or later
  2. Add localization to your project (from languages and translations - you can use one or more languages)
  3. Check off 'Use authentication' from the Auth tab in your web app's settings
  4. Click "(re-)setup config files..." and then "Publish All Modules..."
  5. You get "auth" in your application with all the code needed login, registration, forgotten password, password reset and user profile pages auto-magically .

    For authorization, you can specify which user group can access which module in the module's settings window.

Can I use one or more languages in my web application?

With Codeigniter Wizard 2.x, you can. In fact, you can easily re-use translations you make in the GUI even export them as Codeigniter translation files in .php that you can use for other CodeIgniter applications not generated with the wizard.

CodeIgniter-specific

Which exact version of CodeIgniter framework do web apps generated with the Wizard use?

At the time of the last update of this page, the stable release of CI framework was 4.2.5, and CI Wizard 2.0 can also create apps using version 4.2.5. That said, even if Ozar did not incorporate a newer version of CodeIgniter itself, since the apps generated with it are Composer-based, you could always update it to a newer version when it comes out, using

composer update
command from the command line or an IDE such as Netbeans or PHPStorm.

I am a newbie PHP developer who knows nothing about CodeIgniter. Is CodeIgniter Wizard good for me?

If you have OOP skills and/or knowledge in PHP, you can use CodeIgniter Wizard to learn CodeIgniter 4 by examining source code of web apps generated with the Wizard.

Can CodeIgniter Wizard generate CI (v)3 applications?

No. CodeIgniter v3 is reaching end-of-support day by day

Furthermore it is not compatible with PHP 8.x.

We also observed there is no such demand.

You mention generating both models and entities. Aren't Models and Entities supposed to be the same thing?

In most MVC frameworks, yes.

In CodeIgniter 4, entities and models are seperate classes. They are closely related, but they reside under separate namespaces and they have their own specific purposes. CodeIgniter Wizard generates both of them in their own respective class file as meant to be.

Updates

What happens when a newer version of CodeIgniter framework comes out?

CodeIgniter Wizard generates projects based on PHP Composer where you can always update dependency versions via a Terminal command line running

composer update


Furthermore, once we verify the latest release is stable (which may not necessarily be the case with every open-source project), we will update CodeIgniter Wizard to include that distribution, also making sure to update our own code to be compatible.

When will CodeIgniter Wizard 2.0 be available?

It is released as planned on 30 August 2022.

Security

How secure is the code generated by CodeIgniter Wizard?

Web applications generated with CodeIgniter Wizard have a very solid and secure base with advanced input sanitization and form validation based on the data types coming from the database. XSS protection comes out of the box!

Version 2.0 of CodeIgniter Wizard brings a new feature to add authentication and authorization based on Myth/Auth developed by the lead programmers of the Codeigniter framework. Myth/Auth currently supports many of NIST's latest Digital Identity guidelines. The password validator, for example, comes with a dictionary of over 620,000 common/leaked passwords that can be checked against when activated in the authenticator settings. A handful of variations on the user's email/username are automatically checked against.