PHPackages                             sglim/sglim - 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. [Templating &amp; Views](/categories/templating)
4. /
5. sglim/sglim

ActiveLibrary[Templating &amp; Views](/categories/templating)

sglim/sglim
===========

A simple PHP MVC skeleton build on top of Slim

212PHP

Since Apr 11Pushed 10y ago1 watchersCompare

[ Source](https://github.com/SiroDiaz/Sglim)[ Packagist](https://packagist.org/packages/sglim/sglim)[ RSS](/packages/sglim-sglim/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Sglim
=====

[](#sglim)

A Slim 3 MVC skeleton. It uses PDO for the model layer and Twig for the view layer. Also it depends of hassankhan/config library for load config files and the symfony/console package for the Sglim command line tool. Sglim can be extended adding few neccesary packages because Sglim goal is keep simple the Slim configuration.

Why Sglim?
----------

[](#why-sglim)

There are many Slim framework skeletons but i don't see neither that like me. So i have decided to build my own "MVC" skeleton for small/medium APIs and dynamic websites when you need speed and low complexity in your apps.

Install
-------

[](#install)

All you need to install Sglim is Composer. Run the following command.

```
$ composer create-project "sglim/sglim":"dev-master" app-name
```

Run the application
-------------------

[](#run-the-application)

Go into the public folder inside the project folder and then

```
$ cd app-name/public
# run the server
$ php -S 0.0.0.0:8000
```

Folders structure
-----------------

[](#folders-structure)

Sglim uses different folders to organize your project based in other frameworks structure.

- **App**, where is hosted main application folders as *Models*, *Views*, *Routes*, *Api* and Middlewares.
- **config**, where you can find two configuration files: *config\_development* and *config\_production*. Both cantains database and Slim configuration and you can also set your Facebook, Twitter and other app secret keys.
- **public**. The folder where are all application frontend files.
- **storage**. Storage contains all rendered all Twig views(cache) and log files.

Command line
------------

[](#command-line)

Sglim allows you many shortcuts to make things fast. Right now there are 3 main commands:

**Generate a new route file** if the route doesn't exist.

```
$ php sglim make:route route-name
```

**Generate a new model**

```
$ php sglim make:model model-name
```

**Generate a new view** HTML5 file

```
$ php sglim make:view view-name
```

FAQ / Contact
-------------

[](#faq--contact)

**Question 1**: Can i use an ORM instead of PDO extension? *Yes, you can. I tried using Eloquent(Lavel ORM) and i had to do minor changes in the index.php file. Only i had to add a charset option in the configuration file but it works properly. It is pretty simple and if you love ORMs you can mix Sglim with the ORM that you want.*

**Question 2**: Why doesn't Sglim include all Slim package like [Slim-Csrf](https://github.com/slimphp/Slim-Csrf)? *Because the Sglim idea is to keep it simple. But maybe in future commits i will set them to Sglim package*

You can contact with me through Twitter([@Siro\_Diaz](https://twitter.com/siro_diaz)) or email me &lt;[siro\_diaz@yahoo.com](mailto:siro_diaz@yahoo.com)&gt;

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7469286?v=4)[Siro Díaz Palazón](/maintainers/SiroDiaz)[@SiroDiaz](https://github.com/SiroDiaz)

---

Top Contributors

[![SiroDiaz](https://avatars.githubusercontent.com/u/7469286?v=4)](https://github.com/SiroDiaz "SiroDiaz (28 commits)")

---

Tags

mvcpdoskeletonslimtwig

### Embed Badge

![Health badge](/badges/sglim-sglim/health.svg)

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

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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