{"id":36998561,"url":"https://github.com/darkalchemy/slim-auth","last_synced_at":"2026-01-14T00:00:23.004Z","repository":{"id":42799789,"uuid":"239875511","full_name":"darkalchemy/Slim-Auth","owner":"darkalchemy","description":"A Slim 4 Skeleton.","archived":true,"fork":false,"pushed_at":"2023-03-14T21:19:41.000Z","size":2625,"stargazers_count":30,"open_issues_count":8,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-17T12:38:02.975Z","etag":null,"topics":["csrf","i18n","illuminate-database","jobby","phinx-migrations","php","php-di","phpmailer","psr-7","sentinel","slim","slim-flash","slim-skeletons","slim4","twig","valitron","webpack"],"latest_commit_sha":null,"homepage":"","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/darkalchemy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-11T22:13:31.000Z","updated_at":"2024-07-06T00:19:27.000Z","dependencies_parsed_at":"2023-02-18T14:01:09.336Z","dependency_job_id":null,"html_url":"https://github.com/darkalchemy/Slim-Auth","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/darkalchemy/Slim-Auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkalchemy%2FSlim-Auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkalchemy%2FSlim-Auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkalchemy%2FSlim-Auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkalchemy%2FSlim-Auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkalchemy","download_url":"https://codeload.github.com/darkalchemy/Slim-Auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkalchemy%2FSlim-Auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["csrf","i18n","illuminate-database","jobby","phinx-migrations","php","php-di","phpmailer","psr-7","sentinel","slim","slim-flash","slim-skeletons","slim4","twig","valitron","webpack"],"created_at":"2026-01-14T00:00:21.952Z","updated_at":"2026-01-14T00:00:22.970Z","avatar_url":"https://github.com/darkalchemy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slim-Auth\n\nA Slim 4 Skeleton.\n\n![GitHub commits since tagged version](https://img.shields.io/github/commits-since/darkalchemy/Slim-Auth/0.4.1)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/7e09082beab44f75afe2eefdbc55ec50)](https://www.codacy.com/gh/darkalchemy/Slim-Auth/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=darkalchemy/Slim-Auth\u0026utm_campaign=Badge_Grade)\n[![GitHub Issues](https://img.shields.io/github/issues/darkalchemy/Slim-Auth)](https://github.com/darkalchemy/Slim-Auth/issues)\n[![GitHub license](https://img.shields.io/github/license/darkalchemy/Slim-Auth.svg)](https://github.com/darkalchemy/Slim-Auth/blob/master/LICENSE)\n[![Total Downloads](https://img.shields.io/packagist/dt/darkalchemy/Slim-Auth.svg)](https://packagist.org/packages/darlachemy/slim-auth)\n\nThis is a simple skeleton to quickly ramp up a slim 4 project.\n\nPHP 8 is required\\\nComposer is required\\\nnpm/npx is required\n\n[Slim 4](https://github.com/slimphp/Slim) as the core framework\\\n[nyholm/psr7](https://github.com/Nyholm/psr7) for the PSR-7 implementation\\\n[php-di/php-di](http://php-di.org/) to manage dependency injection\\\n[Cartalyst/Sentinel](https://cartalyst.com/manual/sentinel/3.) for user authentication and authorization\\\n[delight-im/PHP-I18N](https://github.com/delight-im/PHP-I18N) for handling the users locale\\\n[hellogerard/jobby](https://github.com/jobbyphp/jobby) to run all background jobs through cron\\\n[Eloquent/ORM](https://github.com/illuminate/database) for database storage\\\n[EmailValidator](https://github.com/egulias/EmailValidator/tree/master) for validating email addresses\\\n[Middlewares/Trailing-slash](https://github.com/middlewares/trailing-slash) to remove any trailing slashes in the url\\\n[Monolog](https://github.com/Seldaek/monolog) for logging\\\n[PHPMailer](https://github.com/PHPMailer/PHPMailer) for sending email\\\n[Phinx](https://phinx.org/) for database migrations\\\n[Odan/Session](https://github.com/odan/session) for managing the session\\\n[Slim/CSRF](https://github.com/slimphp/Slim-Csrf) to protect against csrf\\\n[Slim/Flash](https://github.com/slimphp/Slim-Flash) for flash messaging\\\n[Slim/Twig/Flash](https://github.com/kanellov/slim-twig-flash) (updated and included manually) for displaying flash messages in twig\\\n[Slim/Twig-View](https://github.com/slimphp/Twig-View) for templates\\\n[Slim/Whoops](https://github.com/zeuxisoo/php-slim-whoops) for displaying errors\\\n[Twig-Translate](https://github.com/darkalchemy/Twig-Translate) for translations\\\n[umpirsky/composer-permissions-handler](https://github.com/umpirsky/PermissionsHandler) to set folder permissions for log and cache folders\\\n[Vlucas/Valitron](https://github.com/vlucas/valitron) for validation\n\nTo install using composer\n\n```text\ncomposer create-project darkalchemy/slim-auth\n```\n\ncd into project, edit config/settings.php as needed and create the database.\n\n```text\ncd slim-auth\nnano config/settings.php\n```\n\nAfter install\n\n```text\ncomposer migrate   # import database\n```\n\nTo update for development\n\n```text\ncomposer install           # install non-dev dependencies\nnpm install                # install dependencies\nnpm run build-dev          # create initial js/css resources\ncomposer compile           # compile twig templates\ncomposer migrate           # import database\n```\n\nTo update for production\n\n```text\ncomposer install --no-dev  # install non-dev dependencies\nnpm install                # install dependencies\nnpm run build              # create initial js/css resources\ncomposer compile           # compile twig templates\ncomposer migrate           # import database\n```\n\nSet up cron job, this is necessary to be able to run scripts as www-data when needed\n\n```text\nsudo crontab -e\n\n## add this to root crontab\n* * * * * cd /path/to/bin folder/ \u0026\u0026 /usr/bin/php jobby.php 1\u003e\u003e /dev/null 2\u003e\u00261\n```\n\nEmails do not get sent directly, they are inserted into the database and jobby will take care of sending them.\n\nCompile twig templates for translating\n\n```text\ncomposer compile\n```\n\nTranslate all php files to locale - en_US\n\n```text\ncomposer translate en_US\n```\n\nAdd additional locales\n\n```text\n## check if locale is installed\nlocale -a\n\n## find correct local\nnano /usr/share/i18n/SUPPORTED\n\n## in order to test the locale switcher, I needed to have another locale translated. I translated\n## this using Google Translate, so the translation quality may not be very good. Please consider a\n## pull request to improve the quality of the translation.\n## add locale if not already installed (fr_FR)\nsudo locale-gen fr_FR\nsudo locale-gen fr_FR.UTF-8\nsudo update-locale\n\n## restart webserver (apache2|nginx)\nsudo service nginx restart\n\n## edit bootstrap/container.php and add the correct locale to the 'I18n::class' section\nnano bootstrap/container.php\n```\n\nTranslate all php files to locale - fr_FR\n\n```text\ncomposer translate fr_FR\n```\n\nThen open locale/\\*\\*/LC_MESSAGES/messages.po in poedit and edit translation.\n\nThen to create the binary forms of the translations, you need to run again for each locale\n\n```text\ncomposer translate en_EN\ncomposer translate fr_FR\n```\n\n## Notes\n\nIf you want to use redis as your session handler, you should add this to php.ini and uncomment as needed, TCP or Socket\n\n```text\n; TCP\n; session.save_handler = redis\n; session.save_path    = \"tcp://127.0.0.1:6379?prefix=SlimAuth:\u0026database=1\"\n\n; UNIX Socket\n; session.save_handler = redis\n; session.save_path = \"unix:///dev/shm/redis.sock?prefix=SlimAuth:\u0026database=1\"\n```\n\nand add this to your redis.ini file\n\n```text\nredis.session.locking_enabled=1\n```\n\nAdd these to your apcu.ini\n\n```text\napc.enable_cli=1\napc.slam_defense=1\n```\n\n## Available command line commands\n\n```text\ncomposer cleanup          # runs php_cs_fixer\ncomposer clear_cache      # clears all file based caches\ncomposer compile          # compile all twig templates\ncomposer create-migration # create new migration class\ncomposer migrate          # migrate the database\ncomposer rollback         # rollback all database changes\ncomposer set-perms        # set writable perms for cache/log folders for both webserver and cli\ncomposer translate [lang] # translate all strings for listed language\ncomposer translate-all    # translate all strings for all currently available languages\nnpm build                 # create minified js/css resources\nnpm build-dev             # create js/css resources\n```\n\n## TODO\n\nphpunit for testing.\n\n## Credits\n\nMuch of what I have done here I learned from watching videos on youtube, [Laracasts](https://laracasts.com/), [Codecourse](https://codecourse.com) and from what I have read in many of the online tutorials and Slim Skeletons on github.\\\n[Slim4-Skeleton](https://github.com/odan/slim4-skeleton), [Slim-Skeleton](https://github.com/slimphp/Slim-Skeleton) and [Slim4-Starter](https://github.com/akrabat/slim4-starter) to list just a few.\n\nI still have a long way to go, but I'm enjoying the trip. This should not be used for any production websites as there are still many things to correct.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkalchemy%2Fslim-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkalchemy%2Fslim-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkalchemy%2Fslim-auth/lists"}