acex / ace-framework
The official application skeleton and starter for the Ace PHP MVC Framework.
Requires
- php: >=8.2
- acex/core: ^1.0
Requires (Dev)
- phpunit/phpunit: ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
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
- Framework Core:
acex/core - Application Skeleton:
acex/ace-framework
๐ License
The Ace PHP MVC Framework is open-sourced software licensed under the MIT license.