PHPackages                             samuelgfeller/slim-example-project - 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. samuelgfeller/slim-example-project

ActiveProject[Framework](/categories/framework)

samuelgfeller/slim-example-project
==================================

Example project with the slim micro-framework

4.0.2(3mo ago)812138MITPHPPHP ^8.2CI failing

Since Apr 26Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/samuelgfeller/slim-example-project)[ Packagist](https://packagist.org/packages/samuelgfeller/slim-example-project)[ Fund](https://ko-fi.com/samuelgfeller)[ RSS](/packages/samuelgfeller-slim-example-project/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (20)Versions (15)Used By (0)

Slim Example Project
====================

[](#slim-example-project)

[![Documentation](https://camo.githubusercontent.com/4df63e049c31594f715e4a26ee2d8919455649ac60dd90d1820c580ce9918871/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f63756d656e746174696f6e2d3738374342353f6c6f676f3d64617461253341696d616765253246737667253242786d6c2533426261736536342532435043464554304e555756424649484e325a79425156554a4d53554d67496930764c31637a517938765246524549464e57527941784c6a45764c30564f496941696148523063446f764c336433647935334d793576636d637652334a686347687059334d7655315a484c7a45754d5339455645517663335a6e4d5445755a48526b496a344e436a77684c533067565842736232466b5a5751676447383649464e57527942535a5842764c4342336433637563335a6e636d56776279356a62323073494652795957357a5a6d39796257566b49474a354f694254566b6367556d56776279424e6158686c6369425562323973637941744c54344b50484e325a79423361575230614430694f444177634867694947686c6157646f644430694f4441776348676949485a705a58644362336739496a41674d4341794e4341794e4349675a6d6c7362443069626d39755a53496765473173626e4d39496d6830644841364c79393364336375647a4d7562334a6e4c7a49774d44417663335a6e496a344b4454786e49476c6b50534a54566b64535a58427658324a6e51324679636d6c6c63694967633352796232746c4c5864705a48526f50534977496938253242436730385a7942705a44306955315a48556d567762313930636d466a5a584a4459584a79615756794969427a64484a766132557462476c755a574e6863443069636d3931626d516949484e30636d39725a5331736157356c616d3970626a3069636d3931626d51694c7a344b4454786e49476c6b50534a54566b64535a58427658326c6a6232354459584a7961575679496a346750484268644767675a6d6c73624331796457786c50534a6c646d56756232526b4969426a62476c774c584a3162475539496d56325a5735765a47516949475139496b30354c6a6b304e544d78494445754d6a56494d5451754d4455314d554d784e5334304d6a4933494445754d6a51354f5467674d5459754e544931494445754d6a51354f5459674d5463754d7a6b784f5341784c6a4d324e6a5579517a45344c6a49354d6941784c6a51344e7a5530494445354c6a41304f546b674d5334334e4459304d7941784f5334324e544534494449754d7a51344d7a56444d6a41754d6a557a4f4341794c6a6b314d444933494449774c6a55784d6a59674d7934334d4467784e4341794d4334324d7a4d33494451754e6a41344d6a56444d6a41754e7a55774d6941314c6a51334e544979494449774c6a63314d4449674e6934314e7a63314e4341794d4334334e544179494463754f5451314d544e574d5459754d4455304f554d794d4334334e544179494445334c6a51794d6a55674d6a41754e7a55774d6941784f4334314d6a5134494449774c6a597a4d7a63674d546b754d7a6b784f454d794d4334314d544932494449774c6a49354d546b674d6a41754d6a557a4f4341794d5334774e446b33494445354c6a59314d5467674d6a45754e6a55784e304d784f5334774e446b35494449794c6a49314d7a59674d5467754d6a6b79494449794c6a55784d6a55674d5463754d7a6b784f5341794d6934324d7a4d31517a45324c6a55794e5341794d6934334e5341784e5334304d6a4932494449794c6a6331494445304c6a41314e5445674d6a49754e7a56494f5334354e44557a4d6b4d344c6a55334e7a637a494449794c6a6331494463754e4463314e4341794d6934334e5341324c6a59774f445130494449794c6a597a4d7a56444e5334334d44677a4d7941794d6934314d544931494451754f5455774e4455674d6a49754d6a557a4e6941304c6a4d304f445530494449784c6a59314d5464444d7934334e4459324d6941794d5334774e446b3349444d754e4467334e7a4d674d6a41754d6a6b784f53417a4c6a4d324e6a6378494445354c6a4d354d5468444d79347a4d6a67774d5341784f5334784d444d3549444d754d7a41794d5459674d5467754e7a6b774d69417a4c6a49344e446b674d5467754e4451354e454d7a4c6a49304e546779494445344c6a4d794e69417a4c6a497a4f444978494445344c6a45354d5449674d7934794e6a67354e5341784f4334774e545934517a4d754d6a55774d5459674d5463754e4459304f53417a4c6a49314d444533494445324c6a63354f5445674d7934794e5441784f5341784e6934774e545135566a63754f5451314d544e444d7934794e5441784e7941324c6a55334e7a553049444d754d6a55774d5455674e5334304e7a55794d69417a4c6a4d324e6a6378494451754e6a41344d6a56444d7934304f4463334d79417a4c6a63774f44453049444d754e7a51324e6a49674d6934354e5441794e7941304c6a4d304f445530494449754d7a51344d7a56444e4334354e5441304e5341784c6a63304e6a517a494455754e7a41344d7a4d674d5334304f4463314e4341324c6a59774f44517a494445754d7a59324e544a444e7934304e7a5530494445754d6a51354f5459674f4334314e7a63334d6941784c6a49304f546b3449446b754f5451314d7a45674d5334794e56704e4e4334334e7a59354e4341784f4334794e446b78517a51754e7a6b794d5451674d5467754e6a41794f5341304c6a67784e546b33494445344c6a6b784e4341304c6a67314d7a4d7a494445354c6a45354d546c444e4334354e5445354f5341784f5334354d6a5533494455754d544d794e444d674d6a41754d7a45304d6941314c6a51774f5449674d6a41754e546b78517a55754e6a67314f5459674d6a41754f4459334f4341324c6a41334e44557a494449784c6a41304f4449674e6934344d44677a4d5341794d5334784e445935517a63754e54597a4e6a59674d6a45754d6a51344e4341344c6a55324e446333494449784c6a4931494445774c6a41774d4449674d6a45754d6a56494d5451754d4441774d6b4d784e5334304d7a5532494449784c6a4931494445324c6a517a4e6a63674d6a45754d6a51344e4341784e7934784f544978494449784c6a45304e6a6c444d5463754f5449314f4341794d5334774e446779494445344c6a4d784e4451674d6a41754f4459334f4341784f4334314f544579494449774c6a55354d554d784f4334334f446331494449774c6a4d354e4463674d5467754f544d314d7941794d4334784e444978494445354c6a417a4f546b674d546b754e7a56494f4334774d4441784f554d334c6a55344e546b33494445354c6a6331494463754d6a55774d546b674d546b754e4445304d6941334c6a49314d44453549444535517a63754d6a55774d546b674d5467754e5467314f4341334c6a55344e546b33494445344c6a4931494467754d4441774d546b674d5467754d6a56494d546b754d6a497a4e454d784f5334794e444535494445334c6a67784f5341784f5334794e446333494445334c6a4d794e4459674d546b754d6a51354e4341784e6934334e5567334c6a67354e7a6b32517a59754f5445354e7a45674d5459754e7a55674e6934314e7a6333494445324c6a63314e6a51674e69347a4d5455324d6941784e6934344d6a5933517a55754e546b324d7941784e7934774d546b30494455754d4449794f4459674d5463754e5455304d5341304c6a63334e6a6b30494445344c6a49304f544661545445354c6a49314d4449674d5455754d6a56494e7934344f5463354e6b4d334c6a67314f446335494445314c6a4931494463754f4449774d6941784e5334794e5341334c6a63344d6a4533494445314c6a4931517a59754f5459304d6941784e5334794e446b33494459754e4441324d4455674d5455754d6a51354e5341314c6a6b794e7a4d35494445314c6a4d334e7a68444e5334304f546b304d5341784e5334304f544931494455754d5441794e4449674d5455754e6a63354f4341304c6a63314d444535494445314c6a6b794e546c574f454d304c6a63314d444535494459754e5459304e5467674e4334334e5445334f4341314c6a55324d7a5133494451754f44557a4d7a4d674e4334344d4467784d6b4d304c6a6b314d546b35494451754d4463304d7a55674e5334784d7a49304d79417a4c6a59344e546333494455754e4441354d69417a4c6a51774f544178517a55754e6a67314f5459674d7934784d7a49794e5341324c6a41334e44557a494449754f5455784f4341324c6a67774f444d78494449754f44557a4d5456444e7934314e6a4d324e6941794c6a63314d545535494467754e5459304e7a63674d6934334e5341784d4334774d444179494449754e7a56494d5451754d4441774d6b4d784e5334304d7a5532494449754e7a55674d5459754e444d324e7941794c6a63314d545535494445334c6a45354d6a45674d6934344e544d784e554d784e7934354d6a5534494449754f5455784f4341784f43347a4d54513049444d754d544d794d6a55674d5467754e546b784d69417a4c6a51774f544178517a45344c6a67324e7a6b674d7934324f4455334e7941784f5334774e446730494451754d4463304d7a55674d546b754d545133494451754f4441344d544a444d546b754d6a51344e6941314c6a55324d7a5133494445354c6a49314d4449674e6934314e6a51314f4341784f5334794e544179494468574d5455754d6a5661545463754d6a55774d546b674e304d334c6a49314d444535494459754e5467314e7a6b674e7934314f4455354e7941324c6a4931494467754d4441774d546b674e6934794e5567784e6934774d444179517a45324c6a51784e4451674e6934794e5341784e6934334e544179494459754e5467314e7a6b674d5459754e7a55774d694133517a45324c6a63314d4449674e7934304d5451794d5341784e6934304d545130494463754e7a55674d5459754d4441774d6941334c6a6331534467754d4441774d546c444e7934314f4455354e7941334c6a6331494463754d6a55774d546b674e7934304d5451794d5341334c6a49314d44453549446461545463754d6a55774d546b674d5441754e554d334c6a49314d444535494445774c6a41344e5467674e7934314f4455354e7941354c6a6331494467754d4441774d546b674f5334334e5567784d7934774d444179517a457a4c6a51784e4451674f5334334e5341784d7934334e544179494445774c6a41344e5467674d544d754e7a55774d6941784d433431517a457a4c6a63314d4449674d5441754f5445304d6941784d7934304d545130494445784c6a49314944457a4c6a41774d4449674d5445754d6a56494f4334774d4441784f554d334c6a55344e546b33494445784c6a4931494463754d6a55774d546b674d5441754f5445304d6941334c6a49314d444535494445774c6a56614969426d615778735053496a5a6d5a6d496938253242494477765a7a344b4454777663335a6e5067253344253344266c6162656c436f6c6f723d67726579)](https://samuel-gfeller.ch/docs)[![Installation](https://camo.githubusercontent.com/2bfee6a47b89294a0c197280d4f0ceac37b5450ea2397cf0cdbdb7ebe70e0649/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f496e7374616c6c6174696f6e2d626c75653f6c6f676f3d64617461253341696d616765253246737667253242786d6c2533426261736536342532435043464554304e555756424649484e325a79425156554a4d53554d67496930764c31637a517938765246524549464e57527941784c6a45764c30564f496941696148523063446f764c336433647935334d793576636d637652334a686347687059334d7655315a484c7a45754d5339455645517663335a6e4d5445755a48526b496a344e436a77684c533067565842736232466b5a5751676447383649464e57527942535a5842764c4342336433637563335a6e636d56776279356a62323073494652795957357a5a6d39796257566b49474a354f694254566b6367556d56776279424e6158686c6369425562323973637941744c54344b50484e325a79423361575230614430694f444177634867694947686c6157646f644430694f4441776348676949485a705a58644362336739496a41674d4341794e4341794e4349675a6d6c7362443069626d39755a53496765473173626e4d39496d6830644841364c79393364336375647a4d7562334a6e4c7a49774d44417663335a6e496a344b4454786e49476c6b50534a54566b64535a58427658324a6e51324679636d6c6c63694967633352796232746c4c5864705a48526f50534977496938253242436730385a7942705a44306955315a48556d567762313930636d466a5a584a4459584a79615756794969427a64484a766132557462476c755a574e6863443069636d3931626d516949484e30636d39725a5331736157356c616d3970626a3069636d3931626d51694c7a344b4454786e49476c6b50534a54566b64535a58427658326c6a6232354459584a7961575679496a346750484268644767675a443069545445794c6a55314d7a55674d5459754e5441324d554d784d6934304d544530494445324c6a59324d5455674d5449754d6a45774e6941784e6934334e5341784d6941784e6934334e554d784d5334334f446b30494445324c6a6331494445784c6a55344f4459674d5459754e6a59784e5341784d5334304e445931494445324c6a55774e6a464d4e7934304e4459304f4341784d6934784d7a4578517a63754d5459324f5467674d5445754f4449314e4341334c6a45344f444979494445784c6a4d314d5341334c6a51354d7a6b79494445784c6a41334d5456444e7934334f546b324d7941784d4334334f5449674f4334794e7a51774d6941784d4334344d544d79494467754e54557a4e5449674d5445754d5445344f5577784d5334794e5341784e4334774e6a6779566a4e444d5445754d6a55674d6934314f4455334f5341784d5334314f445534494449754d6a55674d5449674d6934794e554d784d6934304d545179494449754d6a55674d5449754e7a55674d6934314f4455334f5341784d6934334e53417a566a45304c6a41324f444a4d4d5455754e4451324e5341784d5334784d546735517a45314c6a63794e6941784d4334344d544d79494445324c6a49774d4451674d5441754e7a6b79494445324c6a55774e6a45674d5445754d4463784e554d784e6934344d544534494445784c6a4d314d5341784e6934344d7a4d674d5445754f4449314e4341784e6934314e544d31494445794c6a457a4d54464d4d5449754e54557a4e5341784e6934314d445978576949675a6d6c736244306949325a6d5a69497650694138634746306143426b50534a4e4d7934334e5341784e554d7a4c6a6331494445304c6a55344e5467674d7934304d5451794d6941784e4334794e53417a494445304c6a4931517a49754e5467314e7a6b674d5451754d6a55674d6934794e5341784e4334314f445534494449754d6a55674d5456574d5455754d4455304f554d794c6a49304f546b34494445324c6a51794d6a55674d6934794e446b354e6941784e7934314d6a5134494449754d7a59324e5449674d5467754d7a6b784f454d794c6a51344e7a5530494445354c6a49354d546b674d6934334e4459304d7941794d4334774e446b3349444d754d7a51344d7a55674d6a41754e6a55784e6b4d7a4c6a6b314d444933494449784c6a49314d7a59674e4334334d4467784e4341794d5334314d544931494455754e6a41344d6a55674d6a45754e6a4d7a4e554d324c6a51334e544979494449784c6a6331494463754e5463334e5451674d6a45754e7a55674f4334354e4455784d7941794d5334334e5567784e5334774e545135517a45324c6a51794d6a55674d6a45754e7a55674d5463754e5449304f4341794d5334334e5341784f43347a4f544534494449784c6a597a4d7a56444d546b754d6a6b784f5341794d5334314d544931494449774c6a41304f5463674d6a45754d6a557a4e6941794d4334324e544533494449774c6a59314d545a444d6a45754d6a557a4e6941794d4334774e446b33494449784c6a55784d6a55674d546b754d6a6b784f5341794d5334324d7a4d31494445344c6a4d354d5468444d6a45754e7a55674d5463754e5449304f4341794d5334334e5341784e6934304d6a4931494449784c6a6331494445314c6a41314e446c574d5456444d6a45754e7a55674d5451754e5467314f4341794d5334304d545179494445304c6a493149444978494445304c6a4931517a49774c6a55344e5467674d5451754d6a55674d6a41754d6a55674d5451754e5467314f4341794d4334794e5341784e554d794d4334794e5341784e6934304d7a5530494449774c6a49304f4451674d5463754e444d324e5341794d4334784e445935494445344c6a45354d546c444d6a41754d4451344d6941784f4334354d6a5533494445354c6a67324e7a67674d546b754d7a45304d6941784f5334314f5445674d546b754e546b78517a45354c6a4d784e4449674d546b754f4459334f4341784f4334354d6a5533494449774c6a41304f4449674d5467754d546b784f5341794d4334784e445935517a45334c6a517a4e6a55674d6a41754d6a51344e4341784e6934304d7a5530494449774c6a493149444531494449774c6a493153446c444e7934314e6a51314f5341794d4334794e5341324c6a55324d7a5133494449774c6a49304f4451674e5334344d4467784d6941794d4334784e445935517a55754d4463304d7a55674d6a41754d4451344d6941304c6a59344e546333494445354c6a67324e7a67674e4334304d446b774d5341784f5334314f5446444e4334784d7a49794e5341784f53347a4d54517949444d754f5455784f4341784f4334354d6a553349444d754f44557a4d5455674d5467754d546b784f554d7a4c6a63314d545535494445334c6a517a4e6a55674d7934334e5341784e6934304d7a553049444d754e7a55674d5456614969426d615778735053496a5a6d5a6d496938253242494477765a7a344b4454777663335a6e5067253344253344266c6f676f436f6c6f723d626c7565266c6162656c436f6c6f723d67726579)](https://samuel-gfeller.ch/docs/Slim-Example-Project-Installation-Guide)[![Code Coverage](https://camo.githubusercontent.com/f95fd533d067b56dc9b2690f0cd8667393ee939d10b24c38c08991381631ee1b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73616d75656c6766656c6c65722f736c696d2d6578616d706c652d70726f6a6563742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/samuelgfeller/slim-example-project/?branch=master)[![Build Status](https://camo.githubusercontent.com/13b32618b70e1599ff1d38f991f9bfa7eaac06a61b7cdf949d7b034f64d2ffa8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73616d75656c6766656c6c65722f736c696d2d6578616d706c652d70726f6a6563742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/samuelgfeller/slim-example-project/build-status/master)[![Quality Score](https://camo.githubusercontent.com/4f1af1260564c974ef7e3550413ba3034537029b1daa7101f5c6f537d0e2195c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f73616d75656c6766656c6c65722f736c696d2d6578616d706c652d70726f6a6563742e737667)](https://scrutinizer-ci.com/g/samuelgfeller/slim-example-project/?branch=master)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE)

Real-world example of a modern [Slim 4](https://www.slimframework.com/) web application with a scalable structure and a variety of components and features.

The project applies current best practices and programming principles, with a strong emphasis on the [SOLID](https://en.wikipedia.org/wiki/SOLID)Single Responsibility Principle ([SRP](https://samuel-gfeller.ch/docs/Single-Responsibility-Principle-(SRP))).
External library dependencies are [kept to a minimum](https://samuel-gfeller.ch/docs/Libraries-and-Framework)to facilitate maintenance and ensure long-term viability.

The [architecture](https://samuel-gfeller.ch/docs/Architecture)is inspired by the Domain Driven Design ([DDD](https://en.wikipedia.org/wiki/Domain-driven_design)) and the [Vertical Slice Architecture](https://www.youtube.com/watch?v=L2Wnq0ChAIA).

A detailed [documentation](https://samuel-gfeller.ch/docs) explains how the project is built, components, design choices and features.

Stripped down versions of this repository are available as skeleton templates. With frontend [**slim-starter**](https://github.com/samuelgfeller/slim-starter) or just for an API: [**slim-api-starter**](https://github.com/samuelgfeller/slim-api-starter).

Please read the [**installation guide**](https://samuel-gfeller.ch/docs/Slim-Example-Project-Installation-Guide)to get started.

Features
--------

[](#features)

All the features were developed with an effort to ensure maximum user-friendliness. The frontend, intuitive, aesthetically pleasing, minimalistic, and functional. The backend, efficient and secure.

**Technologies:**

- [Slim 4 micro-framework](https://github.com/slimphp/Slim)
- [Dependency Injection](https://samuel-gfeller.ch/docs/Dependency-Injection) - [PHP-DI](https://php-di.org/)
- [Logging](https://samuel-gfeller.ch/docs/Logging) - [Monolog](https://github.com/Seldaek/monolog)
- [Validation](https://samuel-gfeller.ch/docs/Validation) - [cakephp/validation](https://book.cakephp.org/4/en/core-libraries/validation.html)
- [Database migrations](https://samuel-gfeller.ch/docs/Database-Migrations) - [Phinx](https://phinx.org/)
- [Template rendering](https://samuel-gfeller.ch/docs/Template-Rendering) - [PHP-View](https://github.com/slimphp/PHP-View)
- [Mailing](https://samuel-gfeller.ch/docs/Mailing) - [Symfony Mailer](https://symfony.com/doc/current/mailer.html)
- [Localization](https://samuel-gfeller.ch/docs/Translations) - [gettext](https://www.gnu.org/software/gettext/)
- [Query Builder](https://samuel-gfeller.ch/docs/Repository-and-Query-Builder) - [cakephp/database](https://book.cakephp.org/5/en/orm/query-builder.html)
- [Integration / unit testing](https://samuel-gfeller.ch/docs/Writing-Tests) - [PHPUnit](https://github.com/sebastianbergmann/phpunit/) - [test-traits](https://github.com/samuelgfeller/test-traits)
- [Session and flash messages](https://samuel-gfeller.ch/docs/Session-and-Flash-messages) - [odan/session](https://github.com/odan/session)
- [Error handling](https://samuel-gfeller.ch/docs/Error-Handling) - [slim-error-renderer](https://github.com/samuelgfeller/slim-error-renderer)
- [GitHub Actions](https://samuel-gfeller.ch/docs/GitHub-Actions)and [Scrutinizer](https://samuel-gfeller.ch/docs/How-to-set-up-Scrutinizer)
- [Coding standards fixer](https://samuel-gfeller.ch/docs/Coding-Standards-Fixer) - [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
- [Static code analysis](https://samuel-gfeller.ch/docs/PHPStan-Static-Code-Analysis) - [PHPStan](https://github.com/phpstan/phpstan)

**Functionalities demonstrating real-world features:**

This project is currently designed for non-profit organizations or foundations that require a platform to manage and maintain a record of communication through notes of people they help.

- [Authentication](https://samuel-gfeller.ch/docs/Authentication) (login)
- [Authorization](https://samuel-gfeller.ch/docs/Authorization) (permissions)
- Account verification and [password reset](https://samuel-gfeller.ch/docs/Authentication#password-forgotten)via email link and token
- [Request throttling](https://samuel-gfeller.ch/docs/Security#request-throttling) - protection against brute force and password spraying attacks
- User management for administrators
- 4 user roles and different permissions
- User activity history
- Client creation and mutation with status and attributed user
- Client list filtering by text input and filter chips
- Note creation and mutation
- Hidden notes from unauthorized users
- Dashboard with panels
- [Dark / light theme](https://samuel-gfeller.ch/docs/Dark-Theme)

**Click to see demo**Link: [Login](https://demo.slim-example-project.samuel-gfeller.ch)
Username: `admin@user.com`
Password: `12345678`
The database is regularly reset.

Motivation to create this project
---------------------------------

[](#motivation-to-create-this-project)

There is a ton of great content on the internet about learning how to write clean and sustainable code. However, I found myself searching for more than just skeleton projects or general documentations and tutorials when I wanted to learn how to do things within the scope of a potential real-world application. I never found resources such as an open-source, efficient implementation of all the features surrounding a full-sized project.

This is what I try to provide here. This project isn't just a skeleton, it contains a lot of opinionated practical examples on how to implement features that are often necessary in real-world applications.

That includes authorization, integration testing, localization, validation, error handling, database migrations, mailing, console commands, request throttling, lightweight PHP template rendering, GitHub Actions, and more along with detailed explanations in the documentation.

But it's not just about the features. Equally important are the [architecture](https://samuel-gfeller.ch/docs/Architecture)and how the components interact with each other, following modern principles such as the [Single Responsibility Principle](https://samuel-gfeller.ch/docs/Single-Responsibility-Principle-(SRP))and [Dependency Injection](https://samuel-gfeller.ch/docs/Dependency-Injection).

Of course, there are big frameworks that have their own well-established set of programming conventions and implementations of features.

However, I find them often too complex, where the code makes too much "behind the scenes" and with lots of dependencies, which can lead to time-consuming refactoring on version changes.
I also dislike having to follow the propitiatory rules of a framework [which often don't follow best practices](https://www.reddit.com/r/PHP/comments/131t2k1/laravel_considered_harmful)and much prefer the freedom of a micro-framework and carefully [choosing the libraries](https://samuel-gfeller.ch/docs/Libraries-and-Framework)and structure that make sense for the project.
This lets me stay in control of the codebase, keep it lightweight, performant and tailored to the needs of the project, and it's easier to maintain and adapt to new requirements.

Disclaimer
----------

[](#disclaimer)

This project and its documentation are the result of my personal learning process in the last 6 years in trying to create the best possible template app with lots of real world examples. Three of the 6 years were spent full time on this project alone.
I made what wish I had when I started getting seriously into web development.

The codebase is big and thus lots of subjective decisions had to be made that may not be the best long-term solution for everybody.

The main focus throughout the development was to make the code as long living as possible with best practices and few dependencies so that it can be adapted to different needs and preferences.

Basically, this is my take on what an efficient, extensible, and maintainable web app could look like with today's tech.

I worked closely with the software engineer and architect [Daniel Opitz](https://odan.github.io/about.html), who also reviewed this project. I learned a lot during [our exchanges](https://samuel-gfeller.ch/docs/Sources-of-Knowledge#discussions)and was inspired by his books, articles, tutorials and his slim [skeleton-project](https://github.com/odan/slim4-skeleton).

Support
-------

[](#support)

Please read the [Support❤️](https://samuel-gfeller.ch/docs/Support%E2%9D%A4%EF%B8%8F) page if you value this project and its documentation and want to support it.

License
-------

[](#license)

This project is licensed under the MIT License — see the [LICENSE](https://github.com/samuelgfeller/slim-example-project/blob/master/LICENSE) file for details.

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance85

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 99.2% 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 ~103 days

Total

12

Last Release

109d ago

Major Versions

0.4.0 → 1.0.02024-05-16

1.0.2 → 4.0.02025-01-30

PHP version history (2 changes)0.4.0PHP ^8.1

1.0.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![samuelgfeller](https://avatars.githubusercontent.com/u/31797204?v=4)](https://github.com/samuelgfeller "samuelgfeller (1153 commits)")[![JannisKirschner](https://avatars.githubusercontent.com/u/22867985?v=4)](https://github.com/JannisKirschner "JannisKirschner (9 commits)")

---

Tags

example-projectphp-skeletonphp-starterskeletonslimslim-frameworkslim-skeletonslim-starterslim4

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/samuelgfeller-slim-example-project/health.svg)

```
[![Health](https://phpackages.com/badges/samuelgfeller-slim-example-project/health.svg)](https://phpackages.com/packages/samuelgfeller-slim-example-project)
```

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

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

9.0k15.4k](/packages/prestashop-prestashop)[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[odan/slim4-skeleton

A Slim 4 skeleton

4588.5k](/packages/odan-slim4-skeleton)

PHPackages © 2026

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