{"id":13805532,"url":"https://github.com/semhoun/slim-skeleton-mvc","last_synced_at":"2026-01-11T13:57:24.426Z","repository":{"id":54361284,"uuid":"202994437","full_name":"semhoun/slim-skeleton-mvc","owner":"semhoun","description":"Slim 4 MVC Skeleton","archived":false,"fork":false,"pushed_at":"2024-12-05T09:26:38.000Z","size":147,"stargazers_count":81,"open_issues_count":0,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-12T05:09:53.861Z","etag":null,"topics":["doctrine","skeleton","slim-framework","slim4","twig"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semhoun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-18T11:27:26.000Z","updated_at":"2024-12-05T09:25:40.000Z","dependencies_parsed_at":"2024-01-03T02:32:32.714Z","dependency_job_id":"8c41dfba-85dc-435b-95ca-14155073b0d2","html_url":"https://github.com/semhoun/slim-skeleton-mvc","commit_stats":{"total_commits":53,"total_committers":4,"mean_commits":13.25,"dds":"0.15094339622641506","last_synced_commit":"763b64fa908366a2a79034bf29e178e1aeb4172c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semhoun%2Fslim-skeleton-mvc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semhoun%2Fslim-skeleton-mvc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semhoun%2Fslim-skeleton-mvc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semhoun%2Fslim-skeleton-mvc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semhoun","download_url":"https://codeload.github.com/semhoun/slim-skeleton-mvc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254012968,"owners_count":21999346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["doctrine","skeleton","slim-framework","slim4","twig"],"created_at":"2024-08-04T01:01:02.042Z","updated_at":"2026-01-11T13:57:24.421Z","avatar_url":"https://github.com/semhoun.png","language":"PHP","funding_links":[],"categories":["Boilerplate"],"sub_categories":[],"readme":"# Slim 4 MVC Skeleton\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/62644bc058af464eb2cfcf564c3500d6)](https://www.codacy.com/gh/semhoun/slim-skeleton-mvc/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=semhoun/slim-skeleton-mvc\u0026amp;utm_campaign=Badge_Grade) [![Latest Stable Version](https://poser.pugx.org/semhoun/slim-skeleton-mvc/v/stable)](https://packagist.org/packages/semhoun/slim-skeleton-mvc) [![Total Downloads](https://poser.pugx.org/semhoun/slim-skeleton-mvc/downloads)](https://packagist.org/packages/semhoun/slim-skeleton-mvc) [![License](https://poser.pugx.org/semhoun/slim-skeleton-mvc/license)](https://packagist.org/packages/semhoun/slim-skeleton-mvc)\n\nA modern web application skeleton based on **Slim 4**, using the **MVC** architecture.\nThis project is ideal for quickly starting the development of an API or a web application with a robust stack.\n\n## 🚀 Features\n\n* **Framework:** [Slim 4.15](http://www.slimframework.com/) (PSR-7, PSR-15, PSR-17)\n* **PHP Version:** 8.4+ required\n* **Dependency Injection Container:** [PHP-DI 7.0](http://php-di.org/) with autowiring\n* **ORM:** [Doctrine ORM 3.5](https://github.com/doctrine/orm) with [DBAL 4.4](https://github.com/doctrine/dbal)\n* **Database:** SQLite by default (supports MySQL, PostgreSQL via configuration)\n* **Template Engine:** [Twig 3.4](https://twig.symfony.com/)\n* **API Support:** RESTful API skeleton with JSON rendering\n* **Logging:** [Monolog 3.9](https://github.com/Seldaek/monolog) with multiple handlers\n* **Console:** [Symfony Console 6.4](https://github.com/symfony/console) with custom commands\n* **Code Quality:** [PHP Insights 2.13](https://phpinsights.com/) \u0026 [Rector 2.2](https://getrector.com/)\n* **Debugging:** [Tracy](https://tracy.nette.org/) integrated via [slim-tracy](https://github.com/semhoun/slim-tracy)\n* **Sessions:** [Odan Session 6.4](https://github.com/odan/session) with secure storage\n* **Migrations:** [Doctrine Migrations 3.9](https://github.com/doctrine/migrations)\n* **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'])`\n* **Proxy Support:** Built-in proxy detection middleware\n\n## 🛠️ Requirements\n\n* PHP 8.4 or higher\n* Composer 2.0 or higher\n* SQLite extension (or MySQL/PostgreSQL for production)\n* Required PHP extensions: json, pdo, pdo_sqlite\n\n## 🛠️ Installation\n\n### 1. Create the project\n\nUse Composer to install the project:\n\n```bash\ncomposer create-project semhoun/slim-skeleton-mvc [your-app]\n```\n\n### 2. Configuration\n\n1. Copy the `.env.example` file to `.env`:\n```bash\ncp .env.example .env\n```\n\n2. 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**.\n\n3. Initialize the database:\n```bash\n./console migrations:migrate\n```\n\n4. (Optional) Generate Doctrine proxies:\n```bash\n./console orm:generate-proxies\n```\n\n### 3. Run the application\n\nYou can use the PHP built-in development server:\n```bash\ncomposer start\n```\n\nOr use the console command:\n```bash\n./console serve\n```\n\nThe application will be accessible at [http://localhost:8080](http://localhost:8080).\n\n### 4. Available Console Commands\n\n```bash\n# Clear application cache\n./console cache:clear\n\n# Initialize cache\n./console cache:init\n\n# Generate Doctrine proxies\n./console orm:generate-proxies\n\n# Run development server\n./console serve\n\n# List all available commands\n./console list\n```\n## 🧪 Development Tools\n\nRun unit tests:\n```bash\ncomposer test\n```\n\nCheck code quality with PHP Insights:\n```bash\ncomposer insights-check\n```\n\nApply automatic Rector fixes:\n```bash\ncomposer rector-fix\n```\n\nFix code style issues:\n```bash\ncomposer insights-fix\n```\n\nRun pre-commit checks (code style + rector + dos2unix):\n```bash\ncomposer pre-commit\n```\n\n\nA `compose.yml` file is provided to facilitate deployment. Here is a configuration example:\n\n```yaml\nservices:\n  slim:\n    image: semhoun/webserver\n    ports:\n      - \"8080:80\"\n    volumes:\n      - .:/www\n    environment:\n      - APP_ENV=dev\n      - DEBUG_MODE=true\n```\n\nTo launch the environment with Docker:\n\n```bash\ndocker compose up -d\n```\n\n## 📝 Notes\n\n* Ensure that the `var` folder has write permissions (for cache, logs, database)\n* Default credentials: **admin** / **admin** (change in production!)\n* The project includes an error rendering system (HTML/JSON) based on the `Accept` header\n* API routes are prefixed with `/api` (configurable in `config/settings/_base_.php`)\n\n## 📚 Documentation\n\n* [Slim Framework Documentation](https://www.slimframework.com/docs/)\n* [Doctrine ORM Documentation](https://www.doctrine-project.org/projects/orm.html)\n* [Twig Documentation](https://twig.symfony.com/doc/3.x/)\n* [PHP-DI Documentation](https://php-di.org/doc/)\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n## 🔄 Changelog\n\nSee the [CHANGELOG.md](CHANGELOG.md) file for version history and upcoming changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemhoun%2Fslim-skeleton-mvc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemhoun%2Fslim-skeleton-mvc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemhoun%2Fslim-skeleton-mvc/lists"}