GithubHelp home page GithubHelp logo

akir4d / jacat Goto Github PK

View Code? Open in Web Editor NEW
20.0 5.0 12.0 41.16 MB

A multi-tenant website template based on CodeIgniter and adminLTE3 with integration of some useful tools

License: MIT License

PHP 45.25% HTML 17.99% Hack 0.01% CSS 2.14% JavaScript 34.41% Shell 0.01% ActionScript 0.19% SCSS 0.01%
adminlte codeigniter bootstrap hmvc-extention ion-auth grocery-crud restserver multi-tenant

jacat's Introduction

JACAT (Just Another CodeIgniter/AdminLTE template)

Latest Build: 2020-03-28

Note: This project is still in progress, but welcome for any issues encountered

A starter template that supports multi-tenant (Frontend / Admin Panel / API) website in a single application. This is a fork of abandoned CodeIgniter 3 Bootstrap. If you plan to upgrade form original you have to use sql/upgrade_from_old_codeigniter_3_bootstrap.sql and also check the changes inside application/modules/admin/config/ion_auth.php

This repository is developed upon the following tools:

Features

This repository contains setup for rapid development:

  • Multi-tenant (e.g. Frontend Website, Admin Panel, API) website in single application
  • Modular design by CodeIgniter HMVC extension
  • Custom config files (sites.php, locale.php) for easy configuration of website behavior
  • Admin Panel with AdminLTE v3 theme, and Grocery CRUD integration
  • Admin Panel includes usage of Sortable library
  • API Site with Swagger UI integrated, via annotations supported by swagger-php library
  • API Site to handle RESTful endpoints, with shortcut functions to grab parameters and display results
  • User authentication for Frontend Website (Sign Up, Login, Forgot Password, etc.)
  • User authentication for Admin Panel (Login, Change Password, etc.)
  • Preset layouts and templates
  • Preset asset pipeline (e.g. minify scripts, image optimization) via gulp (reference from gulp-starter)
  • Preset data structure for Blogging (with pagination) and Cover Photos (carousel), which can be managed from Admin Panel
  • Form Builder library to help with form rendering with Bootstrap theme, form validation, etc.
  • Breadcrumb and Pagination handling fit with Bootstrap theme
  • Custom 404 pages for Frontend Website and Admin Panel
  • Multilingual support
  • Email config setup
  • Functions to be called from CLI (e.g. daily cron job, database backup)
  • ... more coming!

Demo Project

  • Coming Soon...

Server Environment

Below configuration are preferred; other environments are not well-tested, but still feel free to report and issues.

  • PHP 7.0+
  • Apache 2.2+ with rewrite mod enabled
  • MySQL 5.5+ (not tested on MariaDB)

Setup Guide

  1. git clone this repo
  2. Create a database (e.g. named "jacat"), into MySQL server
  3. Inside /application/config/ copy "database.model.php" as "database.php" and make sure that database config is set correctly
  4. go to your-new-site/upgrade to install database with new tables and default configuration datas.
  5. You should be able to access Frontend Website, Admin Panel and API Site (with Swagger Doc) respectively
  6. Visit the Demo Controllers (exist in both Frontend / Admin Panel / API) for sample usage

Upgrade database from prevoius version

  1. go to your-new-site/upgrade to upgrade database tables

Admin Users (and default login accounts)

There are 4 preset users for Admin Panel:

  • Webmaster (default username & password are both "webmaster", belongs to the webmaster group)
  • Admin (default username & password are both "admin", belongs to the admin group)
  • Manager (default username & password are both "manager", belongs to the manager group)
  • Staff (default username & password are both "staff", belongs to the staff group)

Folder Structure

Explanation on the folder structure which supports HMVC (only showing the highlighted folders and files).

