Download the PHP package ace-core/framework without Composer
On this page you can find all versions of the php package ace-core/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package framework
✨ Ace PHP MVC Framework
A handcrafted, lightweight, zero-dependency custom PHP MVC framework. The core engine is fully separated and ready to be packaged on Packagist, making it easy to create modular PHP applications. It is built to run perfectly both locally in subdirectories (like XAMPP's /mvc/ or /mvc/public/) and on a live production server at a domain root.
🚀 Key Features
- Strict MVC Separation: Clean structures for Controllers, Models, and Views.
- Core Framework Decoupling: Core framework classes reside in
src/under theAce\namespace, making it packagist-ready. User applications reside inapp/under theApp\namespace. - Zero-Config Active Record ORM & Fluent Query Builder: Exposes static query methods (
findOne(),find(),all(),delete()) and simple instance persistence (save()). Includes a fluent query builder interface for clean DB interactions. - API Resources & JSON Serialization: Transform database entities and collections into customized, wrapped JSON representations (
Ace\JsonResource) for APIs, keeping sensitive schema details hidden. - Built-in Guard System (Input & Output Protection): Automates XSS input sanitization recursively before saving attributes to the DB (excluding
$rawFields), enforces mass-assignment protection using$fillableand$guarded, and provides safe HTML output helpers ($model->safe()ande()). - Smart Request & Response Wrappers: Automates XSS input sanitization on incoming parameters and provides unified JSON and redirection responses.
- Local Subdirectory Routing: Base paths are auto-detected and stripped dynamically from the request URI so routes work interchangeably on XAMPP and in production.
- Controller Middlewares: Apply route guard filters (e.g. restricting profile dashboards to authenticated sessions via
AuthMiddlewareor auth pages viaGuestMiddleware). - Dependency Injection Container: Reflection-based constructor auto-wiring. Type-hint any class in your controller constructors and the framework resolves and injects dependencies automatically — including core singletons like
Request,Database, andSession. - Secure Template Directives: Automated XSS escaping, safe URL output with
@url()to protect links while maintaining query strings, and convenience directives:@csrf,@isset,@empty, and@session. - Paystack, Stripe, and Flutterwave Integration: Multi-gateway payment clients integrated using native PHP cURL (zero SDK dependencies) to initialize payments, verify transactions, and validate signed webhook signatures.
- Self-Healing Schema Migrations: Runs automatically on application boot or via the Ace CLI to build/verify database structures.
- Premium Glassmorphic Dark UI: Curated vanilla CSS typography (Outfit Google Font), glowing alerts, responsive grids, and clean dark mode layout structure out-of-the-box.
- Robust Error Handling: Registers global handlers to capture errors/exceptions and renders beautiful, snippet-highlighted debugging screens (Development mode) or clean generic error pages (Production mode).
📂 Directory Layout
🛠️ Setup & Installation
1. Prerequisite Checklist
- PHP 8.0 or higher
- Composer installed
- MySQL (e.g. XAMPP Control Panel running Apache & MySQL)
2. Clone/Extract the Project
Ensure the project sits inside your web directory (e.g., C:/xampp/htdocs/mvc).
3. Install Dependencies (Autoloader Setup)
Open a terminal in the project directory and run:
4. Configuration Setup
Duplicate the .env.example file to .env:
Open .env and fill in your database credentials:
Note: The database does not need to exist. The framework will automatically detect if it is missing and attempt to create it (mvc_db) and its tables on the first page load.
5. Running the Application
- Under XAMPP: Access the framework directly at
http://localhost/mvc/(url rewriting automatically routes requests topublic/index.phpusing the root.htaccess). -
Via built-in PHP server: Open your terminal in the project folder and run:
Then access
http://localhost:8000/.
📖 Quick-Start Framework Guide
1. Registering Routes
Routes are registered in routes/web.php pointing to Controller Actions or closures:
2. Controller-Level Middlewares
Protect specific actions by registering middlewares in your Controller's constructor:
3. Dependency Injection (Constructor Auto-wiring)
The framework's DI Container automatically resolves constructor dependencies when instantiating controllers. Simply type-hint what you need:
4. Fluent Query Builder & Active Record ORM
Models map to database tables seamlessly, supporting both raw Active Record operations and clean, fluent queries.
Fluent & Fail-safe Querying
Save (INSERT / UPDATE) & Factory Creation
Deletion
5. API Resources & JSON Serialization
API Resources (Ace\JsonResource) act as a transform mapping layer between models and API endpoints:
Return them directly from controller actions or closures to serve formatted JSON responses automatically:
6. Template Views & Custom Directives
Views support convenient Blade-like template directives:
Ace Core Framework Copyright © 2026 Celio Natti Released under the MIT License.