PHPackages                             holkerveen/hi-framework - 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. holkerveen/hi-framework

ActiveLibrary[Framework](/categories/framework)

holkerveen/hi-framework
=======================

A lightweight PHP framework with routing, dependency injection, Doctrine ORM, Twig templating, and PSR-7 HTTP support

v0.5.0(4mo ago)0201GPL-3.0-or-laterPHPPHP &gt;=8.4

Since Dec 25Pushed 4mo agoCompare

[ Source](https://github.com/holkerveen/hi-framework)[ Packagist](https://packagist.org/packages/holkerveen/hi-framework)[ RSS](/packages/holkerveen-hi-framework/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (7)Used By (1)

HiFramework
===========

[](#hiframework)

This is an education yet completely useful PHP web application framework

Features
--------

[](#features)

- **Attribute-Based Routing** - Clean, declarative routing using PHP 8 attributes
- **Dependency Injection** - Automatic constructor injection with PSR-11 container
- **Access Control** - Secure by default with role-based access control
- **Doctrine ORM** - Full ORM support with entity management
- **Twig Templates** - Powerful templating with custom extensions
- **PSR Standards** - PSR-7 (HTTP), PSR-3 (Logging), PSR-11 (Container)
- **Authentication** - Built-in user authentication with session management

Requirements
------------

[](#requirements)

- PHP 8.4 or higher
    - with php8.4-intl extension
    - with php8.4-sqlite3 extension (should you choose to use the default db setup)
- Composer
- SQLite, MySQL, or PostgreSQL (for Doctrine ORM)

Getting started
---------------

[](#getting-started)

```
composer create-project holkerveen/hi-framework-skeleton my-new-website
cd my-new-website
composer hi orm:schema-tool:create
composer hi user:create
composer serve
```

This creates a new project, sets up the database, creates your first user, and starts the development server.

You'll be prompted to enter an email and password for the first user.

Visit  to access your new application

Database
--------

[](#database)

HiFramework uses Doctrine ORM for database management. By default, it uses SQLite for easy setup, but you can configure it to use MySQL or PostgreSQL.

### Creating the Database Schema

[](#creating-the-database-schema)

```
composer run doctrine orm:schema-tool:create
```

### Adding Your First User

[](#adding-your-first-user)

Since user management requires authentication, you'll need to create your first user via the command line:

```
composer run hi:user:create
```

You'll be prompted to enter an email and password for the new user.

### Other Useful Database Commands

[](#other-useful-database-commands)

```
# Update schema after entity changes
composer run doctrine orm:schema-tool:update --force

# Drop the schema
composer run doctrine orm:schema-tool:drop --force

# Validate schema
composer run doctrine orm:validate-schema
```

Quick Example
-------------

[](#quick-example)

Once installation is finished you can start creating your application. Here are some basic examples to help you get started.

### Controller

[](#controller)

```
