rith-1437/zeroping
Composer 安装命令:
composer create-project rith-1437/zeroping
包简介
ZeroPing is a lightweight, modern PHP framework with a clean MVC architecture, dependency injection, ORM, validation, caching, queues, a task scheduler, and batteries-included CLI tooling. Install it to build production applications.
关键字:
README 文档
README
About ZeroPing
ZeroPing is a lightweight, modern PHP framework built from scratch with a clean model–view–controller (MVC) architecture, a fast dependency-injection container, an expressive ORM, validation, caching, a background queue, a task scheduler, and developer-friendly CLI tooling. It is free, open-source, and created by Rin Nairith.
ZeroPing aims to be approachable for newcomers while remaining powerful enough for production applications — with zero magic, readable source, and no hidden configuration.
Key Features
- Expressive routing with named routes, route groups, prefixes, and middleware.
- Dependency Injection container with automatic resolution and reflection caching.
- Eloquent-style ORM with relationships, accessors/mutators, and pagination.
- Schema builder & migrations for versioned, reversible database changes.
- Validation with a rich rule set and custom rule support.
- Caching with multiple drivers and a per-request memory layer.
- Background queues (sync, database, file) and scheduled commands.
- Security middleware: CSRF protection, encryption, rate limiting, and HTML escaping.
- Blazing-fast CLI (
php zero) for scaffolding, migrations, and maintenance. - Zero external runtime dependencies beyond PHP itself.
Requirements
- PHP >= 8.1
- Composer
- MySQL / MariaDB (or another PDO-supported database)
Installation
Option A — Composer (recommended)
Start a new project with Composer (downloads the packaged release from Packagist):
composer create-project rith-1437/zeroping my-app cd my-app # The installer copies .env, generates your APP_KEY, and prepares storage. php zero serve
The post-create-project-cmd script runs automatically after install.
Option B — Clone from GitHub
To work from the source repository instead:
git clone https://github.com/RITH-1437/ZeroPing.git my-app
cd my-app
composer install
cp .env.example .env
php zero key:generate
php zero serve
Run php zero doctor at any time to verify your installation.
Documentation
The full documentation lives in the docs/ directory and can
be opened directly in a browser, or built into a static site. It covers
installation, routing, the container, database, ORM, validation, caching,
queues, scheduling, security, testing, deployment, and the CLI reference.
A quick tour of the most common commands:
php zero serve # start the development server php zero route:list # list all registered routes php zero make:controller BlogController php zero make:model Post php zero migrate # run pending migrations php zero test # run the test suite php zero --help # list all available commands
Quick Start
After creating your project, build your first page in three steps.
1. Register a route (config/routes.php):
use App\Core\Routing\Router; use App\Controllers\HomeController; Router::get('/', [HomeController::class, 'index']);
2. Create a controller (app/Controllers/HomeController.php):
<?php namespace App\Controllers; use App\Core\View\Controller; class HomeController extends Controller { public function index(): string { return view('home', [ 'name' => config('app.name'), ]); } }
3. Create a view (views/home.php):
<h1>Hello from <?= e($name) ?>!</h1>
Start the server and visit your page:
php zero serve
# open http://localhost:1437
Project Structure
A freshly created ZeroPing project looks like this:
my-app/
├── app/ # Your application code
│ ├── Controllers/ # HTTP controllers
│ ├── Models/ # Eloquent-style ORM models
│ ├── Middleware/ # HTTP middleware
│ ├── Services/ # Business logic services
│ └── Providers/ # Service providers
├── config/ # routes.php, database.php, app.php
├── public/ # Web entry point (index.php)
├── views/ # Plain-PHP view templates
├── database/
│ └── migrations/ # Database migrations
├── storage/ # Cache, logs, and uploaded files
├── tests/ # Unit & Feature tests
├── zero # The CLI binary
└── .env # Environment configuration
CLI Usage
ZeroPing includes a batteries-included CLI. The most common commands:
php zero serve # start the development server php zero migrate # run database migrations php zero make:controller # scaffold a controller php zero make:model # scaffold a model php zero route:list # list registered routes php zero doctor # verify your installation php zero --help # full command reference
See the CLI Reference for the complete list.
Examples
ZeroPing ships with ready-made starter templates you can scaffold instantly:
php zero new empty # minimal skeleton php zero new mvc # full CRUD with user management php zero new blog # blog with posts and pagination php zero new api # RESTful API boilerplate php zero new dashboard # admin dashboard with widgets
A plan for additional example applications is available in docs/EXAMPLES.md.
Community
- 💬 Discussions: ask questions and share ideas at GitHub Discussions.
- 🐞 Issues: report bugs and request features using the issue templates.
- 🔒 Security: report vulnerabilities privately via our security policy.
Contributing
Thank you for considering contributing to ZeroPing! Please read the contribution guide before opening a pull request.
Code of Conduct
To ensure the ZeroPing community stays welcoming to everyone, please review and abide by our Code of Conduct.
Security Vulnerabilities
If you discover a security vulnerability within ZeroPing, please review our security policy for responsible disclosure instructions. You can report issues privately to Rin Nairith at nairithrin143@gmail.com.
License
ZeroPing is open-source software licensed under the MIT license.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-12