Search by

khaledabdalbasit / launchpoint

khaledabdalbasit1310

Laravel Starter Kit for API

Package info

github.com/khaledAbdalbasit/Laravel-LaunchPoint

pkg:composer/khaledabdalbasit/launchpoint

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 7

v1.0.6 2026-10-07 13:12 UTC

README

Laravel Logo

📌 Table of Contents

Introduction

LaunchPoint is a powerful API starter kit for Laravel designed to accelerate backend development.

It provides an interactive scaffolding system that installs essential backend architecture components including:

  • Authentication System (with OTP support)
  • Service & Repository Layers
  • FormRequest Validation
  • API Resources (JSON transformation)
  • File Helpers & API Response Traits

LaunchPoint helps developers start building production-ready APIs within seconds instead of hours.

Features

  • 🔥 Magic Scaffolding (--all): One command generates Controller, Service, Repository, FormRequest, and API Resource — all wired together with full CRUD.
  • ⚡ Full CRUD Boilerplate: Every generated class ships with working index, show, store, update, and destroy methods.
  • 🏗️ Clean Architecture: Enforces a strict Request → Controller → Service → Repository → Model → Resource chain.
  • ✅ FormRequest Validation: Auto-generates typed FormRequest classes with $request->validated() wiring.
  • 📦 API Resources: Auto-generates JsonResource classes for clean response transformation.
  • Interactive installation wizard
  • Automatic Laravel API setup
  • Authentication system with OTP support (fisal/laravel-otp)
  • File handling utilities & Standardized API responses
  • Laravel 11+ ready

Installation

Install via Composer

composer require khaledabdalbasit/launchpoint

Run LaunchPoint Installer

php artisan launchpoint:install

Launches the interactive installation wizard. Choose whether to install Authentication, FileHelper, ApiResponseTrait, etc.

Installation Wizard

Step 1 — Ensure API Setup

Checks if routes/api.php exists. If not, runs automatically:

php artisan install:api

Step 2 — Authentication System

Installs:

  • AuthController
  • LoginRequest & RegisterRequest
  • AuthService & AuthRepository
  • OTP integration via fisal/laravel-otp
  • FileHelper
  • ApiResponseTrait

Step 3 — Optional Components

  • FileHelper only
  • ApiResponseTrait only

Step 4 — Publish Configuration

php artisan vendor:publish --tag=launchpoint-config

Publishes config/launchpoint.php.

LaunchPoint Artisan Commands

LaunchPoint ships with powerful scaffolding generators that automatically write full CRUD boilerplate and link your architecture layers together.

1️⃣ Make Controller

Generates a new API Controller. Can be standalone, service-injected, or fully scaffolded.

php artisan launchpoint:make-controller {name} [options]

Available Options:

Option Description
--service=ServiceName Inject a specific Service into the Controller constructor. Auto-generates the Service if it doesn't exist.
--model=ModelName Associate a Model (used alongside --service or --all).
--request=RequestName Inject a specific FormRequest for store & update. Auto-generates it if it doesn't exist.
--resource=ResourceName Wrap responses in a specific API Resource. Auto-generates it if it doesn't exist.
--all / --a 🔥 Derives all names from the base and generates the full stack automatically.

Examples:

# Basic Controller
php artisan launchpoint:make-controller ProductController

# Controller with a specific service
php artisan launchpoint:make-controller ProductController --service=ProductService

# Full magic: generates Controller + Service + Repository + Request + Resource
php artisan launchpoint:make-controller Product --all

2️⃣ Make Service

Generates a Service class to house your business logic.

php artisan launchpoint:make-service {name} [options]

Available Options:

Option Description
--model=ModelName Generates the Service pre-wired to an auto-created Repository with full CRUD methods.

Examples:

# Basic empty Service
php artisan launchpoint:make-service PaymentService

# Generates ProductService AND ProductRepository, linked together
php artisan launchpoint:make-service ProductService --model=Product

3️⃣ Make Repository

Generates a Repository class to handle all database operations.

php artisan launchpoint:make-repository {name} [options]

Available Options:

