PHPackages                             callie-engine/callie-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. callie-engine/callie-php

ActiveProject[Framework](/categories/framework)

callie-engine/callie-php
========================

A zero-dependency, upload-and-run PHP micro-framework for building REST APIs. Perfect for shared hosting.

v1.0.0(5mo ago)03MITPHPPHP &gt;=7.4

Since Dec 17Pushed 5mo agoCompare

[ Source](https://github.com/callie-engine/callie-php)[ Packagist](https://packagist.org/packages/callie-engine/callie-php)[ Docs](https://github.com/lracdim/callie-php)[ RSS](/packages/callie-engine-callie-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

🚀 Callie PHP
============

[](#-callie-php)

**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
----------

[](#-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
--------------

[](#-installation)

### Option 1: Download ZIP (Recommended)

[](#option-1-download-zip-recommended)

1. [Download the latest release](https://github.com/lracdim/callie-php/releases)
2. Extract to your server folder
3. Configure `.env` with your database credentials
4. Done! Visit `http://localhost/your-folder`

### Option 2: Via Composer

[](#option-2-via-composer)

```
composer create-project lracdim/callie-php my-app --stability=dev
```

---

🚀 Quick Start
-------------

[](#-quick-start)

### 1. Configure Database

[](#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

[](#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

[](#3-test-it)

```
curl http://localhost/your-folder/api/hello
```

---

📁 Project Structure
-------------------

[](#-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
----------------

[](#-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
--------------

[](#-requirements)

- PHP 7.4 or higher
- PDO extension (enabled by default)
- MySQL 5.7+ or MariaDB 10.2+

---

📄 License
---------

[](#-license)

MIT License - Use it however you want!

---

Made with ❤️ for developers who just want to ship.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance73

Regular maintenance activity

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

152d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c38f079807518d5f2509b69876b649fd4752ea10f839021d5e1d80642d8f495?d=identicon)[callie-engine](/maintainers/callie-engine)

---

Top Contributors

[![callie-engine](https://avatars.githubusercontent.com/u/250156193?v=4)](https://github.com/callie-engine "callie-engine (4 commits)")

---

Tags

phpapiframeworkrestmysqllightweightmicro-frameworkno-dependenciescallie

### Embed Badge

![Health badge](/badges/callie-engine-callie-php/health.svg)

```
[![Health](https://phpackages.com/badges/callie-engine-callie-php/health.svg)](https://phpackages.com/packages/callie-engine-callie-php)
```

###  Alternatives

[patricksavalle/slim-rest-api

Production-grade REST-API App-class for PHP SLIM, in production on https://zaplog.pro (https://api.zaplog.pro/v1)

101.4k](/packages/patricksavalle-slim-rest-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
