Download the PHP package mkamelmasoud/starter-core-kit without Composer
On this page you can find all versions of the php package mkamelmasoud/starter-core-kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mkamelmasoud/starter-core-kit
More information about mkamelmasoud/starter-core-kit
Files in mkamelmasoud/starter-core-kit
Package starter-core-kit
Short Description A reusable Laravel starter kit for custom exception handling, middleware, and shared utilities.
License MIT
Informations about the package starter-core-kit
๐ Starter Core Kit for Laravel
A comprehensive, production-ready Laravel starter package that provides essential utilities, middleware, exception handling, AI integration, and repository patterns for modern Laravel applications.
โจ Features
๐ก๏ธ Exception Handling & Middleware
- Custom Global Exception Handler - Centralized exception handling with JSON responses
- API Header Validation Middleware - Ensures proper API request headers
- Dynamic Locale Middleware - Automatic locale detection from headers
- Multi-language Exception Messages - Localized error messages (English/Arabic)
- Comprehensive Exception Mapping - Pre-configured responses for common Laravel exceptions
๐ค AI Integration
- Multi-Provider AI Support - OpenAI and Router.ai integration
- Simple Factory Pattern - Clean provider instantiation
- AI Client Service - Easy-to-use interface for AI interactions
- Built-in Caching - Automatic response caching with TTL
- Comprehensive Logging - Detailed request/response logging
๐๏ธ Repository & Service Patterns
- Base Repository Pattern - Eloquent-based repository implementation
- Base Service Layer - Service layer with caching and transaction support
- CRUD Operations - Complete Create, Read, Update, Delete functionality
- Advanced Query Building - Flexible filtering and data fetching
- Caching Support - Built-in caching with TTL configuration
๐ง Utilities & Helpers
- API Response Traits - Standardized JSON response formatting
- File Upload Handling - Secure file upload utilities
- Cache Management - Advanced caching with automatic invalidation
- Helper Functions - Utility functions for common operations
- Validation Rules - Custom validation rules (e.g., NoHtmlRule)
๐ Data Management
- Pagination Support - Built-in pagination for large datasets
- Search Functionality - Advanced search capabilities
- Random Data Fetching - Random record selection
- Relationship Loading - Eager loading with relationship support
- Soft Delete Support - Soft delete functionality
๐ Project Structure
๐ฆ Installation
Install the package via Composer:
The package will automatically register its service provider.
โ๏ธ Configuration
Publish the configuration files:
This will publish:
config/starter-core-kit.php- Main configurationconfig/repositories.php- Repository configurationlang/vendor/starter-core-kit/- Language files
๐ Quick Start
1. Basic AI Usage
2. Repository Pattern
3. Service Layer
4. API Responses
๐ง Configuration Options
Main Configuration (config/starter-core-kit.php)
Environment Variables
๐ ๏ธ Advanced Usage
Custom Exception Handling
The package provides comprehensive exception handling for common Laravel exceptions:
ModelNotFoundExceptionโ 404 Not FoundNotFoundHttpExceptionโ 404 Not FoundMethodNotAllowedHttpExceptionโ 405 Method Not AllowedValidationExceptionโ 422 Unprocessable EntityAuthorizationExceptionโ 401 UnauthorizedAuthenticationExceptionโ 403 ForbiddenThrottleRequestsExceptionโ 429 Too Many Requests- And many more...
Middleware Usage
Repository Advanced Features
Caching Features
๐ Internationalization
The package supports multiple languages out of the box:
- English (en) - Default
- Arabic (ar) - RTL support
Add more languages by extending the language files in lang/vendor/starter-core-kit/.
๐งช Testing
Run the test suite:
Run code quality checks:
๐ API Documentation
AI Client Service
Repository Methods
Service Layer Methods
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Laravel Framework
- OpenAI API
- OpenRouter API
- The Laravel community
๐ Support
- Issues: GitHub Issues
- Documentation: GitHub Repository
- Email: [email protected]
Made with โค๏ธ by Mostafa Kamel