vortos/vortos-framework
Composer 安装命令:
composer require vortos/vortos-framework
包简介
The Vortos Clean Architecture Framework — meta-package
README 文档
README
Vortos Framework
The Architect's PHP Framework.
Vortos (Greek for "Builder") is an opinionated, architectural framework designed for building complex, scalable, and maintainable enterprise applications. It bridges the gap between rapid development and rigorous software engineering standards.
- Philosophy
"Speed usually kills architecture. Vortos proves it doesn't have to."
While industry titans like Laravel and Symfony prioritize Rapid Application Development (RAD) by leveraging patterns like Active Record and MVC, they often inadvertently encourage tight coupling. As projects scale, this speed becomes technical debt, making adherence to Clean Architecture and Domain-Driven Design (DDD) an uphill battle.
Our Core Mission: To democratize advanced architectural patterns. Vortos provides a pre-wired, production-ready infrastructure that enforces strict boundaries and separation of concerns by default.
Key Differentiators:
Enforced Clean Architecture: The Domain is the immutable core, completely decoupled from the Infrastructure and UI layers.
Zero-Config Rigor: We believe developers shouldn't have to spend weeks wiring buses or configuring DI containers. Vortos bakes these patterns in, allowing you to focus immediately on solving complex Domain problems.
Standing on Giants: Vortos is pragmatic. Under the hood, we leverage battle-tested Symfony Components (Dependency Injection, Messenger, Routing) to ensure stability and security, assembling them into a stricter, DDD-compliant blueprint.
- Architecture & Patterns
Vortos is built on four non-negotiable pillars:
Domain-Driven Design (DDD): The codebase structure mirrors the business language (Ubiquitous Language), not the database schema.
CQRS (Command Query Responsibility Segregation):
Writes (Commands): Optimized for transactional integrity using PostgreSQL.
Reads (Queries): Optimized for high-performance retrieval using MongoDB (Projections) and Redis (Caching).
Event-Driven Architecture: Side effects are decoupled via Domain Events.
Hybrid Consistency Model:
State Persistence: We persist the current state of entities to ensure simplicity and transactional safety (avoiding the operational complexity of full Event Sourcing).
Eventual Consistency: Read models and external notifications are updated asynchronously via the Event Bus.
- The Tech Stack
Vortos runs on a modern, containerized stack designed for performance and observability.
Runtime: PHP 8.4 (FPM-Alpine)
Web Server: Nginx (Alpine)
Write Store: PostgreSQL 16 (Strict Relational)
Read Store: MongoDB 8.0 (Document Store)
Cache & Transport: Redis (Alpine)
Infrastructure: Docker & Docker Compose (Microservices Topology)
- Directory Structure
Vortos adheres to the Onion Architecture (also known as Hexagonal/Ports & Adapters). Plaintext
/ ├── config/ # Framework wiring (Routes, Services, Packages) ├── docker/ # Infrastructure definitions (Nginx, PHP, Postgres configs) ├── packages/ # Core Framework components (The "Vortos" vendor code) ├── public/ # Entry point (index.php) └── src/ # YOUR APPLICATION CODE ├── Domain/ # Pure Business Logic (Entities, Value Objects, Repository Interfaces) ├── Application/ # Use Cases (Command Handlers, Query Handlers) ├── Infrastructure/ # Implementations (Doctrine, Mongo Clients, API Clients) └── UI/ # Entry Points (Controllers, CLI Commands)
- Getting Started
Follow these steps to spin up the entire microservices infrastructure. Prerequisites
Docker & Docker Compose
Git
Installation
Clone the Repository
Bash
git clone https://github.com/vortos/vortos.git cd vortos
Configure Environment Copy the example configuration to a live environment file. Bash
cp .env.example .env
Ignite the Infrastructure This builds the PHP 8.4 and Nginx images and starts the database triad (Postgres, Mongo, Redis). Bash
docker compose up -d --build
Install Dependencies Run Composer inside the container to ensure platform compatibility. Bash
docker compose exec backend composer install
Verify Status Ensure all 5 services (Backend, Nginx, Write_DB, Read_DB, Redis) are running. Bash
docker compose ps
Development Workflow
Access the API: http://localhost
Database Access (Write): Connect to localhost:5432 (User: postgres / Pass: see .env)
Database Access (Read): Connect to localhost:27017
Check Logs:
Bash
docker compose logs -f backend
- Deployment Strategy
Vortos is designed as a Headless API.
Backend (The Core): Hosted on VPS/Cloud (e.g., Oracle Cloud, AWS) via Docker Compose for stateful persistence and raw performance.
Frontend (The UI): Recommended hosting on Edge Networks (e.g., Vercel, Netlify) consuming the Vortos API.
Documentation: Static generation hosted on Vercel.
License
This framework is open-sourced software licensed under the MIT license.
vortos/vortos-framework 适用场景与选型建议
vortos/vortos-framework 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 655 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 vortos/vortos-framework 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 vortos/vortos-framework 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 655
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 35
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-26