mrprotocoll/api-boilerplate-laravel
Composer 安装命令:
composer create-project mrprotocoll/api-boilerplate-laravel
包简介
This Laravel 11 API boilerplate provides a structured foundation for building robust backend applications with Laravel, integrating essential features and tools.
README 文档
README
🕹️🕹️ Laravel API Boilerplate🕹️🕹️
📗 Table of Contents
📖 API Boilerplate
A robust, modular Laravel 11 API boilerplate built using a Domain-Driven Design (DDD) approach. This boilerplate provides a scalable foundation for modern API development with essential features like role-based access, versioning, Google OAuth integration, and more..
Features
- Domain-Driven Architecture: Organized modules and shared resources for scalability.
- Versioning: Supports multiple API versions with structured routing.
- Role-Based Access Control: Integrated roles and permissions with easy extensibility.
- Google OAuth: Simplified OAuth 2.0 authentication setup.
- Modular Components: Independent modules for Auth, User, and more.
- Enums and Helpers: Centralized, reusable enums and helper methods.
- Custom Middlewares: Pre-configured middlewares for JSON responses, caching, logging, and preventing duplicate requests.
- Optimized Exception Handling: Friendly and consistent error responses.
- Custom Base Model: A UUID-enabled base model for consistency across entities.
- Seeders and Factories: Simplified data seeding with predefined roles.
- Rate Limiting: API throttling to prevent abuse.
- Fully Documented: Swagger/OpenAPI support for API documentation.
Architecture Overview
Domain-Driven Design (DDD)
The project structure is organized to separate concerns:
src/modules: Contains feature-specific modules, e.g., Auth and User.
src/shared: Shared resources like helpers, enums, and base classes.
Versioning
Version-specific modules and routes are located in the V1 directory for flexibility.
Tech Stack
🚀 Links
To access the documentation goto the below link
- Link to api routes
http://localhost:8000/v1
- Link to documentation
http://localhost:8000/v1/documentation
💻 Getting Started
To get a local copy up and running, follow these steps.
Prerequisites
In order to run this boilerplate, you need:
- PHP ^8.2
use the following link to setupPHPif you dont have it already installed on your computer
- Composer
use the following link to DownloadComposerif you dont have it already installed on your computer
Install
clone the repository:
git clone git@github.com:mrprotocoll/api-boilerplate-laravel.git
Install dependencies:
composer install
Setup
Create your database.
create .env file, change using the .env.example file and update the Database, Google Oauth (optional), and Email credentials.
cp .env.example .env
Generate keys, Run the migration and seed roles:
php artisan key:generate
php artisan migrate --seed
Usage
The following command can be used to run the application.
php artisan serve
Contributing
Feel free to fork the repository, make changes, and submit pull requests. Feedback is always welcome!
License
This project is licensed under the MIT License.
mrprotocoll/api-boilerplate-laravel 适用场景与选型建议
mrprotocoll/api-boilerplate-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 11, 最近一次更新时间为 2024 年 07 月 12 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「boilerplate」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 mrprotocoll/api-boilerplate-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mrprotocoll/api-boilerplate-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 mrprotocoll/api-boilerplate-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
PHP class to extend when building a WordPress plugin allowing you to follow smart plugin setup standards.
Anax htmlform module.
Laravel 5.7 Boilerplate based on Bootstrap 4 and Tabler for Backend.
WordPress Plugin Framework
A Laravel 6 API Boilerplate to create a ready-to-use REST API. User Authentication using JWT.
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-12