application/                    --- Main CodeIgniter source files
    config/
        production/             --- Configuration when ENVIRONMENT is set as "production"
        autoload.php            --- By default, some files are loaded for this repo
        jacat.php               --- Core configuration file for all sites
        database.php            --- Need to verify to ensure connection with MySQL database
        email.php               --- Created to centralize email configuration (default: using Mailgun)
        form_validation.php     --- Created to centralize validation forms for all forms, include ReCAPTCHA settings
        routes.php              --- Changed default controller from Welcome to Home
    controllers/                --- Controllers for Frontend Website; extends from MY_Controller (except Cli)
        Cli.php                 --- Utility function that can only be called from command line
        Home.php                --- Default controller for Frontend Website
    core/                       --- Extending CodeIgniter core classes; can also be used within modules
        MY_Controller.php       --- Important class which contains shared logic of all controllers
        MY_Loader.php           --- Required for HMVC extension
        MY_Model.php            --- Contains shared function for model classes
        MY_Router.php           --- Required for HMVC extension
    helpers/                    --- Contains custom helper functions being used throughout this repo
    language/                   --- Preset language files
    libraries/                  --- Custom libraries (e.g. Form Builder, System Message)
        MY_Email.php            --- Enhanced email library, includes work with Mailgun API
    models/                     --- Sample model extending from MY_Model
    modules/                    --- Each module can be accessed by http://{base_url}/{module_name}/{module_controller}/, etc.
        admin/                  --- Module for Admin Panel
            config/             --- Configuration for Admin Panel (overriding application/config/)
            controllers/        --- Controllers for Admin Panel; also extends from MY_Controller
            libraries/          --- Libraries specific for Admin Panel
            models/             --- Models only being used in Admin Panel
            views/              --- Views for Admin Panel; can reuse Frontend views, or override by using same path/filename
        adminlte/               --- Module with AdminLTE widgets
        api/                    --- Another module specific for API endpoints
    third_party/				--- 3rd party files (HMVC extension, Grocery CRUD, Rest Server, etc.)
    views/                      --- Views for Frontend Website, can also be used by modules unless overrided
assets/                         --- Folder for public files
    api/                        --- Swagger UI assets
    dist/                       --- Post-processed scripts and images via gulp tasks (don't manually edit files here!)
    grocery_crud/               --- Asset files from Grocery CRUD library
    image_crud/                 --- Asset files from Image CRUD library
    uploads/                    --- Default folder for upload files, where permission should set as writable
gulpfile.js/                    --- Task runner following gulp-starter practice
    tasks/                      --- Gulp tasks
    config.js                   --- Configuration for Gulp tasks
screenshots/                    --- Screenshot images for preview
sql/                            --- MySQL files
    backup/                     --- Files which will be created when backup database from CLI
    core/                       --- Files contains core data (e.g. Ion Auth)
    latest.sql                  --- Latest version of all preset data
src/                            --- Folder for non-public source files
    css/                        --- Custom CSS files append to each site
    images/                     --- Source image files before optimization
    js/                         --- Custom CSS files append to each site
    sass/                       --- SASS files for styling
    theme/                      --- Default folder for additional theme files
system/                         --- CodeIgniter core files (unchanged as clean CI3 installation)
.htaccess                       --- URL rewrite for Apache web server (require mod enabled)

Preset Gulp Tasks

The gulpfile.js folder is prepared with following tasks available:

  • default: run build task first, then watch for file change
  • build: run imagemin, cssmin and uglify tasks in parallel
  • rebuild: run clean task first, then copy, imagemin, cssmin and uglify tasks in parallel
  • clean: remove all files inside the dist folder (default: /assets/dist)
  • copy: copy required files to dist folder
  • cssmin: concat and minify CSS files
  • imagemin: optimize images (jpg, png, gif, svg) and output to dist folder (default: /assets/dist/images)
  • uglify: concat and minify (uglify) JS files
  • watch: monitor JS / CSS / image files and execute specific tasks upon changes

Screenshots

Admin Panel - Home:

Frontend - Home:

More screenshots can be viewed from the screenshots folder under this repository.

jacat's People

Contributors

akir4d avatar towerx avatar waifung0207 avatar walaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jacat's Issues

Select multiple records to exclude

If possible, add to the grocery crud list the option to select multiple records to exclude as it exists in the official bootstrap 3 theme. thks

Query SQL

Galat
Query SQL: Dokumentasi

activation feature upgrade

ALTER TABLE admin_users
ADD COLUMN activation_selector varchar(255) AFTER email,
MODIFY COLUMN activation_code varchar(255)
MySQL menyatakan: Dokumentasi

#1146 - Table 'modular.admin_users' doesn't exist

Mysql 8.0

Hi! Congratulations! Good job!
I found that using Mysql 8.0.22 there is a problem with the queries in grocery_crud. Seems to me that the table groups is bringing the problem because it is a reserved word for mysql. I will try it on MariaDB and see what happens.

Help with codeigniter 4 only default page is working anything else throws 404 page not found

as the title says, only the default page si working on my ci4 project. I have already posted on the CI forums about this and no answers yet, and also I have posted on stackoverflow with no decent answers yet. I am desperate. If I am able to make this work I still have to convert and entire social networking site from CI 3.1.13 to CI 4. I. am. desperate.

Here is my stackoverflow post as it is too long I do not wish to retype everything here : https://stackoverflow.com/questions/72455744/need-help-codeigniter-4-only-default-controller-is-working?noredirect=1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.