PHPackages                             responsive-sk/hdm-boot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. responsive-sk/hdm-boot

ActiveProject[Framework](/categories/framework)

responsive-sk/hdm-boot
======================

HDM Boot - Hexagonal + DDD + Modular Monolith Architecture Framework

v0.9.0(11mo ago)13[1 issues](https://github.com/responsive-sk/hdm-boot/issues)MITPHPPHP ^8.3CI failing

Since Jun 22Pushed 10mo agoCompare

[ Source](https://github.com/responsive-sk/hdm-boot)[ Packagist](https://packagist.org/packages/responsive-sk/hdm-boot)[ Docs](https://github.com/responsive-sk/hdm-boot)[ RSS](/packages/responsive-sk-hdm-boot/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (16)Versions (2)Used By (0)

HDM Boot Framework
==================

[](#hdm-boot-framework)

**Enterprise PHP framework with Triple Architecture: Hexagonal + DDD + Modular Monolith**

[![PHP Version](https://camo.githubusercontent.com/0f16581d1180dbfd4c0e13166ec1267d4ad2f2fab8281ea6d6b284cf5c65d921/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d626c75652e737667)](https://php.net)[![Framework](https://camo.githubusercontent.com/53c8dbd80acdc4434a5302aa95987ddf1e1ab432e3090c30acd3eaf49ee1c214/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4672616d65776f726b2d536c696d253230342d677265656e2e737667)](https://slimframework.com)[![Architecture](https://camo.githubusercontent.com/e73421719c1bb4584cb624122edca691644ec49d29d092b6f74ec8fd6762bcaf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4172636869746563747572652d48657861676f6e616c2532302532422532304444442d6f72616e67652e737667)](docs/ARCHITECTURE.md)[![License](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)[![Tests](https://camo.githubusercontent.com/2f713a203ebe00894fd754ec463112e66c1f27c261674d285b53436c541539ad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f54657374732d333925323070617373696e672d627269676874677265656e2e737667)](tests/)

🚀 Features
----------

[](#-features)

### 🏛️ **Triple Architecture**

[](#️-triple-architecture)

- **Hexagonal Architecture** - Clean separation of business logic from infrastructure
- **Domain-Driven Design** - Rich domain models with clear boundaries
- **Modular Monolith** - Independent modules with clear interfaces

### 🔐 **Security First**

[](#-security-first)

- **JWT Authentication** - Secure token-based authentication
- **CSRF Protection** - Cross-site request forgery prevention
- **Secure Sessions** - Enterprise-grade session management
- **Path Safety** - Safe file system operations with `responsive-sk/slim4-paths`
- **Directory Protection** - `.htaccess` protection for sensitive directories
- **Path Traversal Prevention** - Secure path resolution with Paths service

### 🌍 **Internationalization**

[](#-internationalization)

- **Multi-language Support** - Slovak, Czech, English, and more
- **Automatic Detection** - Browser and user preference detection
- **Gettext Integration** - Professional translation workflow
- **Locale Management** - Dynamic language switching

### 🏗️ **Full Module Isolation**

[](#️-full-module-isolation)

- **Independent Modules** - Each module can have its own composer.json
- **Module-specific Testing** - Isolated test suites with PHPUnit
- **CI/CD per Module** - GitHub Actions for individual modules
- **Marketplace Ready** - Open-source plugin ecosystem support

### 📊 **Enterprise Ready**

[](#-enterprise-ready)

- **Comprehensive Logging** - Monolog with multiple handlers
- **Health Monitoring** - Multiple health check endpoints
- **Database Abstraction** - Multiple storage engines support
- **Production Deployment** - Complete deployment guides and validation

📦 Installation
--------------

[](#-installation)

### Quick Start

[](#quick-start)

```
composer create-project responsive-sk/hdm-boot my-project
cd my-project
cp .env.example .env
# Configure your .env file
composer install
```

### Development Setup

[](#development-setup)

```
# Clone repository
git clone https://github.com/responsive-sk/hdm-boot.git
cd hdm-boot

# Install dependencies
composer install

# Configure environment
cp .env.example .env
php bin/generate-keys.php

# Validate environment
php bin/validate-env.php

# Fix permissions
php bin/fix-permissions.php

# Start development server
php -S localhost:8000 -t public/
```

### Production Deployment

[](#production-deployment)

```
# Build production package
php bin/build-production.php

# Upload generated ZIP to your server via FTP/FTPS
# Extract files and configure .env
# Visit your website to complete setup
```

📋 **Complete deployment guide:** [docs/DEPLOYMENT\_GUIDE.md](docs/DEPLOYMENT_GUIDE.md)

📁 Directory Structure
---------------------

[](#-directory-structure)

HDM Boot follows an organized directory structure with runtime data consolidated under `var/`:

```
project/
├── var/                    # Runtime data (protected)
│   ├── storage/           # Database files
│   │   ├── mark.db       # Mark system database
│   │   ├── user.db       # User system database
│   │   └── system.db     # Core system database
│   ├── logs/              # Application logs
│   ├── cache/             # Cache files
│   └── sessions/          # Session data
├── content/               # Content files (Git-friendly)
│   ├── articles/          # Markdown articles
│   └── docs/              # Documentation
├── templates/             # Template files
│   ├── layouts/
│   └── partials/
├── public/                # Web-accessible files only
│   ├── assets/
│   └── media/
├── src/                   # Application source code
│   ├── Modules/
│   └── SharedKernel/
└── config/
    └── paths.php          # Path configuration

```

**Key Benefits:**

- **Security** - Sensitive files outside web root
- **Organization** - Clear separation of concerns
- **Protection** - `.htaccess` files protect sensitive directories
- **Flexibility** - Configurable paths via `config/paths.php`

📋 **Paths Service Guide:** [docs/PATHS\_SERVICE\_GUIDE.md](docs/PATHS_SERVICE_GUIDE.md)

🏗️ Architecture
---------------

[](#️-architecture)

HDM Boot implements **Triple Architecture** combining three enterprise patterns:

### **1. Hexagonal Architecture (Ports &amp; Adapters)**

[](#1-hexagonal-architecture-ports--adapters)

```
Application Core
├── Domain/          # Business logic
├── Application/     # Use cases
└── Ports/          # Interfaces

Infrastructure
├── Adapters/       # External integrations
├── Persistence/    # Database implementations
└── Web/           # HTTP controllers

```

### **2. Domain-Driven Design (DDD)**

[](#2-domain-driven-design-ddd)

```
Domain/
├── Entities/       # Business objects
├── ValueObjects/   # Immutable values
├── Repositories/   # Data access interfaces
├── Services/       # Domain services
└── Events/        # Domain events

```

### **3. Modular Monolith**

[](#3-modular-monolith)

```
src/Modules/
├── Core/           # Essential modules
│   ├── User/       # User management
│   ├── Security/   # Authentication & authorization
│   ├── Template/   # View rendering
│   └── Session/    # Session management
└── Optional/       # Feature modules
    ├── Blog/       # Blog functionality (Full Module Isolation)
    └── Ecommerce/  # E-commerce features

```

🔧 Configuration
---------------

[](#-configuration)

### Environment Variables

[](#environment-variables)

```
# Application
APP_NAME="HDM Boot"
APP_ENV=prod
APP_DEBUG=false
APP_TIMEZONE=UTC

# Database
DATABASE_URL="sqlite:var/storage/app.db"

# Security
JWT_SECRET="your-64-character-secret-key"
JWT_EXPIRY=3600

# Modules
ENABLED_MODULES="Blog"

# Sessions
SESSION_NAME="hdm_boot_session"
SESSION_LIFETIME=7200
SESSION_COOKIE_SECURE=true
SESSION_COOKIE_HTTPONLY=true

# Localization
DEFAULT_LOCALE=en_US
DEFAULT_TIMEZONE=Europe/Bratislava
ENABLE_SLOVAK=true
ENABLE_CZECH=true
```

### Module Configuration

[](#module-configuration)

Enable/disable modules in `.env`:

```
ENABLED_MODULES="Blog,Ecommerce,Analytics"
```

🧪 Testing
---------

[](#-testing)

### Framework Tests

[](#framework-tests)

```
# Run all tests
composer test

# Run specific test suites
composer test:unit
composer test:integration
composer test:functional

# Generate coverage report
composer test:coverage

# Code quality checks
composer cs:check
composer analyse
```

### Module-specific Tests (Full Module Isolation)

[](#module-specific-tests-full-module-isolation)

```
# Blog module tests
cd src/Modules/Optional/Blog
composer test
composer test:coverage

# Run via module test runner
php run-module-tests.php
php run-module-tests.php --coverage
```

### Test Statistics

[](#test-statistics)

- **Framework Tests**: 39 tests, 98 assertions
- **Blog Module Tests**: 39 tests, 98 assertions
- **Total Coverage**: 90%+ target
- **Code Quality**: PHPStan Level 8

🏗️ Full Module Isolation
------------------------

[](#️-full-module-isolation-1)

HDM Boot supports **Full Module Isolation** for enterprise development:

### **Blog Module Example**

[](#blog-module-example)

```
src/Modules/Optional/Blog/
├── composer.json              # Independent package
├── vendor/                    # Module dependencies (84KB optimized)
├── phpunit.xml               # Module-specific testing
├── run-module-tests.php      # Paths-powered test runner
├── tests/                    # 39 tests, 98 assertions
├── README.md                 # Module documentation
├── .github/workflows/ci.yml  # Module CI/CD
└── src/                      # Module source code

```

### **Module Development**

[](#module-development)

```
# Create new isolated module
mkdir -p src/Modules/Optional/MyModule
cd src/Modules/Optional/MyModule

# Initialize module
composer init
composer require responsive-sk/slim4-paths

# Add testing
composer require --dev phpunit/phpunit
cp ../Blog/phpunit.xml .
cp ../Blog/run-module-tests.php .

# Run module tests
composer test
```

### **Benefits**

[](#benefits)

- ✅ **Independent Development** - Teams can work on modules separately
- ✅ **Separate CI/CD** - Module-specific GitHub Actions
- ✅ **Version Management** - Independent module versioning
- ✅ **Marketplace Ready** - Modules can be published as packages
- ✅ **Path Safety** - Uses `responsive-sk/slim4-paths` for secure operations

🛠️ Development Tools
--------------------

[](#️-development-tools)

### **Code Quality**

[](#code-quality)

```
# Route discovery
php bin/route-list.php

# Environment validation
php bin/validate-env.php

# Key generation
php bin/generate-keys.php

# Module isolation check
php -r "
\$moduleManager = \$container->get('ModuleManager');
\$info = \$moduleManager->getModuleIsolationInfo('Blog');
var_dump(\$info);
"
```

### **Debugging**

[](#debugging)

```
# Enable debug mode
echo "APP_DEBUG=true" >> .env

# View logs
tail -f var/logs/app.log

# Check module status
php bin/route-list.php | grep -i blog
```

📚 Documentation
---------------

[](#-documentation)

- [**Architecture Guide**](docs/ARCHITECTURE.md) - Triple Architecture details
- [**Module Development**](docs/MODULES.md) - Creating and managing modules
- [**Security Guide**](docs/SECURITY.md) - Security best practices
- [**Deployment Guide**](docs/DEPLOYMENT.md) - Production deployment
- [**Full Module Isolation**](docs/MODULE_ISOLATION.md) - Enterprise module development
- [**API Documentation**](docs/API.md) - REST API reference

🚀 Production Deployment
-----------------------

[](#-production-deployment)

### **Quick Deployment**

[](#quick-deployment)

```
# 1. Generate secure keys
php bin/generate-keys.php

# 2. Configure production environment
cp .env.example .env
# Edit .env with production values

# 3. Validate environment
php bin/validate-env.php

# 4. Deploy
composer install --no-dev --optimize-autoloader
composer deploy:prod

# 5. Verify deployment
curl https://yourdomain.com/health
```

### **Production Checklist**

[](#production-checklist)

- ✅ **Environment**: `APP_ENV=prod`, `APP_DEBUG=false`
- ✅ **Security**: Strong JWT\_SECRET (64+ characters)
- ✅ **Database**: Production database configured
- ✅ **Sessions**: Secure session configuration
- ✅ **HTTPS**: SSL/TLS enabled
- ✅ **Monitoring**: Health endpoints configured
- ✅ **Logging**: Production log levels set

🌟 Live Demo
-----------

[](#-live-demo)

**Production Instance**:

- **Homepage**: Framework overview and features
- **Blog**:
- **API Status**:
- **Health Check**:

🤝 Contributing
--------------

[](#-contributing)

### **Framework Contributions**

[](#framework-contributions)

1. Fork the repository
2. Create feature branch: `git checkout -b feature/amazing-feature`
3. Run tests: `composer test`
4. Commit changes: `git commit -m 'Add amazing feature'`
5. Push to branch: `git push origin feature/amazing-feature`
6. Open Pull Request

### **Module Contributions**

[](#module-contributions)

1. Create isolated module in `src/Modules/Optional/`
2. Add module-specific tests and CI
3. Document module in README.md
4. Submit as separate package or PR

### **Development Guidelines**

[](#development-guidelines)

- ✅ **PSR-12** code style
- ✅ **PHPStan Level 8** static analysis
- ✅ **90%+ test coverage** requirement
- ✅ **Semantic versioning** for releases
- ✅ **Conventional commits** for changelog

📊 Project Statistics
--------------------

[](#-project-statistics)

- **Framework Version**: 0.9.0 (Release Candidate)
- **PHP Requirement**: 8.2+
- **Dependencies**: 20+ packages
- **Test Coverage**: 90%+
- **Code Quality**: PHPStan Level 8
- **Modules**: 8 Core + 1 Optional (Blog)
- **Routes**: 29 endpoints
- **Documentation**: 6 guides

📄 License
---------

[](#-license)

MIT License - see [LICENSE](LICENSE) file for details.

🔗 Links
-------

[](#-links)

- **GitHub Repository**:
- **Live Demo**:
- **Documentation**: [docs/](docs/)
- **Issues**: [GitHub Issues](https://github.com/responsive-sk/hdm-boot/issues)
- **Discussions**: [GitHub Discussions](https://github.com/responsive-sk/hdm-boot/discussions)
- **Packagist**: [responsive-sk/hdm-boot](https://packagist.org/packages/responsive-sk/hdm-boot)

🏆 Acknowledgments
-----------------

[](#-acknowledgments)

- **Slim Framework** - Micro framework foundation
- **PHP-DI** - Dependency injection container
- **Monolog** - Logging library
- **PHPUnit** - Testing framework
- **responsive.sk** - Development team

---

**HDM Boot Framework** - Enterprise PHP development with Triple Architecture

*Built with ❤️ by the HDM Boot Team*

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

330d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a9ca94d5516a8f930325df47de8418a33caf484280105d108a693533c73d4699?d=identicon)[evan70](/maintainers/evan70)

---

Tags

phpframeworkenterprisedddhexagonal-architectureslim4production-readymodular-monolithresponsive-sk

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/responsive-sk-hdm-boot/health.svg)

```
[![Health](https://phpackages.com/badges/responsive-sk-hdm-boot/health.svg)](https://phpackages.com/packages/responsive-sk-hdm-boot)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[luoxiaojun/sw-fw-less

Swoole Http Server without framework

165.3k](/packages/luoxiaojun-sw-fw-less)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
