承接 mrprotocoll/api-boilerplate-laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mrprotocoll/api-boilerplate-laravel

最新稳定版本:v0.1.0

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

(back to top)

🚀 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

(back to top)

💻 Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this boilerplate, you need:

  1. PHP ^8.2
    use the following link to setup PHP if you dont have it already installed on your computer

(install PHP)

  1. Composer
    use the following link to Download Composer if you dont have it already installed on your computer

(install Composer)

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

(back to top)

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.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 11
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固