Download the PHP package forge-templates/php-openswoole-kit without Composer
On this page you can find all versions of the php package forge-templates/php-openswoole-kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download forge-templates/php-openswoole-kit
More information about forge-templates/php-openswoole-kit
Files in forge-templates/php-openswoole-kit
Download forge-templates/php-openswoole-kit
More information about forge-templates/php-openswoole-kit
Files in forge-templates/php-openswoole-kit
Vendor forge-templates
Package php-openswoole-kit
Short Description Production-ready PHP OpenSwoole boilerplate with clean architecture, request/response layer, and scalable structure.
License MIT
Package php-openswoole-kit
Short Description Production-ready PHP OpenSwoole boilerplate with clean architecture, request/response layer, and scalable structure.
License MIT
Please rate this library. Is it a good library?
Informations about the package php-openswoole-kit
OpenSwoole Production Skeleton
A high-performance, production-ready OpenSwoole HTTP server skeleton built with modern PHP architecture principles.
This project follows a clean architecture approach, using PSR-4 autoloading, strict separation of concerns, structured logging, and a lightweight routing system optimized for high concurrency workloads.
Features
- High-performance OpenSwoole HTTP server
- PSR-4 autoloading (no manual
requirein app layer) - Clean architecture (Http / Routing / Support / Controllers)
- Centralized configuration system
.envsupport viaphpdotenv- Production-grade logging (Monolog with rotating files)
- Global error & exception handling (Laravel-like behavior)
- Lightweight router with dynamic routes (
/users/{id}) - JSON-first API response layer
- Stateless request lifecycle (optimized for workers)
- Ready for horizontal scaling
📁 Project Structure
Requirements
- PHP 8.2+
- OpenSwoole extension
- Composer
Installation
Environment Setup
Run :
Or create .env file in the project root:
Running the Server
You should see:
🧠 Architecture Overview
1. Bootstrap Layer
- Loads Composer autoload
- Loads
.env - Builds configuration array
2. Configuration Layer
- Centralized config via
config/config.php - Environment values injected through
Envhelper - No direct
getenv()usage in business logic
3. HTTP Layer
Requestwraps OpenSwoole requestResponsehandles output (JSON / Text / HTML)- Stateless per request lifecycle
4. Routing Layer
- Static + dynamic routes supported
-
Supports:
/users/{id}/api/*
- Clean controller binding
5. Support Layer
- Global error handler (exceptions, fatal errors)
- Structured logging (Monolog)
- Central environment helper
Routing Example
Controller example:
Logging
Logs are stored in:
Features:
- Rotating logs
- Structured output
- Error + exception capture
- Production-safe format
Error Handling
- Global exception handler
- Fatal error capture
- Debug mode support
- Production-safe JSON error responses
Performance Notes
Designed for:
- Long-running OpenSwoole workers
- High concurrency traffic
- Minimal per-request overhead
- No repeated bootstrapping per request
🔐 Security Notes
- Sensitive values stored in
.env - Config layer isolates environment access
- Body size limits enforced
- Safe JSON decoding
- Controlled error output in production
📄 License
MIT
All versions of php-openswoole-kit with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
openswoole/core Version ^26.2
vlucas/phpdotenv Version ^5.6
monolog/monolog Version ^3.0
openswoole/core Version ^26.2
vlucas/phpdotenv Version ^5.6
monolog/monolog Version ^3.0
The package forge-templates/php-openswoole-kit contains the following files
Loading the files please wait ...