{"id":20942769,"url":"https://github.com/hidao80/hovelapi","last_synced_at":"2025-06-13T00:05:50.090Z","repository":{"id":129664651,"uuid":"537703852","full_name":"hidao80/HovelAPI","owner":"hidao80","description":"Ultra lightweight API framework for PHP","archived":false,"fork":false,"pushed_at":"2022-09-17T08:18:02.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T00:04:00.469Z","etag":null,"topics":["framework","hovelapi","php"],"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/hidao80.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-17T05:03:27.000Z","updated_at":"2023-02-05T09:06:38.000Z","dependencies_parsed_at":"2023-03-21T20:03:22.117Z","dependency_job_id":null,"html_url":"https://github.com/hidao80/HovelAPI","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hidao80/HovelAPI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidao80%2FHovelAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidao80%2FHovelAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidao80%2FHovelAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidao80%2FHovelAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hidao80","download_url":"https://codeload.github.com/hidao80/HovelAPI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hidao80%2FHovelAPI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259553131,"owners_count":22875609,"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":["framework","hovelapi","php"],"created_at":"2024-11-18T23:29:57.356Z","updated_at":"2025-06-13T00:05:50.067Z","avatar_url":"https://github.com/hidao80.png","language":"PHP","readme":"# HovelAPI\n\n![Framework None](https://img.shields.io/badge/Framework-None-blue.svg)\n[![License](https://img.shields.io/github/license/hidao80/HovelAPI)](/LICENSE)\n![phpstan workflow](https://github.com/hidao80/HovelAPI/actions/workflows/phpstan.yml/badge.svg)\n\n## Install\n\n```sh\ngit clone https://github.com/hidao80/HovelAPI\n```\n\n## How to use\n\n```sh:server\n# clone repository\ngit clone https://github.com/hidao80/HovelAPI\ncd HovelAPI\n\n# start built-in web server\nphp -S localhost:8080 -t public \u0026\n\n# call API\ncurl -X GET -H \"Authorization:Basic dGVzdDp0ZXN0\" http://localhost:8080/api/v1/users/7\n```\n\nSee [the AltoRouter site](http://altorouter.com/) for more information on how routing works.\n\nYou can make it multilingual by putting pairs of keywords and translations into the `$message` associative array in `app/lang/{LANGUAGE_NAME}.php`.  \nThe contents of the `HTTP_ACCEPT_LANGUAGE` header are referenced to automatically switch dictionary files.\n\nBASIC authentication accounts for access restrictions are registered in the `$hashes` associative array in `conifg/auth.php`.\nThe hashes are created as follows:\n\n```sh\nphp -r 'echo password_hash(\"passwor_string\", PASSWORD_BCRYPT), PHP_EOL;'\n```\n\nFor mac and LInux, when accessing the API from `curl`, etc., the API can be accessed by sending the http header with the result of the following command:\n\n```sh\necho -n \"user_name:password_string\" | base64\n# default value) echo -n \"test:test\" | base64\n```\n\n## How to edit\n\nDescribe the route in `routes/api.php`.\n\nDeclare functions to be executed when route is accessed in `app/api/v1/functions.php`.  \nYou may also directly describe the process in an anonymous function in route without declaring it in `app/api/v1/functions.php`.\n\nChange the BASIC authentication account from the default one.\n\nAccess with a basic authentication header from `curl`, javascript's `fetch()`, or jQuery's `$.ajax()`.\n\nRegister messages in the dictionary file for multilingualization if necessary.  \nYou can also use a function without a dictionary file by writing messages directly into the source code.\n\nYou are free to add more routes files, dictionary files, and api files.\n\n## Special Thanks\n\nAltoRouter: \u003chttp://altorouter.com/\u003e  \n@mpyw@qiita.com \u003chttps://github.com/mpyw-yattemita/php-auth-examples\u003e\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhidao80%2Fhovelapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhidao80%2Fhovelapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhidao80%2Fhovelapi/lists"}