Option Description
--model=ModelName Generates the Repository with fully implemented CRUD methods (all, findOrFail, create, update, delete) for the given Model.

Examples:

# Basic empty Repository
php artisan launchpoint:make-repository ReportRepository

# Full CRUD Repository for the Order model
php artisan launchpoint:make-repository OrderRepository --model=Order

4️⃣ Make Request

Generates a FormRequest class with authorize() and rules() methods ready to fill.

php artisan launchpoint:make-request {name}

Automatically appends Request suffix if not provided.

Examples:

php artisan launchpoint:make-request StoreProductRequest
# → app/Http/Requests/StoreProductRequest.php

php artisan launchpoint:make-request Product
# → app/Http/Requests/ProductRequest.php

Generated output:

class ProductRequest extends FormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            //
        ];
    }
}

5️⃣ Make Resource

Generates a JsonResource class for clean API response transformation.

php artisan launchpoint:make-resource {name}

Automatically appends Resource suffix if not provided.

Examples:

php artisan launchpoint:make-resource ProductResource
# → app/Http/Resources/ProductResource.php

php artisan launchpoint:make-resource Product
# → app/Http/Resources/ProductResource.php

Generated output:

class ProductResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return parent::toArray($request);
    }
}

🔥 Magic --all Flag

The most powerful feature of LaunchPoint. One single command scaffolds your entire feature stack:

php artisan launchpoint:make-controller Product --all

What gets generated:

app/
├── Http/
│   ├── Controllers/ProductController.php   ← Full CRUD, uses Request + Resource
│   ├── Requests/ProductRequest.php         ← $request->validated() in store/update
│   └── Resources/ProductResource.php       ← Wraps all responses
├── Services/
│   └── ProductService.php                  ← Delegates to Repository
└── Repositories/
    └── ProductRepository.php               ← Full CRUD for Product model

The generated chain:

ProductRequest → ProductController → ProductService → ProductRepository → Product model
                                                                        ↓
                                                              ProductResource (response)

Controller response examples:

// index  → ResourceCollection
return $this->apiResponse(['data' => ProductResource::collection($data)]);

// show   → single Resource
return $this->apiResponse(['data' => new ProductResource($data)]);

// store  → validated() + Resource
public function store(ProductRequest $request) { ... }

// update → validated() + Resource
public function update(ProductRequest $request, $id) { ... }

Generated Project Structure

After running launchpoint:install + launchpoint:make-controller Product --all:

app/
├── Helpers/
│   └── FileHelper.php
│
├── Traits/
│   └── ApiResponseTrait.php
│
├── Http/
│   ├── Controllers/
│   │   ├── Auth/
│   │   │   └── AuthController.php
│   │   └── ProductController.php
│   │
│   ├── Requests/
│   │   ├── Auth/
│   │   │   ├── LoginRequest.php
│   │   │   └── RegisterRequest.php
│   │   └── ProductRequest.php
│   │
│   └── Resources/
│       └── ProductResource.php
│
├── Services/
│   ├── Auth/
│   │   └── AuthService.php
│   └── ProductService.php
│
└── Repositories/
    ├── Auth/
    │   └── AuthRepository.php
    └── ProductRepository.php

Example API Response

Using ApiResponseTrait:

return $this->apiResponse(['data' => new ProductResource($product), 'message' => 'Created!', 'code' => 201]);

Response:

{
    "status": true,
    "message": "Created!",
    "data": {
        "id": 1,
        "name": "Example Product"
    }
}

Requirements

  • PHP 8.1+
  • Laravel 11+

Roadmap

  • Repository scaffolding generator
  • Service generator
  • API Resource generator
  • FormRequest generator
  • Magic --all full-stack scaffold
  • Role & Permission scaffolding
  • API versioning support
  • Swagger / OpenAPI documentation generator
  • PHPUnit test generation

Contributing

  • Fork the repository
  • Create a feature branch
  • Commit your changes
  • Open a Pull Request

License

MIT License © Khaled Abdelbasit

Author

Khaled Abdelbasit Backend Engineer specializing in Laravel architecture and API systems.