Beauty Framework app
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 3
Type:project
pkg:composer/beauty-framework/app
Requires
- php: >=8.1
- beauty-framework/cache: ^1.0
- beauty-framework/core: ^1.0
- beauty-framework/database: ^1.0
- beauty-framework/jobs: ^1.0
- beauty-framework/parallels: ^1.0
This package is not auto-updated.
Last update: 2025-10-19 13:26:15 UTC
README
๐งฑ Beauty Framework
Beauty is a blazing-fast, PSR-compliant, modular microframework for building REST and gRPC APIs on top of RoadRunner. It provides first-class support for clean architecture, strong developer ergonomics, and production-ready features without FPM overhead.
๐ฏ Goals
Beauty is designed as a lightweight, modular and fast foundation for building microservices:
- ๐งฉ Package-oriented: each module is self-contained and reusable
- ๐ RoadRunner-native: zero FPM, ultra-low latency
- โ๏ธ Clean architecture: clear separation between application layers
- ๐งช Testing-friendly: services are testable by design
- ๐ณ Docker-first: fully containerized by default
๐ Features
- Fully PSR-compliant (PSR-3, 4, 7, 11, 15, 14)
- Built-in DI container (PHP-DI powered)
- Attribute-based routing and middleware
- Event system with listener registry
- Lightweight config and cache system
- Jobs, events, queues (via RoadRunner)
- Console kernel for CLI tools
- Powered by RoadRunner โ no FPM
๐ Project Structure
โโโ app โ โโโ Console # CLI commands โ โโโ Container # DI bindings for core services โ โโโ Controllers # HTTP/API controllers โ โโโ Events # Application events โ โโโ Jobs # Async jobs โ โโโ Listeners # Event listeners โ โโโ Middlewares # PSR-15 middleware โ โโโ Requests # Validated requests โ โโโ Responses # Typed responses โ โโโ Repositories # Data access โ โโโ Services # Business logic โโโ config # Configuration files โโโ workers # RoadRunner workers (http, jobs, etc) โโโ bootstrap # Kernel bootstrapping โโโ public/index.php # Entry point (optional)
๐ฆ Installation
composer create-project beauty-framework/app beauty-framework cd beauty-framework cp .env.example .env make up # or make prod
โ๏ธ Configuration (.env)
APP_NAME=Beauty
APP_ENV=local
APP_VERSION=1.0
APP_TIMEZONE=UTC
APP_LOCALE=en
APP_DEBUG=true
USE_DI_CACHE=true
DB_CONNECTION=pgsql
DB_HOST=database
DB_PORT=5432
DB_DATABASE=my_db
DB_USERNAME=root
DB_PASSWORD=password
CACHE_DRIVER=redis
REDIS_HOST=redis
REDIS_PORT=6379
๐ง CLI Commands
| Command | Description |
|---|---|
| generate:controller | Generate controller |
| generate:command | Generate a new CLI command |
| generate:middleware | Generate a new middleware |
| generate:request | Generate a new request |
| generate:event | Create a new event |
| generate:listener | Create a new listener |
| generate:job | Create a new job |
๐ณ Docker Setup (default)
Beauty is designed to run natively inside Docker. By default, all services are containerized:
| Service | Image | Notes |
|---|---|---|
| app | php:8.4-alpine + RR | RoadRunner + CLI build targets |
| db | postgres:16 | PostgreSQL 16 |
| redis | redis:alpine | Redis 7 |
services: app: build: target: dev environment: PHP_IDE_CONFIG: "serverName=stage" restart: unless-stopped db: image: postgres:16 ports: - "5432:5432" redis: image: redis:alpine ports: - "6379:6379"
๐ Makefile Commands
| Category | Command | Description |
|---|---|---|
| Start | make up |
Start the DEV environment |
make prod |
Start the PROD environment | |
| Stop | make stop |
Stop all containers |
make down |
Remove all containers and volumes | |
make restart |
Restart all containers | |
make restart-container CONTAINER=... |
Restart a specific container | |
make stop-container CONTAINER=... |
Stop a specific container | |
| PHP | make php <cmd> |
Run php command inside the app container |
make beauty <cmd> |
Run beauty CLI command inside the app container | |
| Tests | make test |
Run PHPUnit tests |
| Composer | make composer <cmd> |
Run composer command inside the app container |
| Shell | make bash |
Open bash shell inside the app container |
| Logs | make logs <container> |
View logs of specific container |
| Database | make psql |
Access PostgreSQL CLI |
| Cache | make redis |
Access Redis CLI |
๐ Documentation
See Documentation page.
๐ฆ Related Modules
See full list of modules at Documentation page.
๐ TODO
- ORM support (query builder + migrations)
-
beauty/testingpackage with framework-aware test harness - gRPC server module with RoadRunner integration
- Job retries, delays, and failure handlers
- OpenAPI/Swagger support
- Full module documentation
Welcome to Beauty Framework โ lean, fast, clean. Let's build some serious APIs โก