fireup / php-build
Interactive PHP development tool for creating clean, well-structured applications
Requires
- php: >=8.0
- guzzlehttp/guzzle: ^7.0
- monolog/monolog: ^3.0
- symfony/console: ^6.0
- symfony/filesystem: ^6.0
- symfony/finder: ^6.0
- symfony/process: ^6.0
- twig/twig: ^3.0
- vlucas/phpdotenv: ^5.0
Requires (Dev)
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^10.0
- squizlabs/php_codesniffer: ^3.0
README
Interactive PHP Development Tool for Creating Clean, Well-Structured Applications
FireUp PHP Build is a comprehensive PHP development package that helps developers create clean, maintainable PHP applications through an interactive chat interface and powerful CLI tools.
✨ Features
- 🤖 Interactive Chat Interface - Natural language development with AI assistance
- 🏗️ Project Generation - Create complete MVC applications with one command
- 📝 Code Generation - Generate classes, controllers, models, and functions
- 🐛 Smart Debugging - Automatic error detection and fixing
- 📁 File Management - Create, edit, and manage project files
- ⚡ Development Server - Built-in server for rapid development
- 🔧 Build System - Optimize and compile applications for production
🚀 Quick Start
Installation
Option 1: Using Composer Create Project (Recommended)
# Create a new application (requires package to be published on Packagist) composer create-project fireup/php-build my-php-app cd my-php-app
Option 2: Clone and create new app
# Clone the template git clone https://github.com/kingjethro999/fireup-build.git cd fireup-build # Create a new application php create-app.php my-php-app cd my-php-app composer install
Option 3: Use directly
# Clone and use directly git clone https://github.com/kingjethro999/fireup-build.git my-php-app cd my-php-app composer install
Interactive Development
# Start interactive chat (CLI) php artisan chat # Start web chat interface (opens .chat/interface.html) php artisan chat --web # Using composer scripts composer chat
Basic Commands
# Create a new project php artisan create project my-awesome-app # Start development server (serves user's index.php) php artisan serve # Build for production php artisan build --production # Debug your code php artisan debug # Using composer scripts composer serve composer build
💬 Interactive Chat Examples
The chat interface understands natural language requests:
You: Create a new PHP project called "blog"
AI: ✅ Project 'blog' created successfully with complete MVC structure!
You: Create a User model with properties name, email, password
AI: ✅ Generated User model with properties: name, email, password
You: Create a UserController with CRUD methods
AI: ✅ Generated UserController with index, show, create, store methods
You: Debug this file for syntax errors
AI: 🐛 Found and fixed 2 syntax errors in UserController.php
📁 Project Structure
When you create a new project, you get a clean, well-organized structure:
my-php-app/
├── public/ # Web root
│ └── index.php # Entry point
├── src/ # Application source
│ ├── App.php # Main application class
│ ├── Controllers/ # Controllers
│ └── Models/ # Models
├── config/ # Configuration files
├── templates/ # View templates
├── vendor/ # Dependencies
├── bin/ # CLI tools
│ └── php-build # Main CLI executable
├── composer.json # Project configuration
└── README.md # Project documentation
🛠️ Available Commands
Chat Commands
php artisan chat
- Interactive CLI chatphp artisan chat --web
- Web chat interface (opens .chat/interface.html)php artisan chat "Create a User model"
- Direct request
Project Commands
php artisan create project <name>
- Create new projectphp artisan create controller <name>
- Create controllerphp artisan create model <name>
- Create modelphp artisan create class <name>
- Create class
Development Commands
php bin/php-build serve
- Start development serverphp bin/php-build serve --port 8080
- Custom portphp bin/php-build build
- Build applicationphp bin/php-build build --optimize
- Optimized buildphp bin/php-build build --production
- Production build
Debug Commands
php artisan debug
- Debug entire projectphp artisan debug <file>
- Debug specific filephp artisan debug --fix
- Auto-fix issuesphp artisan debug --verbose
- Detailed output
🎯 Use Cases
For Beginners
- Learn PHP development through interactive guidance
- Generate boilerplate code automatically
- Get instant feedback on code quality
- Build complete applications step by step
For Experienced Developers
- Rapidly prototype new features
- Maintain consistent code structure
- Automate repetitive development tasks
- Debug complex applications efficiently
For Teams
- Standardize project structure
- Enforce coding conventions
- Share development knowledge
- Accelerate onboarding process
🔧 Configuration
Environment Variables
Create a .env
file in your project root:
# Application APP_ENV=development APP_DEBUG=true APP_URL=http://localhost:8000 # Database (if needed) DB_HOST=localhost DB_NAME=myapp DB_USER=root DB_PASS= # Security APP_KEY=your-secret-key-here
Custom Templates
You can customize the generated code by modifying the templates in the src/Services/CodeGenerator.php
file.
🚀 Advanced Features
Web Interface
Start the web interface for a rich development experience:
php artisan chat --web --port 8000
Features:
- Real-time chat interface
- Project file explorer
- Syntax validation
- Quick action buttons
- Chat history export
Build Optimization
Optimize your application for production:
php artisan build --production --optimize
This will:
- Minify CSS and JavaScript
- Remove development files
- Optimize autoloader
- Set production environment
- Disable error reporting
File Watching
Watch for changes and auto-rebuild:
php artisan build --watch
📦 Publishing to Packagist
To make composer create-project fireup/php-build
work, you need to publish this package to Packagist:
- Create a Packagist account at https://packagist.org
- Submit your package by providing your GitHub repository URL
- Set up webhook for automatic updates
- Tag releases in your repository
Once published, users can create new applications with:
composer create-project fireup/php-build my-app
cd my-app
php artisan serve
php artisan chat --web
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
🙏 Acknowledgments
- Built with Symfony Console
- Styled with Tailwind CSS
- Powered by modern PHP 8.0+ features
Made with ❤️ by the FireUp Team