{"id":20807140,"url":"https://github.com/trubusoft/codeigniter4-starter","last_synced_at":"2026-04-12T06:35:16.411Z","repository":{"id":219707891,"uuid":"749696173","full_name":"trubusoft/codeigniter4-starter","owner":"trubusoft","description":"CodeIgniter 4.4.5+ template with docker configuration for development \u0026 production","archived":false,"fork":false,"pushed_at":"2024-03-01T05:37:48.000Z","size":301,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T13:39:36.985Z","etag":null,"topics":["codeigniter4","docker","docker-compose","docker-image"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trubusoft.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-29T08:01:28.000Z","updated_at":"2024-03-01T09:18:21.000Z","dependencies_parsed_at":"2024-02-03T02:43:46.277Z","dependency_job_id":"e93cc1d9-ffe2-4c4c-a0e9-2c901a567c1e","html_url":"https://github.com/trubusoft/codeigniter4-starter","commit_stats":null,"previous_names":["trubusoft/starter-ci4","trubusoft/codeigniter4-starter"],"tags_count":4,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trubusoft%2Fcodeigniter4-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trubusoft%2Fcodeigniter4-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trubusoft%2Fcodeigniter4-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trubusoft%2Fcodeigniter4-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trubusoft","download_url":"https://codeload.github.com/trubusoft/codeigniter4-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243152875,"owners_count":20244657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codeigniter4","docker","docker-compose","docker-image"],"created_at":"2024-11-17T19:32:04.842Z","updated_at":"2025-12-25T06:52:03.532Z","avatar_url":"https://github.com/trubusoft.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CodeIgniter 4 Starter Template\n\n![Status Badge](https://github.com/trubusoft/codeigniter4-starter/actions/workflows/php.yml/badge.svg?branch-main)\n![Coverage Badge](https://github.com/trubusoft/codeigniter4-starter/blob/coverage-report/coverage.svg)\n\nStarter template for CodeIgniter 4.4.5+ with:\n- Docker configuration for both development \u0026 production.\n- Test \u0026 Coverage workflow template with GitHub runner\n\nTested for development \u0026 production on Ubuntu 20.04 LTS.\n\n## Folder Structure\n\n- `configurations`: various development/deployment configurations (e.g. docker/kubernetes config for dev, staging, and production)\n- `documents`: all files that not directly related to the code and will not be included inside source image (e.g. requirements, notes, diagram)\n- `source`: root folder for the CI4 project\n\n## Installation\n\n\n### Installing PHP\n\n```\nsudo apt install software-properties-common\nsudo add-apt-repository ppa:ondrej/php\nsudo apt update\nsudo apt install php8.3\nphp -v\n```\n\n### Installing Required PHP Module for CI4\n\n- `mysql`: for connecting with MySQL\n- `curl`: for composer\n- `intl`: for CI4\n- `dom`: for PHPUnit\n- `mbstring`: for PHPUnit\n- `xdebug`: code coverage driver for PHPUnit\n\n```\nsudo apt install php8.3-mysql\nsudo apt install php8.3-curl\nsudo apt install php8.3-intl\nsudo apt install php8.3-dom\nsudo apt install php8.3-mbstring\nsudo apt install php8.3-xdebug\n```\n\nCheck that above modules exist by running `php -m`.\n\n#### Optional PHP Modules\n\nShould only be installed if required, or any error occurred that mentions them.\n\n- `sqlite3`: for CI4 default testing with sqlite3 database\n\n```\nsudo apt install php8.3-sqlite3\n```\n\n\n### Installing Composer\n\nRefer to: https://getcomposer.org/download/\n\n### Installing Dependencies\n\n```\ncd source\ncomposer install\n```\n\n### Running the starter template\n\nTry running the bare minimum settings now with:\n\n```\ncd source\nphp spark serve\n```\n\nA page should now be served at `http://localhost:8080/`.\n\nIf you can see the page, then CodeIgniter 4  related modules \u0026 packages have been installed successfully.\n\n## Development Configuration\n\n### Environment setting\n\n- Copy \u0026 rename `env.dev` to `.env`.\n- Modify as needed\n- Confirm the currently active environment with `./spark env`. It should now show `development` instead of `production`.\n\n### Spin up MySQL Database\n\nThe provided [docker-compose.yml](docker-compose.yml) will spin up 2 database (main and test).\n\n```\ndocker compose up -d\n```\n\n### Run the development session\n\nYou can start the development session with the built-in `spark`:\n```\ncd source\nphp spark serve\n```\n\nThe [bitnami/codeigniter](https://hub.docker.com/r/bitnami/codeigniter) image can also be used instead \nas an alternative to the `spark`. \nFor this, please refer to [development_with_bitnami_image.md](configurations/development/bitnami/development_with_bitnami_image.md).\n\n### Testing\n\nRun the tests with: \n\n```\ncd source\ncomposer test\n```\n\nor generate coverage report with:\n\n```\ncd source\ncomposer coverage\n```\n\nCoverage report will be created at `/source/build/logs`.\n\n### Debugging\n- Use the provided [Debug Toolbar](https://codeigniter4.github.io/userguide/tutorial/index.html#debug-toolbar)\n- Error logs will be printed on `writable/logs`\n\n## Production Configuration\n\nThis repo offers a working configuration for serving the source code on a production environment\nwith PHP-FPM and NGINX. \nMore about this can be found at [production.md](configurations/production/production.md).\n\n## Useful external resources\n- 25 minutes of [basic MVC in CodeIgniter 4](https://youtu.be/c8zHxE-mN4c?si=pNoCCJwCjGoRfYQp)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrubusoft%2Fcodeigniter4-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrubusoft%2Fcodeigniter4-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrubusoft%2Fcodeigniter4-starter/lists"}