qblolz/trinity-web

Yii2 Starter Kit Application Template for TrinityCore

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 17

Watchers: 10

Forks: 14

Type:project

v0.1.5 2018-03-14 14:30 UTC

README

TABLE OF CONTENTS

  1. Description
  2. QuickStart
  3. DEMO
  4. Directory Structure
  5. Sync Exist Accounts

DESCRIPTION

This is Yii2 start application template for TrinityCore Emulator(ver. 3.3.5a).

Features
  • Bootstrap4
  • Hightcharts
  • Can change theme
  • Translations Editor
  • Language change action + behavior to choose locale based on browser preferred language
  • Sign in, Sign up, profile(avatar, locale, personal data), email activation etc
  • RBAC with predefined guest, user, moderator and administrator roles
  • RBAC migrations support
  • RBAC management
  • Content management components: articles, categories, static pages, editable carousels
  • Application settings form (based on Settings component)
  • Ready-to-go RESTful API module
  • File storage component + file upload widget
  • On-demand thumbnail creation trntv/yii2-glide
  • Command Bus with queued and async tasks support trntv/yii2-command-bus
  • Useful behaviors (GlobalAccessBehavior, CacheInvalidateBehavior, MaintenanceBehavior)
  • Yii2 log web interface
  • Application timeline component
  • Cache web controller
  • Maintenance mode component
  • System information web interface
  • dotenv support
  • Aceeditor widget
  • Datetimepicker widget,
  • Imperavi Reactor Widget,
  • Elfinder Extension
  • Xhprof Debug panel
  • Extended IDE autocompletion
  • Assets compression and concatenation
  • Some useful shortcuts

Quickstart

REQUIREMENTS

The minimum requirement by this application template that your Web server supports PHP 7.1 Required PHP extensions:

  • intl
  • gd
  • com_dotnet (for Windows)
Before you begin

If you do not have Composer, you may install it by following the instructions at getcomposer.org.

Download sources

https://github.com/qblolz/trinity-web/archive/master.zip

Or clone repository manually
git clone https://github.com/qblolz/trinity-web.git
Install composer dependencies
composer install
  1. Copy .env.dist to .env in the project root.
  2. Adjust settings in .env file
YII_DEBUG   = true
YII_ENV     = dev

Set application params

LINK_ASSETS=true
ACCESS_INSTALL = 192.168.1.1
ADMIN_GAME_ACCOUNT = ACCOUNT_ID

Set application canonical urls

API_HOST_INFO         = http://api.trinityweb.dev
FRONTEND_HOST_INFO    = http://trinityweb.dev
BACKEND_HOST_INFO     = http://admin.trinityweb.dev
STORAGE_HOST_INFO     = http://storage.trinityweb.dev

Configure your web-server for 4 domains with document_root path to web dir

..../project_folder/api/web - for api.trinityweb.dev
..../project_folder/frontend/web - for trinityweb.dev
..../project_folder/backend/web - for admin.trinityweb.dev
..../project_folder/storage/web - for storage.trinityweb.dev

Go to http://trinityweb.dev and follow installing instruction

DEMO

soon

DIRECTORY STRUCTURE

api
    config/             contains api configurations
    controllers/        contains Web controller classes
    modules/
        v1/             contains v1 api module
    runtime/            contains files generated during runtime
    web/                contains the entry script and Web resources
backend
    assets/             contains application assets such as JavaScript and CSS
    config/             contains backend configurations
    controllers/        contains Web controller classes
    models/             contains backend-specific model classes
    modules/            contains backend-specific modules
    runtime/            contains files generated during runtime
    views/              contains view files for the Web application
    widgets/            contains backend widgets
console
    config/             contains console configurations
    controllers/        contains console controllers (commands)
    dumps/              contains dumps for application
    runtime/            contains files generated during runtime
core
    actions/
    assets/             contains application assets such as JavaScript and CSS
    base/               contains shared base models classes
    behaviors/          contains shared behaviors
    commands/           contains shared commands
    components/         contains shared components
    config/             contains shared configurations
    filters/            contains shared filters
    grid/               contains shared grids
    mail/               contains view files for e-mails
    migrations/         contains database migrations
    models/             contains model classes used in backend,frontend,api,console
    modules/
        i18n/           i18n module for Web Application
        installer/      install module for Web Application
    rbac/               contains rbac base migration configuration
    runtime/            contains files generated during runtime
    sitemap/            contains sitemap url iterator
    traits/             contains traits
    validators/         contains validators
    widgets/            contains shared widgets
frontend
    assets/             contains application assets such as JavaScript and CSS
    components/         contains frontend-specific components classes
    config/             contains frontend configurations
    controllers/        contains Web controller classes
    models/             contains frontend-specific model classes
    modules/
        user/           module - user
    runtime/            contains files generated during runtime
    themes/             contains themes
        default/        contains view files for the Default theme
    web/                contains the entry script and Web resources
    widgets/            contains frontend widgets
storage
    cache/              contains cached files
    config/             contains storage configurations
    web/                contains the entry script and Web resources
vendor/                 contains dependent 3rd-party packages

Sync Accounts

  • If you already have some game accounts, you can synchronize it with web application
  • WARRNING: This command will only work after the installation is complete
  • NOTICE: This command will create account based on emails - if there is a duplicate account will not be created
  • run command
php yii app/sync-accounts

How to contribute?

You can contribute in any way you want. Any help appreciated (^_^)

Have any questions?

READ MORE