PHPackages                             oilmonegov/laraforge - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. oilmonegov/laraforge

ActiveLibrary[Framework](/categories/framework)

oilmonegov/laraforge
====================

AI-first project scaffolding framework with Claude Code, Cursor, and VS Code support

v1.1.1(5mo ago)04[5 PRs](https://github.com/oilmonegov/laraforge/pulls)MITPHPPHP ^8.4CI passing

Since Jan 17Pushed 1mo agoCompare

[ Source](https://github.com/oilmonegov/laraforge)[ Packagist](https://packagist.org/packages/oilmonegov/laraforge)[ RSS](/packages/oilmonegov-laraforge/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (14)Versions (24)Used By (0)

LaraForge
=========

[](#laraforge)

AI-first project scaffolding framework with Claude Code, Cursor, and VS Code support.

[![Latest Version on Packagist](https://camo.githubusercontent.com/42c230e81e9e0951981f3f288e17c99d13bd691d289b5c20357cd7cfc9fbbc61/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f696c6d6f6e65676f762f6c617261666f7267652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oilmonegov/laraforge)[![PHP Version](https://camo.githubusercontent.com/095cb1c4258557b9166e8cb2d0f6703e4a9e45f081a0f1b28eefbc8d6794fd0d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6f696c6d6f6e65676f762f6c617261666f7267652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oilmonegov/laraforge)[![Tests](https://camo.githubusercontent.com/7c8b66134ecf970e4a7d2d7af1b30e053c48e3500aabeaab9f992563609a4f2c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f696c6d6f6e65676f762f6c617261666f7267652f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/oilmonegov/laraforge/actions)[![License](https://camo.githubusercontent.com/d7b82eda36e62ccb9dd3c8880ed8de160d5c224ebfb7cb0e7b02741901464a69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6f696c6d6f6e65676f762f6c617261666f7267652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oilmonegov/laraforge)

Overview
--------

[](#overview)

LaraForge is an AI-first project scaffolding framework designed for both new and existing PHP projects. It provides intelligent architecture recommendations, standardized patterns, and seamless integration with AI coding assistants.

### Key Features

[](#key-features)

- **Multi-Framework Support** — Works with Laravel, Symfony, and generic PHP projects
- **Architecture-Aware** — Scale-based recommendations for sync/async, caching, queues
- **Interactive Setup** — Smart questions at project initialization, autonomous after guidelines established
- **Standardized API Responses** — Consistent, secure response formatting
- **Comprehensive Logging** — AAA (Authentication, Authorization, Accounting) audit logging
- **Configuration Protection** — Safeguards for critical files with permission systems
- **External Documentation Sync** — Fetches from Laravel, PHP, and frontend framework docs
- **Security Hooks** — OWASP Top 10 validation during development

Installation
------------

[](#installation)

```
composer require oilmonegov/laraforge --dev
```

For global installation:

```
composer global require oilmonegov/laraforge
```

Quick Start
-----------

[](#quick-start)

The easiest way to use LaraForge is with the interactive guided workflow:

```
# Just run this - LaraForge guides you through everything
./vendor/bin/laraforge next
```

That's it! LaraForge will:

1. **Detect your project state** and start the appropriate workflow
2. **Show you what's next** with selectable options (just press Enter)
3. **Execute commands for you** or let you skip/customize
4. **Track your progress** across sessions

### Interactive Workflow Features

[](#interactive-workflow-features)

- **No memorization needed** - Select from options, don't type commands
- **Smart detection** - Auto-detects completed steps (git init, project init, etc.)
- **Multiple workflow types** - Feature, Bugfix, Refactor, Hotfix
- **Parallel agent support** - Detects conflicts when multiple agents work on same branch
- **Session tracking** - Pick up where you left off

### Example Flow

[](#example-flow)

```
$ ./vendor/bin/laraforge next

Welcome to LaraForge!
Let's set up your project.

🚀 Onboarding "Project Setup" [0%]

┌─────────────────────────────────────────────────────┐
│  What's Next?                                       │
└─────────────────────────────────────────────────────┘

[Required] Initialize LaraForge - Set up LaraForge configuration
❯ Run: laraforge init
  Run a custom command...
  Show full status
  Exit (continue later)

```

### Manual Commands

[](#manual-commands)

You can also use individual commands directly:

```
# Initialize LaraForge
./vendor/bin/laraforge init

# Start a specific workflow
./vendor/bin/laraforge next --start feature
./vendor/bin/laraforge next --start bugfix

# Import an existing PRD
./vendor/bin/laraforge prd:import path/to/your-prd.md

# Check workflow status
./vendor/bin/laraforge next --status

# List remaining steps
./vendor/bin/laraforge next --list
```

### For Existing Projects with PRD

[](#for-existing-projects-with-prd)

If you already have a Product Requirements Document:

```
# Import your PRD (supports markdown, text formats)
./vendor/bin/laraforge prd:import my-project-prd.md

# LaraForge will parse and normalize it, then guide you to create FRD
```

Architecture
------------

[](#architecture)

### Project Scale

[](#project-scale)

LaraForge uses project scale to make intelligent architecture decisions:

TierUsersRecordsModePrototype&lt; 10010KSimpleSmall100-1K100KSimpleMedium1K-100K10MBalancedLarge100K-1M100MScalableMassive1M+1B+Scalable```
use LaraForge\Architecture\ProjectScale;
use LaraForge\Architecture\ArchitectureAdvisor;

// Define your project scale
$scale = ProjectScale::fromTier(ProjectScale::TIER_MEDIUM);

// Get architecture recommendations
$advisor = new ArchitectureAdvisor($scale);

// Determine sync vs async for operations
$recommendation = $advisor->recommendExecutionMode('notification');
// Returns: ['mode' => 'async', 'reason' => '...', 'implementation' => [...]]

// Get patterns for features
$patterns = $advisor->recommendPatterns('reporting');
// Includes caching strategy, async recommendations, chunking advice
```

### Architecture Modes

[](#architecture-modes)

- **Simple** — Monolith, synchronous, minimal infrastructure
- **Balanced** — Monolith with queues, Redis caching
- **Scalable** — Microservices-ready, async-first, horizontal scaling

Core Components
---------------

[](#core-components)

### API Responses

[](#api-responses)

Standardized, secure API response formatting:

```
use LaraForge\Api\ApiResponse;

// Success responses
return ApiResponse::success('User created', ['user' => $user]);
return ApiResponse::created('Resource created', $data);
return ApiResponse::paginated($items, $pagination);

// Error responses
return ApiResponse::validationError('Invalid input', $errors);
return ApiResponse::notFound('User not found');
return ApiResponse::unauthorized();
return ApiResponse::serverError('Something went wrong', 'ERR_12345');

// Automatic sensitive field stripping
// Fields like 'password', 'token', 'api_key' are automatically removed
```

### Exception Handling

[](#exception-handling)

Safe exception handling for APIs:

```
use LaraForge\Api\ExceptionHandler;

$handler = new ExceptionHandler(
    debug: config('app.debug'),
    logger: fn($context) => Log::error('API Exception', $context)
);

// In your exception handler
$response = $handler->handle($exception);
return response()->json($response->toArray(), $response->getHttpCode());
```

### Audit Logging (AAA)

[](#audit-logging-aaa)

Comprehensive logging for security and compliance:

```
use LaraForge\Logging\AuditLogger;

$logger = new AuditLogger('/path/to/logs', 'medium');

// Authentication events
$logger->logAuth('user.login', $userId, ['ip' => $request->ip()]);

// Authorization events
$logger->logAuthz('permission.check', $userId, 'posts', 'delete', $allowed);

// Data access events
$logger->logDataAccess('record.viewed', 'User', $userId, $actorId, 'read');

// API requests
$logger->logApi('POST', '/api/users', 201, $durationMs, $userId);

// Security events
$logger->logSecurity('suspicious.activity', ['reason' => 'Multiple failed logins']);
```

For Laravel projects, we recommend [Spatie Activity Log](https://github.com/spatie/laravel-activitylog):

```
// Get package recommendations
AuditLogger::getRecommendedPackages();
```

### Configuration Protection

[](#configuration-protection)

Protect critical files from accidental modification:

```
use LaraForge\Config\ConfigProtection;

$protection = new ConfigProtection('/path/to/project');

// Check if file is protected
$status = $protection->checkProtection('tests/Architecture/ArchTest.php');
// Returns: ['protected' => true, 'level' => 'critical', 'requires_separate_pr' => true]

// Request permission to modify
$permission = $protection->requestPermission(
    filePath: 'config/app.php',
    justification: 'Updating timezone for production deployment',
    requestedBy: 'developer@example.com'
);

// Protected file categories:
// - Architecture tests (critical - requires separate PR)
// - Security configs (protected)
// - CI/CD configs (protected)
// - Core app configs (protected)
// - Environment files (warn)
```

Install the Git hook to enforce protection:

```
# The hook warns when protected files are modified alongside other files
cat > .git/hooks/pre-commit getBrand();
$colors = $brand->getColors(); // Primary, secondary, semantic colors
$typography = $brand->getTypography(); // Font families, sizes, weights

// Component library
$components = $design->getComponents();
$tableVariants = $components->getVariants('table');
// Returns: simple, sortable, searchable, paginated, selectable, advanced

// Storage configuration (S3-compatible)
$storage = $design->getStorage();
$config = $storage->getConfig('images');
// Returns CDN URL, bucket, visibility settings

// Service resilience patterns
$resilience = $design->getResilience();
$circuitBreaker = $resilience->getCircuitBreakerPattern('payment-gateway');
$retryPattern = $resilience->getRetryPattern();
```

### Documentation Sync

[](#documentation-sync)

Fetch and cache external documentation:

```
use LaraForge\Documentation\DocumentationSync;

$docs = DocumentationSync::fromPath('/path/to/project');

// Fetch Laravel documentation
$validation = $docs->fetch('laravel', 'validation', '11.x');

// Fetch package info from Packagist
$packageInfo = $docs->fetchPackageInfo('spatie', 'laravel-activitylog');

// Fetch latest release from GitHub
$release = $docs->fetchLatestRelease('laravel', 'framework');

// Check cache status
$status = $docs->getCacheStatus();
```

### Security Hooks

[](#security-hooks)

OWASP Top 10 validation during development:

```
use LaraForge\Hooks\SecurityHook;
use LaraForge\Project\ProjectContext;

$hook = new SecurityHook();

// Scan code for security issues
$issues = $hook->scan($codeContent, 'app/Http/Controllers/UserController.php');

// Returns issues like:
// - SQL injection vulnerabilities
// - XSS risks
// - CSRF missing
// - Mass assignment vulnerabilities
// - Command injection risks
```

Skills System
-------------

[](#skills-system)

Skills are reusable capabilities for AI assistants:

```
use LaraForge\Skills\SkillRegistry;

$registry = new SkillRegistry($laraforge);

// Document skills
$registry->get('create-prd');      // Create Product Requirements Document
$registry->get('create-frd');      // Create Feature Requirements Document
$registry->get('create-pseudocode'); // Create implementation pseudocode

// Generator skills
$registry->get('api-resource');    // Generate API Resource classes
$registry->get('feature-test');    // Generate feature tests
$registry->get('policy');          // Generate authorization policies
$registry->get('manager');         // Generate manager pattern classes

// Git skills
$registry->get('branch');          // Create feature branches
$registry->get('commit');          // Smart commits
$registry->get('worktree');        // Manage git worktrees
```

Workflows
---------

[](#workflows)

Structured workflows for common development tasks:

```
use LaraForge\Workflows\FeatureWorkflow;

$workflow = new FeatureWorkflow($laraforge);

// Get workflow steps
$steps = $workflow->steps();
// 1. Requirements (PRD)
// 2. Design (FRD)
// 3. Test Contract
// 4. Branch
// 5. Implement
// 6. Verify
// 7. Review
// 8. Merge

// Execute current step
$result = $workflow->getCurrentStep()->execute($context);

// Track progress
$progress = $workflow->progress(); // 0-100%
```

Interactive Setup
-----------------

[](#interactive-setup)

Smart question handling during project setup:

```
use LaraForge\Project\InteractionContext;

$context = new InteractionContext();

// Check if we should ask about something
if ($context->shouldAsk('database', 'Which database?')) {
    // Ask user
    $answer = $this->ask('Which database would you like to use?');
    $context->establish('database', 'primary_database', $answer);
}

// Once established, won't ask again
$context->getEstablished('database', 'primary_database'); // Returns previous answer

// Check completeness
$score = $context->getCompletenessScore(); // 0.0 - 1.0

// Switch modes based on completeness
if ($score > 0.8) {
    $context->setMode(InteractionContext::MODE_AUTONOMOUS);
}
```

Multi-Framework Support
-----------------------

[](#multi-framework-support)

### Laravel

[](#laravel)

```
use LaraForge\Frameworks\LaravelAdapter;

$adapter = new LaravelAdapter();
$adapter->isApplicable('/path/to/project'); // Checks for laravel/framework

// Laravel-specific features
$adapter->getArtisanCommands();
$adapter->getMiddlewarePatterns();
$adapter->getEloquentPatterns();
```

### Symfony

[](#symfony)

```
use LaraForge\Frameworks\SymfonyAdapter;

$adapter = new SymfonyAdapter();
// Symfony-specific features
```

### Generic PHP

[](#generic-php)

```
use LaraForge\Frameworks\GenericPhpAdapter;

$adapter = new GenericPhpAdapter();
// Works with any PHP project
```

Configuration
-------------

[](#configuration)

### Project Configuration

[](#project-configuration)

Create `laraforge.yaml` or `.laraforge/config.yaml`:

```
project:
  name: my-project
  description: My awesome project

scale:
  tier: medium
  mode: balanced
  expected_users: 50000
  expected_records: 5000000

framework: laravel

ai_tools:
  - claude
  - cursor

features:
  skills: true
  commands: true
  agents: true
  workflows: true
  security_hooks: true

storage:
  default: s3
  cdn: cloudfront

design:
  ui_framework: tailwind
  component_library: shadcn
```

### Override System

[](#override-system)

The `.laraforge/` directory allows project-level customization:

```
.laraforge/
├── config.yaml           # Override default configuration
├── templates/            # Override any template
│   └── CLAUDE.md        # Custom CLAUDE.md template
├── stubs/               # Override stubs
│   └── action.stub
├── protections.json     # Custom file protections
├── permissions.json     # Granted permissions
└── cache/               # Documentation cache
    └── documentation_cache.json

```

CLI Commands
------------

[](#cli-commands)

### Core Commands

[](#core-commands)

CommandDescription`laraforge next`**Interactive guided workflow** - shows and runs next step`laraforge init`Initialize LaraForge in your project`laraforge prd:import `Import an external PRD file`laraforge feature:start`Start a new feature workflow`laraforge hooks:install`Install git hooks for code quality### Workflow Options

[](#workflow-options)

OptionDescription`laraforge next --start `Start a new workflow (feature, bugfix, refactor, hotfix)`laraforge next --status`Show current workflow progress`laraforge next --list`List all remaining steps`laraforge next --skip`Skip the current optional step`laraforge next --end`End the current workflow`laraforge next --history`Show workflow history### Other Commands

[](#other-commands)

CommandDescription`laraforge skill:run [name]`Execute a skill`laraforge generators`List available generators`laraforge generate [name]`Run a generator`laraforge worktree`Manage git worktrees for parallel workRequirements
------------

[](#requirements)

- PHP 8.4+
- Composer 2.0+

### Recommended Packages

[](#recommended-packages)

For Laravel projects:

```
# Activity logging
composer require spatie/laravel-activitylog

# Backups
composer require spatie/laravel-backup

# Development debugging
composer require spatie/laravel-ray --dev
```

Testing
-------

[](#testing)

```
# Run tests
./vendor/bin/pest

# Run with coverage
./vendor/bin/pest --coverage

# Run specific test suite
./vendor/bin/pest --filter=Architecture
./vendor/bin/pest --filter=Unit
./vendor/bin/pest --filter=Stress
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

### Development Setup

[](#development-setup)

```
git clone https://github.com/oilmonegov/laraforge.git
cd laraforge
composer install
./vendor/bin/pest
```

### Code Quality

[](#code-quality)

```
# Code style
./vendor/bin/pint

# Static analysis
./vendor/bin/phpstan analyse

# All checks
composer check
```

Security
--------

[](#security)

- Security issues should be reported via email to
- Do not open public issues for security vulnerabilities
- See [SECURITY.md](SECURITY.md) for our security policy

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

Credits
-------

[](#credits)

- Built with Claude Code assistance
- Inspired by Laravel's elegant patterns
- Uses Symfony Console for CLI

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance83

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

168d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/32074642?v=4)[Abanum Chuks](/maintainers/oilmonegov)[@oilmonegov](https://github.com/oilmonegov)

---

Top Contributors

[![oilmonegov](https://avatars.githubusercontent.com/u/32074642?v=4)](https://github.com/oilmonegov "oilmonegov (18 commits)")

---

Tags

scaffoldingmcpaicursorclaudevscodelaraforge

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/oilmonegov-laraforge/health.svg)

```
[![Health](https://phpackages.com/badges/oilmonegov-laraforge/health.svg)](https://phpackages.com/packages/oilmonegov-laraforge)
```

###  Alternatives

[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
