{"id":18463645,"url":"https://github.com/alefesouza/php-framework","last_synced_at":"2026-07-02T05:32:33.437Z","repository":{"id":147944003,"uuid":"128711003","full_name":"alefesouza/php-framework","owner":"alefesouza","description":"🐘 A little PHP framework that I had created some years ago.","archived":false,"fork":false,"pushed_at":"2018-04-09T03:45:53.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-11T13:00:08.126Z","etag":null,"topics":["framework","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alefesouza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2018-04-09T03:45:40.000Z","updated_at":"2018-04-09T13:00:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"f470b621-3108-4a73-a44f-4cea857da024","html_url":"https://github.com/alefesouza/php-framework","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alefesouza/php-framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alefesouza%2Fphp-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alefesouza%2Fphp-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alefesouza%2Fphp-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alefesouza%2Fphp-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alefesouza","download_url":"https://codeload.github.com/alefesouza/php-framework/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alefesouza%2Fphp-framework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35034984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["framework","php"],"created_at":"2024-11-06T09:07:32.734Z","updated_at":"2026-07-02T05:32:33.425Z","avatar_url":"https://github.com/alefesouza.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-framework\n\n\u003e Almost every PHP developer has created a PHP Framework.\n\nThis is a little \"framework\" for APIs development that I had created in 2016, before I started to use PHP Frameworks, I've created it with a little inspiration in ASP.NET with some Java design patters (I was mixing everything I knew at this time hahaha), organizing folders with Models and Repositories, trying to use this idea on PHP.\n\nI didn't know about PSRs or Composer at this time, so I've used spl_autoload_register to load classes and send all requests to a single file with the .htaccess to create pretty URLs.\n\nI've used something like it on [gdg-sp back-end project](https://github.com/alefesouza/gdg-sp/tree/master/Back-end) without pretty URLs due to compatility of older version.\n\nMaybe there's a lot of bad practices on this code, but whatever, it's just a framework created when I was a 19 years old guy without anyone to say what's bad.\n\n## The Idea\n\nThe basics of this \"framework\" is:\n\n* Configure the Apache webserver to send all requests to a single file ([routes.php](./routes.php)), which will trait the given URL, getting the first subdirecty as a controller and the second as a action.\n* Database repositories and models, using PDO, every database action is a function on the repository.\n* Authentication uses a token via header, and the JSON data comes via body.\n* All actions execute a script, not a method of a controller class (I really don't know what I was thinking).\n\nAt the end, the script get the data, it usually execute a database task with a repository method, and show the results or if it was a success.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falefesouza%2Fphp-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falefesouza%2Fphp-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falefesouza%2Fphp-framework/lists"}