STCMS Documentation
Complete guide to building modern, secure React/PHP applications with STCMS framework
Installation & Setup
Complete guide to installing and setting up STCMS
Quick Start
1
Install STCMS
Terminal
composer require gemvc/stcms
Tip: Make sure you have Composer installed on your system.
2
Initialize Project
Terminal
php vendor/bin/stcms init
Tip: This creates the project structure and configuration files.
3
Install Frontend Dependencies
Terminal
npm install
Tip: Requires Node.js to be installed.
4
Build Assets
Terminal
npm run build
Tip: Compiles React components and Tailwind CSS.
5
Start Development Server
Terminal
php -S localhost:8000 -t public
Tip: Open http://localhost:8000 in your browser.
What You Get
Symfony Cache Modern caching (APCu/file) for performance
Symfony Dotenv Environment management via .env files
Guzzle HTTP API integration and HTTP client
Twig Templates Server-side rendering engine
Vite Build System React and asset bundling
Security Headers Apache configuration included
Environment Configuration
Configure your environment variables for API endpoints, caching, and default language:
Environment Variables
API_BASE_URL=http://localhost:80
CACHE_DRIVER=apcu
DEFAULT_LANGUAGE=en
APP_ENV=development
info: Change APP_ENV to "production" when deploying to enable caching and optimizations.
Common Issues
- Composer not found: Install Composer from getcomposer.org
- Node.js required: Install Node.js from nodejs.org
- PHP 8.0+: Ensure you have PHP 8.0 or higher installed
- APCu extension: Install for better performance (optional but recommended)
Tip: Run "php -v" and "node -v" to check your installed versions.