# Phred A PHP MVC framework intended for projects of all sizes, designed for both solo and team development. ## Requirements * **PHP**: 8.2+ * **Web Server**: Apache/Nginx (recommended) * **Package Manager**: Composer ## Installation Install Phred via Composer: ```bash composer create-project getphred/phred ``` ## Getting Started ### Creating a Module Phred uses a modular (Django-style) architecture. All your application logic lives inside modules. To scaffold a new module: ```bash php phred create:module Blog ``` This will create the module structure under `modules/Blog`, register the service provider, and mount the routes. After creating a module, update your `composer.json` to include the new namespace: ```json { "autoload": { "psr-4": { "Project\\\\Modules\\\\Blog\\\\": "modules/Blog/" } } } ``` Then run: ```bash composer dump-autoload ``` ### Running the Application Start the local development server: ```bash php phred run ``` The application will be available at `http://localhost:8000`. ## CLI Usage (phred) The `phred` binary provides several utility and scaffolding commands. ### Generators * `php phred create:module ` — Create a new module. * `php phred create:command ` — Create a custom CLI command. * `php phred create::controller ` — Create a controller. * `php phred create::view ` — Create a view and template. * `php phred create::model ` — Create a domain model. * `php phred create::migration ` — Create a migration. * `php phred create::seed ` — Create a database seeder. * `php phred create::test ` — Create a test. ### Database * `php phred migrate` — Run database migrations. * `php phred migration:rollback` — Rollback migrations. * `php phred seed` — Seed the database. * `php phred db:backup` — Backup the database. * `php phred db:restore` — Restore the database. ### Testing & Utilities * `php phred test` — Run tests for the entire project. * `php phred test:` — Run tests for a specific module. * `php phred list` — List all available commands. ## Technical Specifications For detailed information on the framework architecture, service providers, configuration, and MVC components, please refer to: 👉 **[SPECS.md](./SPECS.md)** | [MILESTONES.md](./MILESTONES.md) ## License Phred is open-source software licensed under the MIT license.