Documentation
About
InstanceIO (Iio) is a hybrid-framework for static or dynamic websites ready for multiple use cases. This frontend comes HTMx-ready as well as Docker-ready out of the box. The framework also has the ability to export to flat-file HTML ready for S3/serverless functions or IPFS.
Install
To install the IIO package into the vendor directory, ensure you are in the application root directory and then run the following command:
php install.php
This assumes you have the IIO package installed in a directory one-level above the application root directory: ```./../iio```. The package can be pulled from [the official IIO git repository](https://github.com/senicity/iio)
HTMx
This framework has full-HTMx support out of the box and can compile to HTML so you can upload only HTML files to your server, serverless function or bucket. This will also work dynamically with IPFS.
Docker
Iio has the ability to build a local docker environment for quick development. Run the following command in the root folder of the application:
php console/cmd.php Docker build
This assumes that you have PHP and Docker installed locally as well as the ability to run Docker locally in non-sudo mode.
Create An HTML Build
To build your website/app to flat-file HTML, run the following command in the root folder of the application:
php console/cmd.php Build
This creates a 'dist' folder in your application root which can be uploaded or sent to a server, serverless function or bucket. This assumes that you have PHP installed on your machine. This can also be run inside of the docker container as long as you are in the root of the application first.
Make A Command
You can create any new command that can be run via the built in console by running the 'Make command' command. Here is an example:
php console/cmd.php Make command <command_name>
Make A Route
You can extend the core SDK code for the web or api routes by running the 'Make route' command. Here is an example with all available options and flags:
php console/cmd.php Make route <route_type (web || api)> <controller_method> <route_path> <route_view_method> <controller_name> <make_flag>
Make A Controller
You can create any new controller that extends the core SDK code by running the 'Make controller' command. Here is an example:
php console/cmd.php Make controller <controller_name> <controller_method> <controller_view_method>
Make A Component
You can automatically create the component files but running the 'Make component' command. Here is an example:
php console/cmd.php Make component <component_name>
Routers
To create the routes you have two options. Run in the ```web.php``` routers which will compile a full HTML template or ```api.php``` which will only compile the HTML sent back from the controller and view repository.
Start building
Install the framework and scaffold your first component in under a minute.