{"id":20469591,"url":"https://github.com/lithephp/framework","last_synced_at":"2025-04-13T10:34:12.582Z","repository":{"id":259250573,"uuid":"866843495","full_name":"lithephp/framework","owner":"lithephp","description":"The Lithe Framework.","archived":false,"fork":false,"pushed_at":"2024-10-23T16:06:07.000Z","size":85,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-10-23T21:50:50.270Z","etag":null,"topics":["framework","lithe","php"],"latest_commit_sha":null,"homepage":"https://lithephp.vercel.app/","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/lithephp.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":"2024-10-03T01:09:09.000Z","updated_at":"2024-10-23T16:06:12.000Z","dependencies_parsed_at":"2024-10-30T22:36:03.962Z","dependency_job_id":null,"html_url":"https://github.com/lithephp/framework","commit_stats":null,"previous_names":["lithephp/framework"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithephp%2Fframework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithephp%2Fframework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithephp%2Fframework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lithephp%2Fframework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lithephp","download_url":"https://codeload.github.com/lithephp/framework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248698872,"owners_count":21147544,"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","lithe","php"],"created_at":"2024-11-15T14:09:36.778Z","updated_at":"2025-04-13T10:34:12.550Z","avatar_url":"https://github.com/lithephp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lithe\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/lithephp/.github/blob/main/lithecore.png\" alt=\"Lithe Logo\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://packagist.org/packages/lithephp/framework\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/lithephp/framework\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/lithephp/framework\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/lithephp/framework\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/lithephp/framework\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/lithephp/framework\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## What is Lithe?\n\nLithe is a PHP framework known for its simplicity, flexibility, and efficiency. Inspired by Express.js, Lithe is designed to help developers build web applications quickly and effectively. The name \"Lithe\" reflects the core characteristics of the framework: flexible and agile.\n\n## Simple and Flexible Routing\n\nIn Lithe, defining routes is very simple. You can use methods like `get()`, `post()`, and others to create routes that respond to different types of HTTP requests:\n\n```php\nget('/hello/:name', function ($req, $res) {\n    $res-\u003esend('Hello, ' . $req-\u003eparam('name'));\n});\n```\n\nDiscover how [routing in Lithe](https://lithephp.vercel.app/docs/the-basics/routing) can simplify your development and offer complete control over your application's routes.\n\n## Powerful Middleware\n\nIn Lithe, middleware is your line of defense, allowing you to inspect, filter, and manipulate HTTP requests before they reach the final routes. Imagine adding functionalities like authentication and logging in a modular and reusable way!\n\nHere’s how easy it is to define and use middleware:\n\n```php\n// Middleware to check if the token is valid\n$EnsureTokenIsValid = function ($req, $res, $next) {\n    $token = $req-\u003eparam('token');\n\n    if ($token !== 'my-secret-token') {\n        $res-\u003esend('Invalid token.');\n    }\n\n    $next();\n};\n\n// Protected route using the middleware\nget('/protected/:token', $EnsureTokenIsValid, function ($req, $res) {\n    $res-\u003esend('Protected content accessed successfully!');\n});\n```\n\nLearn more about [middlewares in Lithe](https://lithephp.vercel.app/docs/the-basics/middleware) and see how they can transform the way you develop and maintain your applications.\n\n## Database Integration\n\nConnecting to databases is straightforward with Lithe. The framework supports popular ORMs like Eloquent and native PHP drivers such as MySQLi and PDO. Configure your connections in the `.env` file and manage schema migrations easily.\n\n```\nDB_CONNECTION_METHOD=eloquent\nDB_CONNECTION=mysql\nDB_HOST=localhost\nDB_NAME=lithe\nDB_USERNAME=root\nDB_PASSWORD=\nDB_SHOULD_INITIATE=true\n```\n\nLearn more about [database integration in Lithe](https://lithephp.vercel.app/docs/database/integration) and see how easy it is to manage your data.\n\n## Database Migrations\n\nMaintain consistency and integrity of data in your applications with automated migrations. With Lithe, you can create and apply migrations quickly and easily using any ORM interface or database driver.\n\n```bash\nphp line make:migration CreateUsersTable --template=eloquent\nphp line migrate\n```\n\nLearn more about [migrations in Lithe](https://lithephp.vercel.app/docs/database/migrations) and make the most of this feature to build robust and scalable applications.\n\n## Contributing\n\nContributions are welcome! If you find an issue or have a suggestion, feel free to open an [issue](https://github.com/lithephp/framework/issues) or submit a [pull request](https://github.com/lithephp/framework/pulls).\n\n## License\n\nLithe is licensed under the [MIT License](https://opensource.org/licenses/MIT). See the [LICENSE](LICENSE) file for more details.\n\n## Contact\n\nIf you have any questions or need support, get in touch:\n\n- **Instagram**: [@lithephp](https://instagram.com/lithephp)\n- **Discord**: [Lithe](https://discord.gg/nfskM6x9x7)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flithephp%2Fframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flithephp%2Fframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flithephp%2Fframework/lists"}