newtron/app
最新稳定版本:0.1.5
Composer 安装命令:
composer create-project newtron/app
包简介
PHP framework designed around the principle of complex features with embarrassingly simple code
README 文档
README
A fresh Newtron application ready for you to build something amazing.
About Newtron
Newtron is a PHP framework built around one core principle: complex features should require embarrassingly simple code. It's built to solve real developer pain points by making common, complex tasks trivially simple.
Current Status
Newtron is currently a work in progress. In it's current state, Newtron can support simple static sites.
✅ Phase 1 Complete: Core foundation
- Application container with dependency injection
- Request/Response abstraction
- Two routing modes (declarative or file-based)
- Middleware pipeline
- Quark, a custom templating engine
- Error handling and logging
🚧 Up Next: Developer experience improvements and the signature forms system
Requirements
- PHP 8.3 or higher
- Composer
Installation
composer create-project newtron/app my-app
Quick Start
// Start a development server cd public && php -S localhost:8000
// Create your first page (file-based routing) // /routes/hello.php <?php use Newtron\Core\Http\Response; use Newtron\Core\Routing\FileRoute; class Hello extends FileRoute { public function get(): void { return; } public function render(mixed $data): mixed { return Response::create('Hello world!'); } } // Or add a new route (declarative routing) // /routes/web.php <?php use Newtron\Core\Http\Response; use Newtron\Core\Routing\Route; Route::get('/hello', function () { return Response::create('Hello world!'); }); // Visit http://localhost:8000/hello
Project Structure
my-app/ ├── app/ │ └── Launcher.php # Helper for custom initialization ├── config/ │ ├── app.php # Application configuration │ └── routing.php # Routing settings ├── public/ │ ├── favicon.ico │ ├── index.php # Application entry point │ └── styles.css ├── routes/ │ └── welcome.php # Welcome file-based route └── templates/ └── welcome.quark.html # Quark welcome template
Need Help?
- Documentation: WIP
- Issues
- Discussions
Stay Updated
Newtron is in active development. Watch the repository to get notified when new phases are released.
The best is yet to come! 🚀
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-27