khaledabdalbasit / launchpoint
Laravel Starter Kit for API
Package info
github.com/khaledAbdalbasit/Laravel-LaunchPoint
pkg:composer/khaledabdalbasit/launchpoint
Requires
- php: ^8.2|^8.3|^8.4
- fisal/laravel-otp: ^1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-05 11:39:08 UTC
README
📌 Table of Contents
- Introduction
- Features
- Installation
- LaunchPoint Artisan Commands
- Magic --all Flag
- Generated Project Structure
- Example API Response
- Requirements
- Roadmap
- Contributing
- License
- Author
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, anddestroymethods. - 🏗️ Clean Architecture: Enforces a strict
Request → Controller → Service → Repository → Model → Resourcechain. - ✅ FormRequest Validation: Auto-generates typed
FormRequestclasses with$request->validated()wiring. - 📦 API Resources: Auto-generates
JsonResourceclasses 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:
AuthControllerLoginRequest&RegisterRequestAuthService&AuthRepository- OTP integration via
fisal/laravel-otp FileHelperApiResponseTrait
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
Requestsuffix 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
Resourcesuffix 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
--allfull-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.