{"id":27867620,"url":"https://github.com/eteran/lucent","last_synced_at":"2025-05-04T22:51:07.815Z","repository":{"id":33310359,"uuid":"36955101","full_name":"eteran/lucent","owner":"eteran","description":"A light and simple PHP 5.4 framework","archived":false,"fork":false,"pushed_at":"2016-04-18T21:36:38.000Z","size":48,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T13:38:56.270Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eteran.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":"2015-06-05T20:59:02.000Z","updated_at":"2024-05-01T13:38:56.270Z","dependencies_parsed_at":"2022-08-24T15:20:33.470Z","dependency_job_id":null,"html_url":"https://github.com/eteran/lucent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eteran%2Flucent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eteran%2Flucent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eteran%2Flucent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eteran%2Flucent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eteran","download_url":"https://codeload.github.com/eteran/lucent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252411810,"owners_count":21743604,"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":[],"created_at":"2025-05-04T22:51:02.740Z","updated_at":"2025-05-04T22:51:07.810Z","avatar_url":"https://github.com/eteran.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lucent\n\nA light and simple PHP5 framework. The goal of lucent is simple. To be a \nminimalistic yet useful light weight PHP framework.\n\nMost frameworks that I see offer **a lot** of features. While they are often\nvery useful, they also create complexity, even when founded on simple ideas.\n\nLucent strives to stay simple, by focusing on the basics. Lucent will provide:\n\n1. A simple, clean syntax for routes, supporting things like named parameters \n   and middleware.\n2. Separation between code and HTML through views.\n3. Helper classes to deal with common data conversions and error handling. \n   Including those which help implement RESTful APIs.\n\nHowever, it will **not provide** any of the following. Not because I don't like\nthese features. But because everyone has a preference, and I'd rather let the\ndeveloper decide which (if any) they would like to use.\n\n1. A database abstraction layer.\n2. A templating language. PHP **is** a templating language, we don't need \n   another one on top by default.\n3. \"Automagical\" routing or other features which are unexpected on by default.\n   I want the developer to have full control of the behavior of the app, with \n   no surprises.\n   \nLucent is somewhat inspired by many existing frameworks such as \n[Laravel](http://laravel.com/). Which is a wonderful framework, that I'd \nrecommend people try. But even that has had a few automatic features which\ncaused me some grief.\n\nUsage is **simple**. To create routes, open `app/config/routes.php` and write\neasy to understand code like the following:\n\n\n\tRoute::Get('/', function($req) {\n\t\treturn View::make('index');\n\t});\n\n\tRoute::Get('/hello/:name', function($req) {\n\t\treturn View::make('hello', ['name' =\u003e $req['name']]);\n\t});\n\nThe second paramter can be **any** callable type, for small sites, lambdas \nwork great! It can also be an array of callable types to support middleware. If \nany function returns data, then it stops the chain, making pre and post filters\ntrivial to implement.\n\nAs mentioned before, Lucent uses PHP as the templating system. So no new syntax \nto learn. Just place you views in `app/resources/views` and you're good to go.\nThe usage of views is very inspired by the effective syntax of \n[Laravel](http://laravel.com/). You can place views in a directory heirarchy, \nand access them with dot syntax. For example:\n\n    return View::make('foo.bar');\n\t\nwill use the file `app/resources/views/foo/bar.php` as the template. It is \nstill very much a work in progress, but already I'm finding it simple and easy\nto work with.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feteran%2Flucent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feteran%2Flucent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feteran%2Flucent/lists"}