PHPackages                             codelinered/slim-skeleton - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. codelinered/slim-skeleton

ActiveProject[HTTP &amp; Networking](/categories/http)

codelinered/slim-skeleton
=========================

Slim Skeleton - CodelineRed

5.6.0(3y ago)041[1 PRs](https://github.com/CodelineRed/Slim-Skeleton/pulls)MITPHPPHP 8.0.\*

Since Jul 4Pushed 3y agoCompare

[ Source](https://github.com/CodelineRed/Slim-Skeleton)[ Packagist](https://packagist.org/packages/codelinered/slim-skeleton)[ Docs](https://slim3.codelinered.net)[ RSS](/packages/codelinered-slim-skeleton/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (16)Versions (57)Used By (0)

Slim Skeleton - CodelineRed
===========================

[](#slim-skeleton---codelinered)

This git is for [slim3.codelinered.net](https://slim3.codelinered.net). Take a look at [screenshots](https://github.com/CodelineRed/slim-skeleton/tree/master/screenshots).

Table of contents
-----------------

[](#table-of-contents)

- [Included Third Party Code](#included)
- Install Guides
    - [Install Skeleton](#install-skeleton)
    - [Install PHP, MySQL, Composer and Adminer (optional)](#install-php-mysql-composer-and-adminer-optional)
- [Path generation with Locale code and Generic locale code](#path-generation-with-locale-code-and-generic-locale-code)
- [How to create further localisations](#how-to-create-further-localisations)
- [How to switch between different url modes](#how-to-switch-between-different-url-modes)
    - [Mode 1](#mode-1)
    - [Mode 2](#mode-2)
    - [Mode 3](#mode-3-default)
- [ACL settings](#acl-settings)
- [Troubleshooting](#troubleshooting)
- [Links](#links)

Included
--------

[](#included)

- [Slim 3](https://www.slimframework.com)
- [Slim Twig View 2](https://github.com/slimphp/Twig-View)
- [Slim CSRF 0.8](https://github.com/slimphp/Slim-Csrf)
- [Slim Flash 0.4](https://github.com/slimphp/Slim-Flash)
- [Monolog 1](https://seldaek.github.io/monolog/)
- [Doctrine ORM 2](https://packagist.org/packages/doctrine/orm)
- [Geggleto ACL 1](https://github.com/geggleto/geggleto-acl)
- [Google Authenticator](https://github.com/PHPGangsta/GoogleAuthenticator)
- [Google reCAPTCHA 1](https://github.com/google/recaptcha)
- [HTML Compress Twig Extension](https://github.com/nochso/html-compress-twig)

Install Skeleton
----------------

[](#install-skeleton)

### Required

[](#required)

- PHP 8.0
- MySQL 5.7 (pdo\_mysql)

Open console on your OS and navigate to your project folder. [Download zip](https://github.com/CodelineRed/slim-skeleton/archive/production.zip) if you don't have git or composer on your OS.

```
+++++ ZIP VERSION +++++
$ (unix) wget -O slim-prod.zip https://github.com/CodelineRed/slim-skeleton/archive/production.zip
$ (unix) unzip slim-prod.zip
$ (win10) curl -L -o slim-prod.zip https://github.com/CodelineRed/slim-skeleton/archive/production.zip
$ (win10) tar -xf slim-prod.zip
$ cd slim-skeleton-production
$ (optional) cp config\additional-settings.dist.php config\additional-settings.php
$ ---- Open "config\additional-settings.php" and change everything you have to change ----
$ php composer insall --no-dev
$ php doctrine dbal:run-sql "CREATE DATABASE slim_skeleton"
$ php doctrine orm:schema-tool:update --force
$ php doctrine dbal:import sql/all-records.sql
```

```
+++++ GIT VERSION +++++
$ git clone https://github.com/CodelineRed/slim-skeleton.git
$ cd slim-skeleton
$ git checkout production
$ (optional on unix)  rm -rf .git
$ (optional on win10) rmdir .git /s
$ (optional) cp config\additional-settings.dist.php config\additional-settings.php
$ ---- Open "config\additional-settings.php" and change everything you have to change ----
$ php composer insall --no-dev
$ php doctrine dbal:run-sql "CREATE DATABASE slim_skeleton"
$ php doctrine orm:schema-tool:update --force
$ php doctrine dbal:import sql/all-records.sql
```

```
+++++ COMPOSER VERSION +++++
$ php composer create-project codelinered/slim-skeleton slim-skeleton "dev-production" --no-dev
$ cd slim-skeleton
$ php doctrine dbal:run-sql "CREATE DATABASE slim_skeleton"
$ php doctrine orm:schema-tool:update --force
$ php doctrine dbal:import sql/all-records.sql
```

Default Website login: user = user, pass = password If you need PHP, MySQL, Composer and Adminer, see below ⇓.

Install PHP, MySQL, Composer and Adminer (optional)
---------------------------------------------------

[](#install-php-mysql-composer-and-adminer-optional)

### Required

[](#required-1)

- [Docker](https://www.docker.com/)

Open console on your OS and navigate to the unziped/ cloned app folder.

```
$ (unix)    systemctl docker start
$ (windows) "c:\path\to\Docker Desktop.exe"
$ docker-compose build
$ docker-compose up -d
$ docker-compose run composer install --no-dev
$ (unix)    docker inspect slim-db | grep "IPAddress"
$ (windows) docker inspect slim-db | findstr "IPAddress"
$ ---- Add IPAddress as Doctrine "host" in "config\additional-settings.php" ----
```

Open [localhost:7705](http://localhost:7705) for Website or [localhost:7707](http://localhost:7707) for Adminer.

DB Login[Adminer](http://localhost:7707)ServerIP from `IPAddress`UsernamerootPasswordrootdockerpwDatabasePath generation with Locale code and Generic locale code
--------------------------------------------------------

[](#path-generation-with-locale-code-and-generic-locale-code)

- Mode 1 - example.com/de/ = `'process' => \App\Utility\LanguageUtility::LOCALE_URL | \App\Utility\LanguageUtility::DOMAIN_DISABLED,`
- Mode 2 - example.de = `'process' => \App\Utility\LanguageUtility::LOCALE_URL | \App\Utility\LanguageUtility::DOMAIN_ENABLED,`
- Mode 3 - example.com (de-DE session) = `'process' => \App\Utility\LanguageUtility::LOCALE_SESSION | \App\Utility\LanguageUtility::DOMAIN_DISABLED,` (default)

It depends on your configuration what will be returned.

Mode 1Mode 2Mode 3locale codede-DEde-DExx-XXgeneric locale codede-DExx-XXxx-XXTwigPHPTwig ExamplePHP Examplelocale code`{{ lc }}``LanguageUtility::getLocale()``{{ path_for('user-register-' ~ lc) }}``$this->router->pathFor('user-register-' . LanguageUtility::getLocale())`generic locale code`{{ glc }}``LanguageUtility::getGenericLocale()``{{ path_for('user-login-' ~ glc) }}``$this->router->pathFor('user-login-' . LanguageUtility::getGenericLocale())`How to create further localisations
-----------------------------------

[](#how-to-create-further-localisations)

- Duplicate one existing file in folder [`locale/`](https://github.com/CodelineRed/slim-skeleton/tree/master/locale) (e.g. copy `de-DE.php` to `fr-FR.php`)
- (if you use Mode 1 or 2) Duplicate one existing file in folder [`config/routes/`](https://github.com/CodelineRed/slim-skeleton/tree/master/config/routes) (e.g. copy `de-DE.php` to `fr-FR.php`)
- (if you use Mode 1 or 2) Change route prefix from `/de/` to `/fr/` in `config/routes/fr-FR.php`
- You can also define paths like `/fr-be/` (`locale/fr-BE.php`/ `config/routes/fr-BE.php`) for example
- If you want to show language in langswitch, add `fr-FR` and domain in `locale => active` ([`config/additional-settings.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/additional-settings.dist.php#L56))
- (if you use Mode 1 or 2) Add case for `fr/` in [`src/localisation.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/src/localisation.php#L47)

How to switch between different url modes
-----------------------------------------

[](#how-to-switch-between-different-url-modes)

### Mode 1

[](#mode-1)

Example: example.com/de/

- EN is default language and DE is alternative language for this steps
- Got to `locale` in [`config/additional-settings.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/additional-settings.dist.php#L52)
- Set `'process' => \App\Utility\LanguageUtility::LOCALE_URL | \App\Utility\LanguageUtility::DOMAIN_DISABLED,`
- Set up english routes with or without `/en` prefix in [`config/routes/en-US.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/en-US.php)
- Set up german routes with `/de` prefix in [`config/routes/de-DE.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/de-DE.php)
- [`config/routes/xx-XX.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/xx-XX.php) can be leave untouched

### Mode 2

[](#mode-2)

Example: de.example.com or example.de

- EN is default language and DE is alternative language for this steps
- Got to `locale` in [`config/additional-settings.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/additional-settings.dist.php#L52)
- Set `'process' => \App\Utility\LanguageUtility::LOCALE_URL | \App\Utility\LanguageUtility::DOMAIN_ENABLED,`
- Enter your domains in `active`
- Go to [`config/routes/de-DE.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/de-DE.php)
- Remove `/de` prefix from every `route`
- Go to [`config/routes/xx-XX.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/xx-XX.php)
- Insert all routes where the config is equal between [`config/routes/en-US.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/en-US.php) and [`config/routes/de-DE.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/de-DE.php)
- Remove these equal routes in [`config/routes/en-US.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/en-US.php) and [`config/routes/de-DE.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/de-DE.php)

### Mode 3 (default)

[](#mode-3-default)

Example: example.com

- EN is default language and DE is alternative language for this steps
- Got to `locale` in [`config/additional-settings.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/additional-settings.dist.php#L52)
- Set `'process' => \App\Utility\LanguageUtility::LOCALE_SESSION | \App\Utility\LanguageUtility::DOMAIN_DISABLED,`
- Set up all routes in [`config/routes/xx-XX.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/xx-XX.php)
- [`config/routes/en-US.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/en-US.php) can be leave untouched
- [`config/routes/de-DE.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/de-DE.php) can be leave untouched

ACL settings
------------

[](#acl-settings)

With [Geggleto ACL](https://github.com/geggleto/geggleto-acl), routes are protected by role the current user has. By default every new route is not accessable until you give the route roles. Routes are defined in the route files (e.g. [`config/routes/de-DE.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/routes/de-DE.php)). Any other resource is defined in [`config/settings.php`](https://github.com/CodelineRed/slim-skeleton/blob/master/config/settings.php#L90). Inside the Twig templates you can use ACL functions [`has_role`](https://github.com/CodelineRed/slim-skeleton/blob/master/templates/partials/navigation.html.twig#L23) and is\_allowed. Inside controllers you can also use this ACL functions and [many more](https://github.com/geggleto/geggleto-acl/blob/master/src/AclRepository.php) (e.g. [`isAllowed()`](https://github.com/CodelineRed/slim-skeleton/blob/master/src/Controller/UserController.php#L101)).

Troubleshooting
---------------

[](#troubleshooting)

### Error 1

[](#error-1)

In some cases you'll get the error message "Internal Server Error".

If this happened, go to [`public/.htaccess`](https://github.com/CodelineRed/slim-skeleton/blob/master/public/.htaccess) and enable `RewriteBase /`.

If project is in sub directory then `RewriteBase /project/public/`.

### Error 2

[](#error-2)

Message: is not resolvable File: /var/www/vendor/slim/slim/Slim/CallableResolver.php

If this happened, your Doctrine host in `config\additional-settings.php` is wrong.

Links
-----

[](#links)

- [Slim Framework](https://www.slimframework.com/)
- [Twig](https://twig.symfony.com/)
- [Doctrine](https://www.doctrine-project.org/)
- [Slim 3 and Doctrine 2 Website](http://blog.sub85.com/slim-3-with-doctrine-2.html)
- [Slim 3 and Doctrine 2 Github](https://github.com/matthewfedak/slim-3-doctrine-2)
- [Adminer DB-GUI](https://www.adminer.org/)
- [Locale codes](https://www.science.co.il/language/Locale-codes.php)

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 64.1% 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 ~72 days

Recently: every ~256 days

Total

54

Last Release

1292d ago

Major Versions

1.1.0 → 2.0.02013-08-22

2.x-dev → 3.0.02015-12-07

3.x-dev → 4.0.02018-05-21

4.3.2 → 5.0.02018-09-17

PHP version history (4 changes)1.0.0PHP &gt;=5.3.0

3.0.0PHP &gt;=5.5.0

5.4.0PHP &gt;=5.5.9

5.5.0PHP 8.0.\*

### Community

Maintainers

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

---

Top Contributors

[![CodelineRed](https://avatars.githubusercontent.com/u/35538671?v=4)](https://github.com/CodelineRed "CodelineRed (116 commits)")[![akrabat](https://avatars.githubusercontent.com/u/33135?v=4)](https://github.com/akrabat "akrabat (22 commits)")[![maccath](https://avatars.githubusercontent.com/u/904427?v=4)](https://github.com/maccath "maccath (10 commits)")[![jeremykendall](https://avatars.githubusercontent.com/u/288613?v=4)](https://github.com/jeremykendall "jeremykendall (10 commits)")[![silentworks](https://avatars.githubusercontent.com/u/79497?v=4)](https://github.com/silentworks "silentworks (5 commits)")[![geggleto](https://avatars.githubusercontent.com/u/4027602?v=4)](https://github.com/geggleto "geggleto (2 commits)")[![a-r-m-i-n](https://avatars.githubusercontent.com/u/1275298?v=4)](https://github.com/a-r-m-i-n "a-r-m-i-n (2 commits)")[![casmith](https://avatars.githubusercontent.com/u/95950?v=4)](https://github.com/casmith "casmith (2 commits)")[![shahariaazam](https://avatars.githubusercontent.com/u/1095008?v=4)](https://github.com/shahariaazam "shahariaazam (1 commits)")[![tomtomsen](https://avatars.githubusercontent.com/u/359547?v=4)](https://github.com/tomtomsen "tomtomsen (1 commits)")[![tsia](https://avatars.githubusercontent.com/u/1386595?v=4)](https://github.com/tsia "tsia (1 commits)")[![agarzon](https://avatars.githubusercontent.com/u/339828?v=4)](https://github.com/agarzon "agarzon (1 commits)")[![wackazong](https://avatars.githubusercontent.com/u/67227?v=4)](https://github.com/wackazong "wackazong (1 commits)")[![Big-Shark](https://avatars.githubusercontent.com/u/646054?v=4)](https://github.com/Big-Shark "Big-Shark (1 commits)")[![CoolGoose](https://avatars.githubusercontent.com/u/51180?v=4)](https://github.com/CoolGoose "CoolGoose (1 commits)")[![DavidePastore](https://avatars.githubusercontent.com/u/1949364?v=4)](https://github.com/DavidePastore "DavidePastore (1 commits)")[![dopesong](https://avatars.githubusercontent.com/u/7201955?v=4)](https://github.com/dopesong "dopesong (1 commits)")[![holtkamp](https://avatars.githubusercontent.com/u/776405?v=4)](https://github.com/holtkamp "holtkamp (1 commits)")[![mTorres](https://avatars.githubusercontent.com/u/473169?v=4)](https://github.com/mTorres "mTorres (1 commits)")[![rawkode](https://avatars.githubusercontent.com/u/145816?v=4)](https://github.com/rawkode "rawkode (1 commits)")

---

Tags

aclcsrfdoctrinedoctrine2localizationmonologslimslim-3slim-frameworkslim3slim3-skeletonslimframeworkslimphptwigresttwigrouterpsr7doctrine2farecaptchadockeraclloginmicroframeworkcsrflocalisation

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[open-dxp/opendxp

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

9421.6k61](/packages/open-dxp-opendxp)[concrete5/core

Concrete core subtree split

20166.1k52](/packages/concrete5-core)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)[bacula-web/bacula-web

The open source web based reporting and monitoring tool for Bacula

1557.7k](/packages/bacula-web-bacula-web)

PHPackages © 2026

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