无头后端框架:通过 Composer 分发,提供 OpenAPI 3.1 契约(Scramble 生成于 /docs/api),前端技术栈不受限制
reyhan — Laravel 电商模板
作者 reyhan-commerce
Reyhan Commerce 是一个基于 Laravel 的无头电商后端框架,通过 Composer 分发,提供 OpenAPI 接口、Filament 管理后台与 Redis 库存锁机制。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 2
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
领域门面与管道:提供 Cart、Pricing、Inventory、Checkout、Ledger、Reyhan 门面,以及可自定义的购物车计算与订单创建管道
复式记账 Ledger 引擎:LedgerService 与 Ledger 门面按借贷平衡约束交易完整性
两级并发与库存锁定:Redis 有序集合加自清理 TTL,结算时使用数据库悲观行锁
零核心修改扩展:支持动态模型替换与放入 extensions/ 目录的 PSR-4 动态扩展
管理后台:基于 Filament 与 Livewire,含 RBAC 权限与审计日志
模板详细介绍
Reyhan Commerce 是一个无头(headless)电商后端框架,仓库 reyhan-commerce/reyhan 是应用骨架(starter skeleton),核心引擎位于独立的 reyhan-commerce/core 包中。README 说明其通过 Composer 分发,提供标准 OpenAPI 3.1 契约(由 Scramble 在 /docs/api 生成),可与任意前端技术配合使用,官方生态中列出了 Nuxt 4 店面层。
后端基于 PHP 8.4+ 与 Laravel,管理后台使用 Filament 与 Livewire,主数据库为 PostgreSQL,缓存、会话与队列使用 Redis,运行时可选 FrankenPHP Octane 与 Caddy,测试使用 Pest。README 描述了领域门面(Cart、Pricing、Inventory、Checkout、Ledger、Reyhan)、可挂载的购物车计算与订单创建管道、复式记账的 Ledger 引擎,以及两级并发与库存锁定机制(Redis 有序集合加 TTL、结算时数据库悲观行锁)。扩展方式包括动态模型替换与放入 extensions/ 目录的 PSR-4 动态扩展。
安装可通过官方 Composer CLI(composer global require reyhan-commerce/installer 后执行 reyhan new)或 composer create-project 加 php artisan reyhan:install;克隆仓库后可用 ./reyhan doctor、./reyhan install、./reyhan dev 完成环境检查、初始化与开发服务器启动。README 未提供具体版本号之外的性能数据、部署拓扑或生产环境运维细节,相关承诺(如“生产就绪”“零破坏升级”)属于项目自述,未在资料中给出验证依据。
适合你的项目吗?
适用场景
- 为 Nuxt、Next.js、Flutter 或原生移动应用提供电商后端 API
- 需要复式记账与库存并发控制的订单与结算系统
- 通过 extensions/ 目录以 PSR-4 扩展方式定制电商领域逻辑
- 使用 Filament 构建带 RBAC 与审计日志的运营管理后台
适合人群
- 熟悉 PHP 与 Laravel 的后端开发团队
- 需要无头架构、自行选择前端技术栈的电商项目
- 需要动态模型替换与模块化扩展能力的中大型项目
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
使用官方 CLI:composer global require reyhan-commerce/installer,然后执行 reyhan new my-store
- 2
或使用 composer create-project reyhan-commerce/reyhan my-store,再执行 php artisan reyhan:install
- 3
克隆仓库后运行 ./reyhan doctor 检查前置条件(README 列出 PostgreSQL 17+、Redis 7+、PHP 8.4+)
- 4
运行 ./reyhan install 初始化数据库、加密密钥与种子数据,再用 ./reyhan dev 启动开发服务器
- 5
README 未提供生产环境部署、容器化或运维配置的具体步骤
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 官方 Nuxt 4 店面层(reyhan-commerce/storefront-nuxt)标注为 Official Commercial,属于单独授权的商业组件,不包含在 MIT 免费代码范围内。
- 本地开发需满足 PostgreSQL 17+、Redis 7+、PHP 8.4+ 等系统前置条件。
- 官方安装方式依赖 Composer 全局安装 reyhan-commerce/installer 包。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
| [**reyhan-commerce/storefront-nuxt**](https://github.com/reyhan-commerce/storefront-nuxt) | Decoupled Nuxt 4 Storefront Layer | `storefront-nuxt` | Official Commercial |
README 原文
# Verify system prerequisites (PostgreSQL 17+, Redis 7+, PHP 8.4+)
README 原文
https://github.com/reyhan-commerce/reyhan/blob/main/LICENSEhttps://github.com/reyhan-commerce/reyhan/blob/main/README.mdcomposer global require reyhan-commerce/installer
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-05。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料较完整 · 85 / 100
- 技术栈
- Laravel
- 网站类型
- 电商 · 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-10-05
- 截图检查日期
- 2026-10-05
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Laravel。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: codex-user-requested-batch-review-20261017 · 2026-10-16
查看当时使用的来源资料
SHA-256: 058fd588bd137f9cdf09fd5bf575e728fb5b93f0ea436aab56a8df5580cd1b52
2026-10-05T14:47:13.870Z
来源文件 / 仓库<div align="center"> <img src="public/images/banner.png" alt="Reyhan Commerce Framework" width="780" style="max-width: 100%; border-radius: 12px; margin-bottom: 24px;" /> # Reyhan Commerce ### The Sovereign Enterprise Headless E-Commerce Framework **Engineered for High-Concurrency, Dynamic Extensibility & Zero-Breaking Upgrades** [](LICENSE) [](https://reyhan-commerce.github.io/docs/) [](https://reyhan-commerce.github.io/docs/v1/architecture/lifecycle) [](https://reyhan-commerce.github.io/docs/) [**📖 Read Full Documentation**](https://reyhan-commerce.github.io/docs/) • [**🚀 Getting Started**](https://reyhan-commerce.github.io/docs/v1/getting-started/installation) • [**🏛 Architecture**](https://reyhan-commerce.github.io/docs/v1/architecture/lifecycle) • [**🛠 CLI Reference**](https://reyhan-commerce.github.io/docs/v1/cli/cli-reference) </div> --- ## ⚡ Quick Start ### 1. Official Composer CLI Installer Scaffold a production-ready Reyhan Commerce backend using our official Composer-native CLI tool: ```bash composer global require reyhan-commerce/installer reyhan new my-store ``` ### 2. Composer Create-Project Or install directly via standard Composer: ```bash composer create-project reyhan-commerce/reyhan my-store cd my-store php artisan reyhan:install ``` ### 3. Local Development & Orchestrator Clone this repository and run the central CLI orchestrator: ```bash # Verify system prerequisites (PostgreSQL 17+, Redis 7+, PHP 8.4+) ./reyhan doctor # Provision database, encryption keys, and seeders ./reyhan install # Start backend development server ./reyhan dev ``` --- ## 🏛️ Framework Architecture Pillars 1. **Pure Headless Backend Engine:** - Distributed via Composer (`reyhan-commerce/core` & `reyhan-commerce/reyhan`). - Standard OpenAPI 3.1 contract generation via Scramble at `/docs/api`. - Works seamlessly with any frontend technology (Official Nuxt 4 storefront, Next.js, Flutter, React Native, or iOS/Android native apps). 2. **First-Class Domain Facades:** - Modern, expressive Laravel facades (`Cart`, `Pricing`, `Inventory`, `Checkout`, `Ledger`, `Reyhan`). 3. **Hookable Commercial Pipelines:** - Dynamic, customizable pipes for `CartCalculationPipeline` and `OrderCreationPipeline`. 4. **General Financial Ledger Engine:** - Double-entry bookkeeping core (`LedgerService` & `Ledger` facade) enforcing strict debit-credit balance and transaction integrity. 5. **Two-Tier Concurrency & Stock Locking:** - Tier 1: Distributed memory Sorted Sets with self-purging TTL to eliminate ghost inventory locks. - Tier 2: Database-level pessimistic row locking during checkout payment settlement. 6. **Sovereign Extensibility (Zero Core Modification):** - **Dynamic Model Swapping:** Domain workflows resolve entities dynamically through contracts and resolvers. - **Dynamic PSR-4 Extensions:** Drop plugins into `extensions/` with automatic classloader namespace injection and `ReyhanExtensionServiceProvider`. --- ## 🛠️ Technology Stack & Architectural Foundation | Domain | Technology / Engine | Architectural Role & Rationale | | :--- | :--- | :--- | | **Backend Engine** | **PHP 8.4+ & Laravel 13** | Implements single-responsibility `final` Action classes, strongly-typed DTOs (`spatie/laravel-data`), native Eloquent models, and robust queue workers. | | **Admin Backoffice** | **Filament 5 & Livewire 3** | High-productivity reactive admin panel, RBAC permissions (`filament-shield`), real-time websocket updates, and audit logging. | | **Primary Database** | **PostgreSQL 17+** | Enterprise JSONB variant matrices, GIN indexing, `pg_trgm` fuzzy text search, and ACID pessimistic row-locking (`lockForUpdate`). | | **Memory & Mutex Engine** | **Redis 7+** | Sub-millisecond cart caching, distributed sessions, Horizon queue workers, and atomic Lua script stock reservations. | | **High-Performance Runtime** | **FrankenPHP Octane & Caddy** | Worker-mode execution for microsecond response times and automated SSL certificate provisioning. | | **Testing & Quality Assurance** | **Pest 4** | End-to-end domain feature testing, concurrency assertions, architecture linting, and automated workflow tests. | --- ## 📂 Application Anatomy ```text reyhan/ ├── app/ # Application Domain Layer & Custom Overrides │ ├── Actions/ # Single-responsibility userland action classes │ ├── Filament/ # Admin Backoffice resources, pages & dashboards │ └── Providers/ # Application service providers ├── bootstrap/ # Laravel 13 framework bootloader ├── config/ # Application & Reyhan driver configurations ├── database/ # Migrations, seeders, and model factories ├── extensions/ # Isolated custom modular extensions (PSR-4) ├── public/ # Web server entrypoint & compiled assets ├── routes/ # Web, API, and console route definitions ├── storage/ # Application logs, caches, and uploaded assets ├── tests/ # Pest 4 test suite (Feature, Unit, Architecture) ├── artisan # Laravel command-line interface ├── composer.json # Application dependencies (reyhan-commerce/core) ├── reyhan # Central orchestrator CLI └── version.json # Release & compatibility manifest ``` --- ## 🌐 Official Ecosystem Repositories | Repository | Role | Package Name | Status | | :--- | :--- | :--- | :--- | | [**reyhan-commerce/core**](https://github.com/reyhan-commerce/core) | Core Engine Package (Facades, Actions, Pipelines, Models) | `reyhan-commerce/core` | Open Source (MIT) | | [**reyhan-commerce/reyhan**](https://github.com/reyhan-commerce/reyhan) | Application Skeleton Starter (This Repository) | `reyhan-commerce/reyhan` | Open Source (MIT) | | [**reyhan-commerce/create-reyhan**](https://github.com/reyhan-commerce/create-reyhan) | Composer-native CLI Scaffolder | `reyhan-commerce/installer` | Open Source (MIT) | | [**reyhan-commerce/storefront-nuxt**](https://github.com/reyhan-commerce/storefront-nuxt) | Decoupled Nuxt 4 Storefront Layer | `storefront-nuxt` | Official Commercial | | [**reyhan-commerce/docs**](https://github.com/reyhan-commerce/docs) | Official Documentation Portal | VitePress | Live Online | --- ## 📄 Dedicated Specification Files - [Framework Architecture (`FRAMEWORK.md`)](./FRAMEWORK.md): Architectural design, concurrency lifecycle, and zero-breaking upgrade guarantees. - [Backend Technical Specification (`BACKEND.md`)](./BACKEND.md): Detailed backend architecture, PostgreSQL schemas, payment drivers, SMS pipelines, and Pest testing suites. - [Admin & Plugins Guide (`PLUGINS.md`)](./PLUGINS.md): Admin panel plugins, modular extensions architecture, and evaluation checklists. - [Execution Roadmap (`ROADMAP.md`)](./ROADMAP.md): Milestone progress and upcoming major features. - [AI & Coding Agent Standards (`AGENTS.md`)](./AGENTS.md): Strict guidelines and protocol for AI coding assistants. --- <div align="center"> <sub>Released under the MIT License. Copyright © 2026 Reyhan Commerce.</sub> </div>
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

sage
WordPress starter theme with Laravel Blade components and templates, Tailwind CSS, and block editor support
Laravel · 启动器

wave
Wave - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams 🚀 💰
Laravel · SaaS

filament-starter
A beautiful starting point for your next TALL stack project using Filament. ⚡
Laravel · 启动器

electrik
Laravel SaaS starter kit: auth, teams, Stripe billing, and Slate 3 — Composer package for Laravel 12
Laravel · SaaS

php-saas
The everything-included starter kit for your next idea
Laravel · SaaS

filament-jetstream
A Laravel starter kit built with Filament inspired by Jetstream.
Laravel · 启动器
