{"id":19312277,"url":"https://github.com/adaiasmagdiel/hermes","last_synced_at":"2025-08-22T19:08:36.805Z","repository":{"id":221959846,"uuid":"755762057","full_name":"AdaiasMagdiel/hermes","owner":"AdaiasMagdiel","description":"Hermes is a experimental lightweight PHP library for routing management. It provides a simple and intuitive way to define routes and execute actions based on HTTP requests.","archived":false,"fork":false,"pushed_at":"2024-02-24T18:48:41.000Z","size":1646,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T22:25:15.366Z","etag":null,"topics":["experimental","http","lightweight","mythology","oop","oriented-object-programming","php","router","routing","web","web-development"],"latest_commit_sha":null,"homepage":"https://adaiasmagdiel.github.io/hermes/","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/AdaiasMagdiel.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":"2024-02-11T00:53:04.000Z","updated_at":"2025-01-10T15:37:36.000Z","dependencies_parsed_at":"2024-02-24T19:45:49.163Z","dependency_job_id":null,"html_url":"https://github.com/AdaiasMagdiel/hermes","commit_stats":null,"previous_names":["adaiasmagdiel/hermes"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/AdaiasMagdiel/hermes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaiasMagdiel%2Fhermes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaiasMagdiel%2Fhermes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaiasMagdiel%2Fhermes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaiasMagdiel%2Fhermes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdaiasMagdiel","download_url":"https://codeload.github.com/AdaiasMagdiel/hermes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaiasMagdiel%2Fhermes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263250604,"owners_count":23437288,"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":["experimental","http","lightweight","mythology","oop","oriented-object-programming","php","router","routing","web","web-development"],"created_at":"2024-11-10T00:34:08.142Z","updated_at":"2025-07-03T03:05:21.049Z","avatar_url":"https://github.com/AdaiasMagdiel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hermes\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"hermes.png\" height=\"280\"\u003e\n  \u003cbr\u003e\n  \u003csub\u003e\u003csup\u003eThe image was generated using AI.\u003c/sup\u003e\u003c/sub\u003e\n\u003c/p\u003e\n\n[![Latest Stable Version](http://poser.pugx.org/adaiasmagdiel/hermes/v)](https://packagist.org/packages/adaiasmagdiel/hermes)\n[![Total Downloads](http://poser.pugx.org/adaiasmagdiel/hermes/downloads)](https://packagist.org/packages/adaiasmagdiel/hermes)\n[![License](http://poser.pugx.org/adaiasmagdiel/hermes/license)](https://packagist.org/packages/adaiasmagdiel/hermes)\n[![PHP Version Require](http://poser.pugx.org/adaiasmagdiel/hermes/require/php)](https://packagist.org/packages/adaiasmagdiel/hermes)\n\n\nHermes is an experimental lightweight PHP library for routing management. It provides a simple and intuitive way to define routes and execute actions based on HTTP requests.\n\n## Navigation\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Documentation](#documentation)\n- [Tests](#tests)\n- [License](#license)\n- [Contributing](#contributing)\n- [Credits](#credits)\n\n## Features\n\n- Define routes easily using HTTP methods (GET, POST, PUT, DELETE, HEAD, OPTIONS and PATCH).\n- Execute actions based on requested routes.\n- Lightweight, experimental, and easy to integrate into existing projects.\n\n## Installation\n\nYou can install Hermes via composer.\n\n```bash\ncomposer require adaiasmagdiel/hermes\n```\n\n## Usage\n\nHere's a basic example of how to use Hermes:\n\n```php\n\u003c?php\n\nrequire_once \"vendor/autoload.php\";\n\nuse AdaiasMagdiel\\Hermes\\Router;\n\nRouter::initialize();\n\nRouter::get('/', function() {\n    echo \"Hello, World!\";\n});\n\nRouter::get('/about', function() {\n    echo \"About page\";\n});\n\nRouter::post('/submit', function() {\n    // Handle form submission\n});\n\n// Optional changing the 404 page\nRouter::set404(function() {\n    http_response_code(404);\n    echo \"This is a new 404 page.\";\n});\n\n// Optional changing the 500 page\nRouter::set500(function() {\n    http_response_code(500);\n    echo \"This is a new 500 page.\";\n});\n\nRouter::execute();\n```\n\nIn this example, we define routes for different HTTP methods (`GET` and `POST`) and execute actions based on the requested routes.\n\nFirst you need to initialize the `Router` class with the static `initialize` method. Then you can use the methods to add routes, also you can add a 404 and 500 page with the `set400` e `set500` methods.\n\n## Documentation\n\nTo access the full documentation and see more examples of usage, please visit the [documentation page](https://adaiasmagdiel.github.io/hermes/).\n\n## Tests\n\nTo run the tests for Hermes, you can use the following command:\n\n```bash\ncomposer run tests\n```\n\n## License\n\nHermes is open-source software licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n## Contributing\n\nI welcome contributions to the Hermes project! To contribute, follow these steps:\n\n1. Clone the repository to your local machine:\n   ```bash\n   git clone https://github.com/AdaiasMagdiel/hermes.git\n   ```\n\n2. Install the development dependencies using Composer:\n   ```bash\n   composer install\n   ```\n\n3. Make your changes or additions to the codebase.\n\n4. Write and test your changes to ensure they work as expected:\n   ```bash\n   composer run tests\n   ```\n\n5. Commit your changes and push them to your fork of the repository.\n\n6. Submit a pull request with a clear description of your changes.\n\nI appreciate your contributions and feedback! If you encounter any issues or have suggestions for improvements, please don't hesitate to open an issue on GitHub.\n\n## Credits\n\nHermes is developed and maintained by [Adaías Magdiel](https://github.com/AdaiasMagdiel).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadaiasmagdiel%2Fhermes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadaiasmagdiel%2Fhermes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadaiasmagdiel%2Fhermes/lists"}