PHPackages                             semhoun/slim-skeleton-mvc - 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. [Database &amp; ORM](/categories/database)
4. /
5. semhoun/slim-skeleton-mvc

ActiveProject[Database &amp; ORM](/categories/database)

semhoun/slim-skeleton-mvc
=========================

Simple Slim Framework 4 skeleton with Twig, Monolog, Doctrine in Sqlite.

4.1.1(1y ago)841.3k16MITPHPPHP ^8.0CI failing

Since Aug 21Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/semhoun/slim-skeleton-mvc)[ Packagist](https://packagist.org/packages/semhoun/slim-skeleton-mvc)[ RSS](/packages/semhoun-slim-skeleton-mvc/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (14)Versions (10)Used By (0)

Slim 4 MVC Skeleton
===================

[](#slim-4-mvc-skeleton)

[![Codacy Badge](https://camo.githubusercontent.com/fabc564df596a01224483fbed0c4bc6ffcc01621d4900d542595b47d4726e31d/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3632363434626330353861663436346562326366636635363463333530306436)](https://www.codacy.com/gh/semhoun/slim-skeleton-mvc/dashboard?utm_source=github.com&utm_medium=referral&utm_content=semhoun/slim-skeleton-mvc&utm_campaign=Badge_Grade) [![Latest Stable Version](https://camo.githubusercontent.com/64e07df9e93fa4e646258f69debbb5ac5e5b175804285d747b7a2686bd325cc0/68747470733a2f2f706f7365722e707567782e6f72672f73656d686f756e2f736c696d2d736b656c65746f6e2d6d76632f762f737461626c65)](https://packagist.org/packages/semhoun/slim-skeleton-mvc) [![Total Downloads](https://camo.githubusercontent.com/40758803e2cae6815a9ecccbdb244c7de897744fbd642f215c8c48ee24991884/68747470733a2f2f706f7365722e707567782e6f72672f73656d686f756e2f736c696d2d736b656c65746f6e2d6d76632f646f776e6c6f616473)](https://packagist.org/packages/semhoun/slim-skeleton-mvc) [![License](https://camo.githubusercontent.com/2e1c13aaf50cba29b61334103fb9e67acfc963fbfb45b13029fd196d2ae58595/68747470733a2f2f706f7365722e707567782e6f72672f73656d686f756e2f736c696d2d736b656c65746f6e2d6d76632f6c6963656e7365)](https://packagist.org/packages/semhoun/slim-skeleton-mvc) [![Ask DeepWiki](https://camo.githubusercontent.com/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667)](https://deepwiki.com/semhoun/slim-skeleton-mvc)

A modern web application skeleton based on **Slim 4**, using the **MVC** architecture. This project is ideal for quickly starting the development of an API or a web application with a robust stack.

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

[](#-features)

- **Framework:** [Slim 4.15](http://www.slimframework.com/) (PSR-7, PSR-15, PSR-17)
- **PHP Version:** 8.4+ required
- **Dependency Injection Container:** [PHP-DI 7.0](http://php-di.org/) with autowiring
- **ORM:** [Doctrine ORM 3.5](https://github.com/doctrine/orm) with [DBAL 4.4](https://github.com/doctrine/dbal)
- **Database:** SQLite by default (supports MySQL, PostgreSQL via configuration)
- **Template Engine:** [Twig 3.4](https://twig.symfony.com/)
- **API Support:** RESTful API skeleton with JSON rendering
- **Logging:** [Monolog 3.9](https://github.com/Seldaek/monolog) with multiple handlers
- **Console:** [Symfony Console 6.4](https://github.com/symfony/console) with custom commands
- **Code Quality:** [PHP Insights 2.13](https://phpinsights.com/) &amp; [Rector 2.2](https://getrector.com/)
- **Debugging:** [Tracy](https://tracy.nette.org/) integrated via [slim-tracy](https://github.com/semhoun/slim-tracy)
- **Sessions:** [Odan Session 6.4](https://github.com/odan/session) with secure storage
- **Migrations:** [Doctrine Migrations 3.9](https://github.com/doctrine/migrations)
- **Environment:** [vlucas/phpdotenv 5.6](https://github.com/vlucas/phpdotenv) for configuration (supports `.env` files, system environment variables, and mandatory variables using `env_required(['VAR1', 'VAR2'])`
- **Proxy Support:** Built-in proxy detection middleware

🛠️ Requirements
---------------

[](#️-requirements)

- PHP 8.4 or higher
- Composer 2.0 or higher
- SQLite extension (or MySQL/PostgreSQL for production)
- Required PHP extensions: json, pdo, pdo\_sqlite

🛠️ Installation
---------------

[](#️-installation)

### 1. Create the project

[](#1-create-the-project)

Use Composer to install the project:

```
composer create-project semhoun/slim-skeleton-mvc [your-app]
```

### 2. Configuration

[](#2-configuration)

1. Copy the `.env.example` file to `.env`:

```
cp .env.example .env
```

2. By default, the application uses a **SQLite** database located in `var/database.sqlite`. For production, configure your database and other settings in the `.env` file or via **environment variables**.
3. Initialize the database:

```
./console migrations:migrate
```

4. (Optional) Generate Doctrine proxies:

```
./console orm:generate-proxies
```

### 3. Run the application

[](#3-run-the-application)

You can use the PHP built-in development server:

```
composer start
```

Or use the console command:

```
./console serve
```

The application will be accessible at .

### 4. Available Console Commands

[](#4-available-console-commands)

```
# Clear application cache
./console cache:clear

# Initialize cache
./console cache:init

# Generate Doctrine proxies
./console orm:generate-proxies

# Run development server
./console serve

# List all available commands
./console list
```

🧪 Development Tools
-------------------

[](#-development-tools)

Run unit tests:

```
composer test
```

Check code quality with PHP Insights:

```
composer insights-check
```

Apply automatic Rector fixes:

```
composer rector-fix
```

Fix code style issues:

```
composer insights-fix
```

Run pre-commit checks (code style + rector + dos2unix):

```
composer pre-commit
```

A `compose.yml` file is provided to facilitate deployment. Here is a configuration example:

```
services:
  slim:
    image: semhoun/webserver
    ports:
      - "8080:80"
    volumes:
      - .:/www
    environment:
      - APP_ENV=dev
      - DEBUG_MODE=true
```

To launch the environment with Docker:

```
docker compose up -d
```

📝 Notes
-------

[](#-notes)

- Ensure that the `var` folder has write permissions (for cache, logs, database)
- Default credentials: **admin** / **admin** (change in production!)
- The project includes an error rendering system (HTML/JSON) based on the `Accept` header
- API routes are prefixed with `/api` (configurable in `config/settings/_base_.php`)

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

[](#-documentation)

- [Slim Framework Documentation](https://www.slimframework.com/docs/)
- [Doctrine ORM Documentation](https://www.doctrine-project.org/projects/orm.html)
- [Twig Documentation](https://twig.symfony.com/doc/3.x/)
- [PHP-DI Documentation](https://php-di.org/doc/)

📄 License
---------

[](#-license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

🔄 Changelog
-----------

[](#-changelog)

See the [CHANGELOG.md](CHANGELOG.md) file for version history and upcoming changes.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance64

Regular maintenance activity

Popularity30

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 96.9% of commits — single point of failure

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

Every ~241 days

Recently: every ~357 days

Total

9

Last Release

566d ago

Major Versions

3.0.0 → 4.0.02019-09-15

PHP version history (3 changes)4.0.0PHP &gt;=7.1

4.0.4PHP &gt;=7.1|^8.0

4.1.0PHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![semhoun](https://avatars.githubusercontent.com/u/54236487?v=4)](https://github.com/semhoun "semhoun (62 commits)")[![codacy-badger](https://avatars.githubusercontent.com/u/23704769?v=4)](https://github.com/codacy-badger "codacy-badger (1 commits)")[![cshernandez1](https://avatars.githubusercontent.com/u/150465489?v=4)](https://github.com/cshernandez1 "cshernandez1 (1 commits)")

---

Tags

doctrineskeletonslim-frameworkslim4twigapiconsoletwigsqlitedoctrinemvcSkeletonmonologslim-framework

###  Code Quality

Static AnalysisRector

### Embed Badge

![Health badge](/badges/semhoun-slim-skeleton-mvc/health.svg)

```
[![Health](https://phpackages.com/badges/semhoun-slim-skeleton-mvc/health.svg)](https://phpackages.com/packages/semhoun-slim-skeleton-mvc)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[concrete5/core

Concrete – an open source content management system.

20163.8k49](/packages/concrete5-core)[duxweb/dux-lite

The lightweight framework based on slim php

161.0k9](/packages/duxweb-dux-lite)

PHPackages © 2026

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