cmsgears / template-basic
The basic template uses core and forms modules with basic theme for website and admin theme for admin.
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.0.0
- bower-asset/animate.css: 3.7.*
- bower-asset/aos: 2.3.*
- bower-asset/chart.js: 2.9.*
- bower-asset/conditionizr: 4.5.*
- bower-asset/datetimepicker: 2.5.*
- bower-asset/fontawesome: 5.5.*
- bower-asset/handlebars: 4.7.*
- bower-asset/imagesloaded: 4.1.*
- bower-asset/intl-tel-input: 16.0.*
- bower-asset/jquery-ui: 1.12.*
- bower-asset/lightbox2: 2.11.*
- bower-asset/malihu-custom-scrollbar-plugin: 3.1.*
- bower-asset/moment: 2.24.*
- bower-asset/progressbar.js: 1.1.*
- cmgtools/breeze: dev-1.0.0-alpha
- cmgtools/breeze-icons: dev-1.0.0-alpha
- cmgtools/velocity: dev-1.0.0-alpha
- cmgtools/velocity-apps: dev-1.0.0-alpha
- cmgtools/velocity-breeze: dev-1.0.0-alpha
- cmsgears/module-core: dev-1.0.0-alpha
- cmsgears/module-forms: dev-1.0.0-alpha
- cmsgears/module-newsletter: dev-1.0.0-alpha
- cmsgears/module-notify: dev-1.0.0-alpha
- cmsgears/module-sms: dev-1.0.0-alpha
- cmsgears/module-sns-connect: dev-1.0.0-alpha
- cmsgears/plugin-assets: dev-1.0.0-alpha
- cmsgears/plugin-breeze-templates: dev-1.0.0-alpha
- cmsgears/plugin-file-manager: dev-1.0.0-alpha
- cmsgears/plugin-google-analytics: dev-1.0.0-alpha
- cmsgears/plugin-google-api: dev-1.0.0-alpha
- cmsgears/plugin-google-maps: dev-1.0.0-alpha
- cmsgears/plugin-icon-picker: dev-1.0.0-alpha
- cmsgears/plugin-piwik-analytics: dev-1.0.0-alpha
- cmsgears/plugin-seo: dev-1.0.0-alpha
- cmsgears/plugin-social-meta: dev-1.0.0-alpha
- cmsgears/widget-block: dev-1.0.0-alpha
- cmsgears/widget-category: dev-1.0.0-alpha
- cmsgears/widget-cleditor: dev-1.0.0-alpha
- cmsgears/widget-comment: dev-1.0.0-alpha
- cmsgears/widget-form: dev-1.0.0-alpha
- cmsgears/widget-form-ajax: dev-1.0.0-alpha
- cmsgears/widget-gallery: dev-1.0.0-alpha
- cmsgears/widget-grid: dev-1.0.0-alpha
- cmsgears/widget-login: dev-1.0.0-alpha
- cmsgears/widget-mapper: dev-1.0.0-alpha
- cmsgears/widget-nav: dev-1.0.0-alpha
- cmsgears/widget-newsletter: dev-1.0.0-alpha
- cmsgears/widget-popup: dev-1.0.0-alpha
- cmsgears/widget-social: dev-1.0.0-alpha
- cmsgears/widget-tag: dev-1.0.0-alpha
- cmsgears/widget-tinymce: dev-1.0.0-alpha
- foxslider/cmg-plugin: dev-1.0.0-alpha
- kartik-v/yii2-mpdf: 1.0.*
- phpoffice/phpspreadsheet: 1.16.*
- yiisoft/yii2: 2.0.40
- yiisoft/yii2-httpclient: 2.0.*
- yiisoft/yii2-swiftmailer: 2.1.*
- yiisoft/yii2-twig: 2.4.*
Requires (Dev)
- codeception/codeception: ^4.0
- codeception/module-asserts: ^1.0
- codeception/module-filesystem: ^1.0
- codeception/module-yii2: ^1.0
- codeception/verify: ~0.5.0 || ~1.1.0
- symfony/browser-kit: >=2.7 <=4.2.4
- yiisoft/yii2-debug: ~2.1.0
- yiisoft/yii2-faker: ~2.0.0
- yiisoft/yii2-gii: ~2.1.0
This package is auto-updated.
Last update: 2024-12-04 12:49:50 UTC
README
CMSGears Basic Template
CMSGears Basic Template is a skeleton CMSGears application best for developing CMSGears based web applications utilizing the core modules including Core, Forms, Newsletter, Notify, and SNS Connect.
The template includes four tiers: REST, frontend, backend, and console, each of which is a separate Yii application.
The template is designed to work in a team development environment. It supports deploying the application in different environments.
The basic template is tailored to develop small and medium web applications and support mobile applications without needing complex modules including Module CMS, Module Community, etc. In case you need CMS system or CMS based modules, kindly look at other templates including Blog, News, and Shop.
DIRECTORY STRUCTURE
common
config/ contains shared configurations
mail/ contains view files for e-mails
models/ contains model classes used in REST, backend and frontend
services/ contains shared services used in REST, backend and frontend
tests/ contains tests for common classes
console
components/ contains console components
config/ contains console configurations
controllers/ contains console controllers (commands)
migrations/ contains database migrations
models/ contains console-specific model classes
runtime/ contains files generated during runtime
services/ contains console services
backend
assets/ contains application asset classes
config/ contains backend configurations
controllers/ contains Web controller classes
models/ contains backend-specific model classes
runtime/ contains files generated during runtime
services/ contains backend-specific services
tests/ contains tests for backend application
views/ contains view files for the Web application
web/ contains the entry script and Web resources
frontend
assets/ contains application asset classes
config/ contains frontend configurations
controllers/ contains Web controller classes
models/ contains frontend-specific model classes
runtime/ contains files generated during runtime
services/ contains frontend-specific services
tests/ contains tests for frontend application
views/ contains view files for the Web application
web/ contains the entry script and Web resources
rest
config/ contains REST configurations
controllers/ contains REST controller classes
models/ contains rest-specific model classes
runtime/ contains files generated during runtime
services/ contains rest-specific services
tests/ contains tests for REST application
web/ contains the entry script
modules/ contains the project modules
templates/ contains the project templates
themes/ contains the template themes
uploads/ contains the uploaded files
widgets/ contains the template widgets
environments/ contains environment-based overrides
vendor/ contains dependent 3rd-party packages
Modules, Plugins, and Widgets
- It's pre-installed with the Core, Forms, Newsletter, Notify, SNS Connect, and SMS modules.
- It's pre-installed with the Assets, Breeze Templates, File Manager, Social Meta, and Icon Picker plugins.
- The widgets that ships by-default with the basic template includes CLEditor, TinyMCE, Comment, Block, Nav, Login, Gallery, Newsletter, Form, AJAX Form, Tag, Category, Social, Pop-up, and Grid.
- It's also pre-installed with the FoxSlider Plugin for CMSGears.
- Apart from the modules, plugins, and widgets specified in points 1 to 3, the template is also configured for several 3-rd party assets including conditionizr, moment, chart.js, etc.
Themes
- The Admin Theme provide layouts to manage and configure the modules and plugins.
- The template is pre-configured to use the Basic Theme for front end.
- The basic theme can be considered as the starting point of your application. It's meant to be further updated based on the project needs considering it as the base.
Template Details
The Basic Template is a group of directories and configuration files used to manage the backend, frontend, console, and REST applications.
It also provide the migration scripts with test data.
Template Demo
- Frontend - https://demo.cmsgears.com/templates/basic (demouser@cmsgears.com, test#123)
- Admin - https://demo.cmsgears.com/templates/basic/admin (demomaster@cmsgears.com, test#123)
Real time emails are disabled on demo sites and the database reset is done every hour.
Template Installation
The Basic Template can be installed via composer using the below mentioned command. To install composer, please refer to the official site https://getcomposer.org.
We can install release and pre-release i.e. alpha, beta versions using composer as mentioned below.
// Release Versions
php composer.phar create-project --prefer-dist --stability=stable cmsgears/template-basic basicdemo
or
composer create-project --prefer-dist --stability=stable cmsgears/template-basic basicdemo
We can also use below mentioned commands to access the pre release code.
// Pre-release Versions
php composer.phar create-project --prefer-dist --stability=<alpha or beta or RC> cmsgears/template-basic basicdemo
or
composer create-project --prefer-dist --stability=<alpha or beta or RC> cmsgears/template-basic basicdemo
In case the web server is Apache, either of the above mentioned commands can be run directly at Apache web root directory. More details can be found at http://www.cmsgears.org.
We can also directly install the template having latest code by cloning Basic Template using the selected branch.
One Click Setup
We are working on making a one click setup which can avoid most of the steps as listed below to configure the template.
Template Configuration
- Create the database, database user and update the environments configuration - environments/dev/common/config/main-env.php, environments/alpha/common/config/main-env.php, environments/prod/common/config/main-env.php. The default database and database user are basicdemo.
- To trigger real-time mails in dev or alpha environments, remove the config param 'useFileTransport' from - environments/dev/common/config/main-env.php, environments/alpha/common/config/main-env.php.
- After configuring the database, run the php script init.php to initialize the application for the predefined environments. The script will ask to choose environment among prod, alpha or dev. It will copy the appropriate environment files to the relevant directories.
- Install the DB using the migrate-up commands available in the console/migrations directory. The command must be run from the root directory of the project. Also make sure that the migration command files have executable permissions.
- The migration scripts available at console/migrations/data directory ships with the test data required for demonstration purpose. It can be tweaked or updated based on the requirements. Make sure to execute the migrate-down command before making changes. Once done, again execute the migrate-up command to bring up the changes.
- Update htaccess located at the root directory based on your web server needs. More details about live application settings can be found at http://www.cmsgears.org.
- Download the Admin and Basic Themes and copy the themes content at /themes/admin and /themes/basic directories respectively.
- Now we can run the template using our preferred browser. Example links are as mentioned below.
- Login to admin and update file upload url in case project name or upload directory is different.
- By default all the files uploaded by users will be stored in uploads directory. The uploads directory can be changes based on project needs.
- Update the migration scripts if required and run the commands migrate-down and migrate-up to refresh the database. Make sure that it's done only on dev and alpha environments. Do not ever run migrate-down on live environment, else it will erase all the live data.
- Landing - Site index page.
- Login - Login page allows users to login.
- Register - Register page allows users to sign up.
- Confirm Account - Users can confirm account by following the link sent to their email while submitting Register form.
- Forgot Password - It can be used to generate password reset link.
- Forgot Password OTP - It can be used to generate OTP to reset the password. It will work if SMS manager is available.
- Reset Password - Users can reset password by following the link sent to their email while submitting Forgot Password form.
- Reset Password OTP - It can be used to reset the password by providing a valid OTP. It will work if SMS manager is available.
- Activate Account - User accounts added by site admin can be activated using this page.
- Privacy - The page to show Privacy Policy.
- Terms - The page to show Terms and Conditions.
- FAQs - The page to show the FAQs.
- Contact Form (Dynamic Form)
- Feedback Form (Custom Comment)
- Testimonial Form (Custom Comment)
- Dashboard - Page displayed on login.
- Profile - Basic - The Basic Page allows user to update the basic details including email, username, name, gender, and date of birth.
- Profile - Account - The Account Page allows user to update the password.
- Profile - Address - The Address Page allows user to manage multiple address.
- Settings - Settings page allows users to configure settings including privacy, notifications, and reminders.
- Notifications - Shows user notifications.
- Reminders - Shows user reminders.
- Activities - Shows user activities.
- Events - Shows calendar events associated with the user using list view.
- Events Calendar - Shows calendar events associated with the user using calendar view.
- Events Cards - Shows calendar events associated with the user using card view.
- Event - Create - The Create Event Page allows user to add a Calendar Event.
- Event - Update - The Create Event Page allows user to update a Calendar Event.
The default application URLs will be as shown below. Replace the basicdemo with the project name, in case it's changed.
Frontend - http://localhost/basicdemo/frontend/web
Admin - http://localhost/basicdemo/frontend/web
Template - Updates
The template dependencies can be updated using the composer.json file located at the root of template.
Template Pages
The template ships with pre-configured pages as listed below.
Notes: The pages Forgot Password OTP and Reset Password OTP will work only if the SMS manager is available with SMS balance.
Template Forms
The template also provide forms using dynamic forms and comment system.
Private Pages
The basic template provides a blank dashboard, user profile, user settings, and calendar.