Documentation

Everything you need to know to get started with Stellar Engine

Quick Start

1. Database Setup
mysql -u root -p database_name < db/schema.sql

This creates all 12 tables and inserts default data including the admin user.

2. Configure Environment
cp .env.example .env# Edit .env with your database credentials
3. Login with Test Users
superadmin / superadmin - Full system access
admin / admin - User and content management
moderator / moderator - Content management only
user / user - Basic access
For production: delete test users and create secure accounts!

Architecture Overview

Configuration

  • config/params.php - All feature toggles
  • config/web.php - Yii2 configuration
  • .env - Secrets (never commit!)
  • db/schema.sql - Database setup

Helpers

  • T::t() - Translation
  • ConfigHelper - Settings
  • FlashHelper - Messages
  • AdminHelper - RBAC checks

Widgets

  • ThemeWidget - Theme switcher
  • LanguageWidget - Language picker
  • NotificationWidget - Bell icon
  • NewsletterWidget - Subscribe form

Feature Toggles

Every feature can be toggled in config/params.php:

'features' => [ 'themeSwitching' => true, // Light/dark/system 'rbac' => true, // Role-based access 'translations' => true, // Multi-language 'userLogin' => true, // Auth system 'notifications' => true, // In-app alerts 'fileUpload' => true, // File manager 'maintenance' => true, // Maintenance mode // ... and more],

Database Schema

userUser accounts and authentication
user_oauthOAuth provider links
auth_itemRBAC roles and permissions
auth_item_childRole hierarchy
auth_assignmentUser role assignments
auth_ruleRBAC business rules
system_settingKey-value configuration
languageAvailable languages
translationTranslation strings
notificationIn-app notifications
fileUploaded files
activity_logAudit trail

Common Patterns

Translations
// Simple stringT::t('Welcome');// With placeholderstrtr(T::t('Hello, {name}!'), [ '{name}' => $user->username]);
Flash Messages
FlashHelper::success('Saved!');FlashHelper::error('Failed.');FlashHelper::warning('Careful!');FlashHelper::info('Note.');
RBAC Checks
// In controller/viewif (Yii::$app->user->can('manageUsers')) { // Show admin controls}// Helper shortcutsAdminHelper::isSuperadmin();
Notifications
NotificationHelper::info( $userId, 'Welcome!', 'Your account is ready.');

Important Rules

HTML Rendering

Always use Html helpers, never raw HTML:

Html::tag('div', 'content', ['class' => 'box']);Html::beginTag('div') / Html::endTag('div');
All User Strings

Wrap every user-facing string with T::t():

throw new NotFoundHttpException(T::t('Page not found.'));
Never Commit Secrets

Keep .env in .gitignore. Use getenv() for API keys.

Ready to Explore?

Browse All Features