CodeIgniter-based Project Starter Kit
NOTE: This project is only used for my personal needs, but feel free to use it as yours.
- Testable provided by Fernando Piancastelli
- HMVC provided by Jens Segers
- Better CLI Interaction
- Soon..
- PHP 5.5.x or newer.
- HTTP Server, e.g. NginX or Apache either.
- MySQL Server 5.x or newer for main database.
- Redis Server for cache database.
I've make this project available to install via Composer with following command:
$ composer create-project -s dev projek-xyz/ci-startapp my-app
now enter my-app
directory you just create then copy and rename env.txt
file to .env
under app directory.
$ cp app/env.txt app/.env
then edit contents of app/.env
file as you wish. When everything is done, let's start the server.
$ php -S 0.0.0.0:8888 -t public public/index.php
Now, you should open http://localhost:8888 in your favorite web browser.
NOTE: Make sure your Redis server already running.
- app: Previously it is
application
directory defined withAPPPATH
constant. Inside it still remain the same as default CI APPPATH but without some unused directories, which are cache, hooks and third_party. - asset: Containts source of static assets (sass, js and images).
- asset/data: Containts migration files.
- public: This is the webroot of your application.
- tests: Containts all tests units for your application.
- creasi: This is the command line interface for your application. You could use it to
install
,migrate
database and so on.
Currently this project only use PHPUnit as testing framework, another framework like PHPSpec, Behat etc will be implemented soon. The PHPUnit configuration is located inside tests directory, so you could run the tests with following command.
$ phpunit -c tests/phpunit.xml
NOTE: I only provide dummy tests, so you could create and use your own 😁
- CodeIgniter and their contributors
MIT © Fery Wardiyanto. Please see License File for more information.