crenspire / yii2-react-starter
Yii2 - React Modern Starter Kit with ShadCN UI and Tailwind
Package info
github.com/crenspire/yii2-react-starter
Language:JavaScript
Type:project
pkg:composer/crenspire/yii2-react-starter
Requires
- php: >=8.2
- crenspire/yii2-inertia: ^2.0
- vlucas/phpdotenv: ^5.6
- yiisoft/yii2: ~2.0.55
- yiisoft/yii2-symfonymailer: ~2.0.3
Requires (Dev)
- codeception/codeception: ^5.0.0 || ^4.0
- codeception/lib-innerbrowser: ^4.0 || ^3.0 || ^1.1
- codeception/module-asserts: ^3.0 || ^1.1
- codeception/module-filesystem: ^3.0 || ^2.0 || ^1.1
- codeception/module-yii2: ^1.1
- codeception/verify: ^3.0 || ^2.2
- yiisoft/yii2-debug: ~2.1.0
- yiisoft/yii2-faker: ~2.0.0
- yiisoft/yii2-gii: ~2.2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-17 04:57:50 UTC
README
Yii2 React Starter Kit
A modern Yii 2 application template with a React frontend powered by
Inertia.js and shadcn/ui.
Authentication, roles and user management are done. Start on the features that matter.
Getting started · Documentation · Build your first feature
Features
- Authentication: sign in with "keep me signed in", registration, password resets by email, password changes
- Roles:
userandadmin, enforced on the server, manageable from the UI or the command line - User management: searchable, sortable, paginated table with filters, column picker and row actions
- Admin dashboard: statistics, a sign-ups chart and recent users; members see their own account overview
- Security:
- CSRF protection on every request
- Login throttling, and responses that don't reveal which emails are registered
- Hashed, single-use reset tokens
- A password change signs out other sessions
- Protection against mass assignment
- shadcn/ui admin layout: collapsible sidebar, breadcrumbs, user menu, light, dark and system themes
- No API layer: controllers return React pages with Inertia.js; server-side validation errors appear in forms
- Tested: Codeception unit and functional tests that run on SQLite with no setup
Tech stack
| Backend | Frontend | Tooling |
|---|---|---|
| Yii 2.0 on PHP 8.2+ | React 19 | Vite 6 |
| crenspire/yii2-inertia 2.0 | Inertia.js v3 | Codeception 5 |
| MySQL / MariaDB | shadcn/ui, Radix UI, Tailwind CSS 4 | ESLint |
| Symfony Mailer | lucide icons, Recharts, Geist font | Docker Compose |
Quick start
git clone git@github.com:crenspire/yii2-react-starter.git my-app cd my-app composer install && npm install cp .env.example .env # set COOKIE_VALIDATION_KEY and the database credentials php yii migrate php yii seed/admin admin@example.com npm run serve # http://localhost:8080
Requirements: PHP 8.2+, Composer, Node.js 22+ and MySQL or MariaDB. See Getting started for details.
Screenshots
Sign in |
User management |
Edit user |
Settings |
Screenshots follow your GitHub theme: switch between light and dark mode to see both.
Documentation
| Getting started | Installation, first admin user, development servers |
| Configuration | Environment variables, email, frontend assets |
| Architecture | How requests become React pages, shared props, redirects, errors |
| Authentication and roles | Sign-in security, password resets, roles, access control |
| Frontend | Pages, layouts, components, forms, theming |
| Building a feature | Step-by-step walkthrough from migration to tests |
| Testing | Unit and functional tests and their helpers |
| Deployment | Production checklist, Nginx, Apache, Docker |
| Troubleshooting | Common problems and fixes |
The Inertia adapter has its own documentation at crenspire.github.io/yii2-inertia.
License
Released under the BSD-3-Clause license. See LICENSE.md.