{"id":13599505,"url":"https://github.com/waifung0207/ci_bootstrap_3","last_synced_at":"2025-04-04T13:13:52.068Z","repository":{"id":30310927,"uuid":"33862710","full_name":"waifung0207/ci_bootstrap_3","owner":"waifung0207","description":"A multi-tenant website template based on CodeIgniter 3 with integration of some useful tools","archived":false,"fork":false,"pushed_at":"2018-12-12T22:24:15.000Z","size":16590,"stargazers_count":389,"open_issues_count":65,"forks_count":314,"subscribers_count":106,"default_branch":"master","last_synced_at":"2025-03-28T12:07:23.648Z","etag":null,"topics":["codeigniter","crud","php"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/waifung0207.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}},"created_at":"2015-04-13T10:40:34.000Z","updated_at":"2025-01-31T20:34:26.000Z","dependencies_parsed_at":"2022-08-09T09:15:27.857Z","dependency_job_id":null,"html_url":"https://github.com/waifung0207/ci_bootstrap_3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waifung0207%2Fci_bootstrap_3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waifung0207%2Fci_bootstrap_3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waifung0207%2Fci_bootstrap_3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waifung0207%2Fci_bootstrap_3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waifung0207","download_url":"https://codeload.github.com/waifung0207/ci_bootstrap_3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182350,"owners_count":20897380,"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":["codeigniter","crud","php"],"created_at":"2024-08-01T17:01:05.461Z","updated_at":"2025-04-04T13:13:52.046Z","avatar_url":"https://github.com/waifung0207.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"## CodeIgniter 3 Bootstrap\n\n**Latest Build: 2017-03-24**\n\n**Note: This project is still in progress, but welcome for any issues encountered**\n\nA starter template that supports multi-tenant (Frontend / Admin Panel / API) website in a single application.\n\nThis repository is developed upon the following tools: \n* [CodeIgniter](http://www.codeigniter.com/) (v3.1.3) - PHP framework\n* [CodeIgniter HMVC Extensions](https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc) - modular structure by [wiredesignz](http://wiredesignz.co.nz/)\n* [codeigniter-base-model](https://github.com/jamierumbelow/codeigniter-base-model) - more advanced CRUD functions for models by [jamierumbelow](https://github.com/jamierumbelow)\n* [codeigniter-restserver](https://github.com/chriskacerguis/codeigniter-restserver) - base setup for API module\n* [Ion Auth](http://benedmunds.com/ion_auth/) - authentication library for CodeIgniter by [Ben Edmunds](http://benedmunds.com/)\n* [Bootstrap](http://getbootstrap.com/) (v3.3.7) - popular frontend framework\n* [Grocery CRUD](http://www.grocerycrud.com/) (v1.5.8) - feature-rich library to build CRUD tables\n* [Image CRUD](http://www.grocerycrud.com/image-crud) (v0.6) - CRUD library for image management\n* [AdminLTE](https://github.com/almasaeed2010/AdminLTE) (v2.3.11) - bootstrap theme for Admin Panel\n\n\n### Features\n\nThis repository contains setup for rapid development:\n* Multi-tenant (e.g. Frontend Website, Admin Panel, API) website in single application\n* Modular design by CodeIgniter HMVC extension\n* Custom config files (sites.php, locale.php) for easy configuration of website behavior\n* Admin Panel with AdminLTE v2 theme, and Grocery CRUD integration\n* Admin Panel includes usage of [Sortable](http://rubaxa.github.io/Sortable/) library\n* API Site with [Swagger](http://swagger.io/) UI integrated, via annotations supported by [swagger-php](https://github.com/zircote/swagger-php) library\n* API Site to handle RESTful endpoints, with shortcut functions to grab parameters and display results\n* User authentication for Frontend Website (Sign Up, Login, Forgot Password, etc.)\n* User authentication for Admin Panel (Login, Change Password, etc.)\n* Preset layouts and templates\n* Preset asset pipeline (e.g. minify scripts, image optimization) via gulp (reference from [gulp-starter](https://github.com/greypants/gulp-starter))\n* Preset data structure for Blogging (with pagination) and Cover Photos (carousel), which can be managed from Admin Panel\n* Form Builder library to help with form rendering with Bootstrap theme, form validation, etc.\n* Breadcrumb and Pagination handling fit with Bootstrap theme\n* Custom 404 pages for Frontend Website and Admin Panel\n* Multilingual support\n* Email config setup\n* Functions to be called from CLI (e.g. daily cron job, database backup)\n* ... more coming!\n\n\n### Demo Project\n\nA demo repository can be found from: https://github.com/waifung0207/ci_bootstrap_3_demo\n\n\n### Server Environment\n\nBelow configuration are preferred; other environments are not well-tested, but still feel free to report and issues. \n\n* **PHP 5.6+**\n* **Apache 2.2+** with rewrite mod enabled\n* **MySQL 5.5+** (not tested on MariaDB)\n\n\n### Setup Guide\n\n1. git clone this repo\n2. Create a database (e.g. named \"ci_bootstrap_3\"), then import /sql/latest.sql into MySQL server\n3. Make sure the database config (/application/config/database.php) is set correctly\n4. You should be able to access Frontend Website, Admin Panel and API Site (with Swagger Doc) respectively\n5. Visit the Demo Controllers (exist in both Frontend / Admin Panel / API) for sample usage\n\n**Note** For more advanced workflow (includes repo upgrade), please have a look on my suggestion in [this issue](https://github.com/waifung0207/ci_bootstrap_3/issues/42). After release the v1.0 version, I will try to keep the upgrade procedure more developer friendly. \n\n\n### Admin Users (and default login accounts)\n\nThere are 4 preset users for Admin Panel:\n\n* Webmaster (default username \u0026 password are both \"webmaster\", belongs to the webmaster group)\n* Admin (default username \u0026 password are both \"admin\", belongs to the admin group)\n* Manager (default username \u0026 password are both \"manager\", belongs to the manager group)\n* Staff (default username \u0026 password are both \"staff\", belongs to the staff group)\n\n\n### Folder Structure\n\nExplanation on the folder structure which supports HMVC (only showing the highlighted folders and files).\n\n```\napplication/                    --- Main CodeIgniter source files\n    config/\n        production/             --- Configuration when ENVIRONMENT is set as \"production\"\n        autoload.php            --- By default, some files are loaded for this repo\n        ci_bootstrap.php        --- Core configuration file for all sites\n        database.php            --- Need to verify to ensure connection with MySQL database\n        email.php               --- Created to centralize email configuration (default: using Mailgun)\n        form_validation.php     --- Created to centralize validation forms for all forms, include ReCAPTCHA settings\n        routes.php              --- Changed default controller from Welcome to Home\n    controllers/                --- Controllers for Frontend Website; extends from MY_Controller (except Cli)\n        Cli.php                 --- Utility function that can only be called from command line\n        Home.php                --- Default controller for Frontend Website\n    core/                       --- Extending CodeIgniter core classes; can also be used within modules\n        MY_Controller.php       --- Important class which contains shared logic of all controllers\n        MY_Loader.php           --- Required for HMVC extension\n        MY_Model.php            --- Contains shared function for model classes\n        MY_Router.php           --- Required for HMVC extension\n    helpers/                    --- Contains custom helper functions being used throughout this repo\n    language/                   --- Preset language files\n    libraries/                  --- Custom libraries (e.g. Form Builder, System Message)\n        MY_Email.php            --- Enhanced email library, includes work with Mailgun API\n    models/                     --- Sample model extending from MY_Model\n    modules/                    --- Each module can be accessed by http://{base_url}/{module_name}/{module_controller}/, etc.\n        admin/                  --- Module for Admin Panel\n            config/             --- Configuration for Admin Panel (overriding application/config/)\n            controllers/        --- Controllers for Admin Panel; also extends from MY_Controller\n            libraries/          --- Libraries specific for Admin Panel\n            models/             --- Models only being used in Admin Panel\n            views/              --- Views for Admin Panel; can reuse Frontend views, or override by using same path/filename\n        adminlte/               --- Module with AdminLTE widgets\n        api/                    --- Another module specific for API endpoints\n    third_party/\t\t\t\t--- 3rd party files (HMVC extension, Grocery CRUD, Rest Server, etc.)\n    views/                      --- Views for Frontend Website, can also be used by modules unless overrided\nassets/                         --- Folder for public files\n    api/                        --- Swagger UI assets\n    dist/                       --- Post-processed scripts and images via gulp tasks (don't manually edit files here!)\n    grocery_crud/               --- Asset files from Grocery CRUD library\n    image_crud/                 --- Asset files from Image CRUD library\n    uploads/                    --- Default folder for upload files, where permission should set as writable\ngulpfile.js/                    --- Task runner following gulp-starter practice\n    tasks/                      --- Gulp tasks\n    config.js                   --- Configuration for Gulp tasks\nscreenshots/                    --- Screenshot images for preview\nsql/                            --- MySQL files\n    backup/                     --- Files which will be created when backup database from CLI\n    core/                       --- Files contains core data (e.g. Ion Auth)\n    latest.sql                  --- Latest version of all preset data\nsrc/                            --- Folder for non-public source files\n    css/                        --- Custom CSS files append to each site\n    images/                     --- Source image files before optimization\n    js/                         --- Custom CSS files append to each site\n    sass/                       --- SASS files for styling\n    theme/                      --- Default folder for additional theme files\nsystem/                         --- CodeIgniter core files (unchanged as clean CI3 installation)\n.htaccess                       --- URL rewrite for Apache web server (require mod enabled)\n```\n\n\n### Preset Gulp Tasks\n\nThe gulpfile.js folder is prepared with following tasks available:\n\n* **default**: run **build** task first, then **watch** for file change\n* **build**: run **imagemin**, **cssmin** and **uglify** tasks in parallel\n* **rebuild**: run **clean** task first, then **copy**, **imagemin**, **cssmin** and **uglify** tasks in parallel\n* **clean**: remove all files inside the dist folder (default: /assets/dist)\n* **copy**: copy required files to dist folder\n* **cssmin**: concat and minify CSS files\n* **imagemin**: optimize images (jpg, png, gif, svg) and output to dist folder (default: /assets/dist/images)\n* **uglify**: concat and minify (uglify) JS files\n* **watch**: monitor JS / CSS / image files and execute specific tasks upon changes\n\n\n### Screenshots\n\nFrontend - Home: \n\n![](screenshots/frontend_home.png \"Frontend Home\")\n\nAdmin Panel - Home: \n\n![](screenshots/admin_home.png \"Admin Panel Home\")\n\nMore screenshots can be viewed from the [screenshots folder](https://github.com/waifung0207/ci_bootstrap_3/blob/master/screenshots/) under this repository.\n\n\n### TODO\n\n* Changelog file\n* Better documentation (e.g. on [Gitbook](http://gitbook.com/))\n* Enhance Form Builder library to support more field types\n* Grocery CRUD / Image CRUD file upload - add Amazon S3 integration\n* Grocery CRUD / Image CRUD image upload - add cropping feature\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaifung0207%2Fci_bootstrap_3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaifung0207%2Fci_bootstrap_3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaifung0207%2Fci_bootstrap_3/lists"}