# cobraPHP Lean. Pragmatic. Goal-oriented. A pragmatic PHP framework for real-world systems. Website: https://cobraphp.dev GitHub: https://github.com/cobraphp/cobraphp Status Page: https://cobraphp.dev/status.php About: https://cobraphp.dev/about.php YouTube: https://youtube.com/@tech-jeweler ## Overview cobraPHP is a lean PHP framework for web applications, APIs, CLI tools, documentation workflows and integration tasks. It is built from real-world constraints, not assumptions. cobraPHP does not try to replace every existing framework. It exists for situations where a smaller, understandable and maintainable tool is the better choice. The framework focuses on simplicity, portability, explicit execution flow and practical development. Not built to be everything — built to get things done. ## Core Concepts - Pragmatic and lean PHP framework - HMVC and flat-app application modes - Explicit Web / API / CLI handling - Unified request wrapper concepts - Built-in REST/API layer (CApi) - Dependency-injection capable datastore abstraction - API endpoints can use interchangeable datastore drivers - SQLite support for portable projects - MySQL support via PDO - PostgreSQL planned and partially validated - Optional Composer integration - No mandatory package ecosystem - No fixed BASE_URL configuration required - Automatic runtime and URL detection - Relocatable project structure - Public webroot architecture (`/public`) - Lightweight internal tooling support - CLI routing and helpers - Auto-documentation / inspection tooling - Built-in portable development server support ## Philosophy cobraPHP keeps plain PHP visible and understandable. It supports HMVC where structure helps, flat applications where simplicity is sufficient, and explicit request handling where practical systems require Web, API and CLI execution together. The framework intentionally avoids heavy abstraction layers and unnecessary framework ceremony. Composer is supported, but not mandatory. ## Typical Use Cases - Small to medium web applications - Internal tools and admin systems - REST APIs and interface layers - ERP-adjacent integrations - Data transformation and transfer systems - CLI automation and scheduled jobs - Documentation and inspection workflows - Rapid prototyping - Portable/self-hosted PHP systems ## Intended Audience cobraPHP is intended for developers who prefer understanding over framework magic. It is especially useful where development, operations and practical system responsibility overlap. The framework targets pragmatic development scenarios rather than large enterprise ecosystem standardization. ## Current Maturity Current stage: Pre-1.0 / early usable. Core architecture is stable and usable. Higher-level tooling and ecosystem parts are still evolving. See: https://cobraphp.dev/status.php ## Non-Goals cobraPHP does not aim to provide: - A full enterprise framework ecosystem - Heavy abstraction layers - Mandatory framework conventions - Framework lock-in - Large scaffolding systems The framework intentionally stays small, understandable and adaptable. ## Technical Characteristics - Portable project structure - Reduced configuration requirements - Explicit execution flow - Minimal assumptions - Public webroot separation - Internal SQLite support - RedBean/datastore abstraction - HMVC + flat-app coexistence - Web/API/CLI convergence ## Recommended Entry Points - https://cobraphp.dev/ - https://cobraphp.dev/status.php - https://cobraphp.dev/about.php - https://github.com/cobraphp/cobraphp cobraPHP — built from real-world constraints, not assumptions.