callie-engine/callie-php
Composer 安装命令:
composer create-project callie-engine/callie-php
包简介
A zero-dependency, upload-and-run PHP micro-framework for building REST APIs. Perfect for shared hosting.
README 文档
README
A zero-dependency, upload-and-run PHP micro-framework for building REST APIs.
Perfect for shared hosting, cPanel, XAMPP, or any server with PHP 7.4+.
✨ Features
- Zero Dependencies - No Composer required, just download and run
- Express-style Routing -
$app->get(),$app->post(), etc. - Built-in Query Builder - Secure MySQL operations with PDO
- JWT Authentication - Built-in token generation and verification
- CORS Ready - Pre-configured for frontend integration
📦 Installation
Option 1: Download ZIP (Recommended)
- Download the latest release
- Extract to your server folder
- Configure
.envwith your database credentials - Done! Visit
http://localhost/your-folder
Option 2: Via Composer
composer create-project lracdim/callie-php my-app --stability=dev
🚀 Quick Start
1. Configure Database
Copy .env.example to .env and update your credentials:
DB_HOST=127.0.0.1 DB_NAME=your_database DB_USER=root DB_PASSWORD=your_password
2. Create Your First Route
Edit routes.php:
$app->get('/api/hello', function($ctx) { $ctx->success(['message' => 'Hello, World!']); }); $app->get('/api/users', function($ctx) { $users = Database::getInstance()->table('users')->get(); $ctx->success($users); }); $app->post('/api/users', function($ctx) { $id = Database::getInstance()->table('users')->insert($ctx->body); $ctx->success(['id' => $id], 'User created', 201); });
3. Test It
curl http://localhost/your-folder/api/hello
📁 Project Structure
├── core/ # Framework internals (don't edit)
│ ├── Callie.php
│ ├── Router.php
│ ├── Database.php
│ └── Security.php
├── .env # Your credentials (never commit!)
├── .env.example # Template for .env
├── .htaccess # Apache routing rules
├── index.php # Entry point
├── routes.php # YOUR API LOGIC GOES HERE
└── schema.sql # Database schema template
🔐 Authentication
// Login - Generate Token $app->post('/auth/login', function($ctx) { $user = Database::getInstance() ->table('users') ->where('email', $ctx->body['email']) ->first(); if (!$user || !Security::verifyPassword($ctx->body['password'], $user['password'])) { return $ctx->error('Invalid credentials', 401); } $token = Security::generateToken(['id' => $user['id'], 'role' => $user['role']]); $ctx->success(['token' => $token]); }); // Protected Route $app->get('/api/profile', function($ctx) { $user = Security::auth(); // Returns 401 if invalid $ctx->success($user); });
📋 Requirements
- PHP 7.4 or higher
- PDO extension (enabled by default)
- MySQL 5.7+ or MariaDB 10.2+
📄 License
MIT License - Use it however you want!
Made with ❤️ for developers who just want to ship.
callie-engine/callie-php 适用场景与选型建议
callie-engine/callie-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「php」 「rest」 「api」 「mysql」 「lightweight」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 callie-engine/callie-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 callie-engine/callie-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 callie-engine/callie-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
Alfabank REST API integration
A Flickr wrapper to allow you to call the Flickr api with Guzzle as the backend.Goal is to have 100% Flickr api coverage rather than just upload/display photos (currently at 23%).
High-performance, opinionated PHP 8 web framework with O(1) routing, parallel async MySQL, type-safe asset bridge, and React-island frontend
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-17