Search by

acex / ace-framework

themavericknatti

The official application skeleton and starter for the Ace PHP MVC Framework.

Package info

github.com/themavericknatti/ace-framework

Type:project

pkg:composer/acex/ace-framework

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-10-20 15:25 UTC

This package is auto-updated.

Last update: 2026-10-20 15:40:10 UTC


README

PHP Version License: MIT Core Library

The official application starter skeleton for the Ace PHP MVC Framework. Ace provides a modern, fast, and structured foundation for building web applications and REST APIs in PHP 8.2+ without bloated dependencies.

๐Ÿš€ Quick Start

1. Create a New Project

You can scaffold a new project using Composer:

composer create-project acex/ace-framework my-app
cd my-app

Or clone this repository directly:

git clone https://github.com/themavericknatti/ace-framework.git my-app
cd my-app
composer install

2. Configure Environment

Copy the example environment configuration (automatically handled when using composer create-project):

cp .env.example .env

Open .env and set your database credentials:

APP_NAME="Ace Application"
APP_ENV=development
APP_DEBUG=true
APP_URL="http://localhost:8000"

DB_HOST=127.0.0.1
DB_PORT=3306
DB_NAME=ace_db
DB_USER=root
DB_PASS=

3. Run Database Migrations

Apply the initial schema:

php ace migrate

4. Start the Development Server

Launch the built-in development server:

php ace serve

Your application is now running at http://localhost:8000!

๐Ÿ“ Directory Structure

ace-framework/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ Controllers/       # HTTP Controllers (e.g. HomeController.php)
โ”‚   โ”œโ”€โ”€ Jobs/              # Asynchronous / Queued background jobs
โ”‚   โ”œโ”€โ”€ Middlewares/       # HTTP & Route Middlewares
โ”‚   โ”œโ”€โ”€ Models/            # Active Record database models (e.g. User.php)
โ”‚   โ”œโ”€โ”€ Repositories/      # Data access layer
โ”‚   โ”œโ”€โ”€ Requests/          # FormRequest validation classes
โ”‚   โ””โ”€โ”€ Services/          # Domain business logic layer
โ”œโ”€โ”€ config/
โ”‚   โ”œโ”€โ”€ app.php            # Core application configuration
โ”‚   โ”œโ”€โ”€ cors.php           # CORS middleware settings (React, Vue, mobile apps)
โ”‚   โ”œโ”€โ”€ database.php       # PDO connection & database configuration
โ”‚   โ”œโ”€โ”€ payment.php        # Unified payment gateway configurations
โ”‚   โ”œโ”€โ”€ settings.json      # Dynamic settings
โ”‚   โ””โ”€โ”€ templates.php      # Multi-template engine configuration
โ”œโ”€โ”€ migrations/            # Version-controlled database migrations
โ”œโ”€โ”€ public/                # Public web document root (pointed to by web servers)
โ”‚   โ”œโ”€โ”€ index.php          # Front Controller (Application entry point)
โ”‚   โ”œโ”€โ”€ .htaccess          # Apache rewrite rules
โ”‚   โ””โ”€โ”€ uploads/           # User file upload directory
โ”œโ”€โ”€ routes/
โ”‚   โ”œโ”€โ”€ web.php            # Web routes (sessions, CSRF, template rendering)
โ”‚   โ””โ”€โ”€ api.php            # RESTful API routes (stateless, CORS, API Key / Bearer auth)
โ”œโ”€โ”€ seeds/                 # Database seeders
โ”œโ”€โ”€ storage/               # Application runtime storage
โ”‚   โ”œโ”€โ”€ cache/             # Rate-limiter & response cache
โ”‚   โ”œโ”€โ”€ framework/         # Maintenance down status & temp files
โ”‚   โ”œโ”€โ”€ logs/              # Application error & audit logs
โ”‚   โ””โ”€โ”€ views/             # Compiled template cache
โ”œโ”€โ”€ tests/                 # Automated test suite
โ”‚   โ”œโ”€โ”€ Feature/           # Feature & integration tests
โ”‚   โ””โ”€โ”€ Unit/              # Unit tests
โ”œโ”€โ”€ views/                 # Presentation layer (layouts, templates, errors)
โ”œโ”€โ”€ .env.example           # Example environment file
โ”œโ”€โ”€ .gitignore             # Standard git ignore definitions
โ”œโ”€โ”€ .htaccess              # Root security and rewrite rules for shared hosting
โ”œโ”€โ”€ ace                    # Ace CLI Command Runner executable
โ”œโ”€โ”€ composer.json          # Project Composer manifest
โ””โ”€โ”€ GUIDE.md               # Comprehensive architecture & developer guide

๐Ÿ› ๏ธ Ace CLI Commands

The included ace executable provides helpful CLI commands for development:

Command Description
php ace serve Start local PHP development server at localhost:8000
php ace migrate Execute pending database migrations
php ace migrate:rollback Roll back the most recent migration batch
php ace migrate:status Check status of all migrations
php ace db:seed Run database seeders
php ace make:controller <Name> Generate a new Controller class
php ace make:model <Name> -m Generate a new Model and migration
php ace make:migration <name> Generate a new migration file
php ace make:seeder <Name> Generate a new seeder class
php ace make:middleware <Name> Generate a custom HTTP middleware
php ace make:job <Name> Generate a new queued background job
php ace make:request <Name> Generate a FormRequest validation class
php ace make:repository <Name> Generate a Repository class
php ace make:service <Name> Generate a Service business logic class
php ace queue:work Run the background queue worker process
php ace tinker Start interactive CLI console shell
php ace down / php ace up Put application into or out of maintenance mode

๐Ÿงช Testing

Run automated tests using PHPUnit:

composer test
# or
vendor/bin/phpunit

๐Ÿ“– Developer Documentation

For complete framework documentation, coding standards, layer responsibilities, and architecture guidelines, please consult:

  • GUIDE.md โ€” Comprehensive Ace Framework Architecture & Developer Guide
  • how-to-upload.md โ€” Shared Hosting & cPanel Deployment Guide

๐Ÿ“ฆ Core Engine & Ecosystem

๐Ÿ“„ License

The Ace PHP MVC Framework is open-sourced software licensed under the MIT license.