Muvon KISScore is a blazing fast framework built for Swoole - designed for rapid development with high performance async capabilities.
⚠️ Important: FPM support is deprecated. This framework is now Swoole-only for maximum performance.
Install via Composer:
composer require muvon/kisscoreAfter installation, all KissCore classes are available without namespace prefixes in the global namespace:
<?php
require_once 'vendor/autoload.php';
// Use core classes directly (no namespace needed)
$result = App::getJSON('config.json');
$input = Input::get('param');
$response = Response::json(['status' => 'ok']);
// Use Plugin classes with namespace
$data = Plugin\Data\DB::query('SELECT * FROM users');
// Use Lib classes with namespace
$ipInfo = Lib\IPInfo::fetch('127.0.0.1');
// Global functions are available
$config = config('app.name');
$typed = typify('123', 'int');To create a new KissCore project with skeleton files optimized for Swoole:
# Method 1: Using composer script
composer run-script kisscore-create-project
# Method 2: Using the CLI tool
./vendor/bin/kisscore-init initThis will:
- Copy skeleton files from
skel/to your project root - Copy binary tools from
bin/to your project'sbin/directory - Create necessary directory structure (
env/backup,env/log, etc.) - Generate a
.envfile with default configuration - Set up Swoole-optimized main application file
- Make all scripts executable
All core classes are available without namespace prefix:
App- Application utilities and lifecycle managementInput- Request input handling and parsing (Swoole-optimized)Result- Result type for error handlingCli- Command line interface utilitiesView- Template rendering and view managementRequest- HTTP request handling (Swoole-compatible)Response- HTTP response management (Swoole-compatible)Cookie- Cookie managementSession- Session handlingEnv- Environment configurationLang- InternationalizationSecret- Secret managementFetch- HTTP client utilities
Plugin\Data\DB- Database operations with connection poolingLib\IPInfo- IP information fetching utilities
config(string $param)- Get configuration valuestypify(mixed $var, string $type)- Type conversion utilities- And many more utility functions for rapid development...
After creating a project, these tools are available in bin/:
init- Project initializationphp-exec- PHP execution wrapperphp-exec-one- Single PHP executioncodestyle-analyze- Code style analysiscodestyle-check- Code style checkingcodestyle-fix- Code style fixingcron- Cron job utilitieswatcher- File watching utilities
your-project/
├── app/
│ ├── actions/ # Action handlers
│ ├── config/ # Configuration files
│ ├── lang/ # Language files
│ ├── scripts/ # Custom scripts
│ ├── static/ # Static assets
│ ├── views/ # Template files
│ ├── main.php # Swoole HTTP Server entry point
│ ├── start.php # Application startup
│ └── stop.php # Application cleanup
├── bin/ # Executable scripts
├── env/ # Environment directories
│ ├── backup/
│ ├── log/
│ ├── tmp/
│ └── var/
├── vendor/ # Composer dependencies
├── .env # Environment configuration
└── composer.json
After project initialization, configure your application by editing:
.env- Environment variablesapp/config/- Application configuration files
# Start the Swoole HTTP server
php app/main.phpThe default configuration starts a high-performance Swoole HTTP server with:
- Multi-worker processes
- Coroutine support
- Static file serving
- HTTP/2 support (configurable)
- Connection pooling
- Hot reload capabilities
KissCore is optimized for Swoole and provides:
- Async I/O: Non-blocking database and HTTP operations
- Connection Pooling: Efficient database connection management
- Coroutines: Built-in coroutine support for concurrent operations
- High Performance: Handles thousands of concurrent connections
- Memory Resident: Application stays in memory between requests
- WebSocket Support: Built-in WebSocket capabilities (configurable)
With Swoole, KissCore delivers:
- 10x-100x faster than traditional PHP-FPM
- Memory efficient with persistent connections
- Low latency response times
- High throughput for concurrent requests
The package includes development tools:
# Code style checking
./bin/codestyle-check
# Code style fixing
./bin/codestyle-fix
# Code analysis
./bin/codestyle-analyze
# File watching for development
./bin/watcher- PHP 8.1+
- Swoole Extension (required)
- Linux/macOS (recommended for production)
If you're migrating from PHP-FPM:
- Install Swoole extension
- Update your deployment to use
php app/main.phpinstead of web server - Review session and global state handling (memory persistent)
- Test concurrent request handling
MIT License - see LICENSE file for details.
- Muvon Un Limited hello@muvon.io