{"id":30071379,"url":"https://github.com/sty00a4-code/home-orbit","last_synced_at":"2025-08-08T12:42:26.538Z","repository":{"id":308030615,"uuid":"1031291423","full_name":"sty00a4-code/home-orbit","owner":"sty00a4-code","description":"A home server written in luau","archived":false,"fork":false,"pushed_at":"2025-08-03T17:41:53.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T19:08:00.176Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/sty00a4-code.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,"zenodo":null}},"created_at":"2025-08-03T12:38:24.000Z","updated_at":"2025-08-03T17:41:57.000Z","dependencies_parsed_at":"2025-08-03T19:20:14.061Z","dependency_job_id":null,"html_url":"https://github.com/sty00a4-code/home-orbit","commit_stats":null,"previous_names":["sty00a4-code/home-orbit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sty00a4-code/home-orbit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sty00a4-code%2Fhome-orbit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sty00a4-code%2Fhome-orbit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sty00a4-code%2Fhome-orbit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sty00a4-code%2Fhome-orbit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sty00a4-code","download_url":"https://codeload.github.com/sty00a4-code/home-orbit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sty00a4-code%2Fhome-orbit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269423853,"owners_count":24414615,"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","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"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":[],"created_at":"2025-08-08T12:42:25.908Z","updated_at":"2025-08-08T12:42:26.502Z","avatar_url":"https://github.com/sty00a4-code.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Home Orbit\n\nA simple webserver framework for making small home webservers intended only for personal use\n\n## Running\n\nAll you need is Rust and Cargo to run: `cargo run`\n\n## Structure\n\nUnder the hood this framework is using the `axum` crate to manage basic webserver protocol.\nThe project structure is the following:\n```\nroute/\n    ... # all the url paths you need\nscripts/\n    html.lua # lua html interfacing \n    http.lua # lua http interfacing\n    ... # your personal libraries\nsrc/\n    main.rs # with the home-orbit crate\nstart.lua # setup webserver with i.e. state\nCargo.toml # the usual rust executable with home-orbit as a dependency\n```\n\n### Routing\n\nThe file structure in this folder represents the webservers internal routing.\nThese Lua files will be read and run on any request, there is no caching.\nThe code is very straight forward when using the previously mentioned integrated libraries:\n```lua\n---@param attrs table\u003cstring, string\u003e\n---@return string\nreturn function(attrs, ...)\n    -- potentially more code\n    return htmlDocument {\n        head {\n            -- styling and so on\n        };\n        body {\n            -- actual html content\n        };\n    }\nend\n```\n\n### State\n\nTo share state it uses axums state implementation and the internal `AppState` structure, where the Lua state is saved.\n```rust\npub struct AppState {\n    lua: Arc\u003cLua\u003e\n}\n```\nThat means you can use globals to share state between the handles.\n\n## Service\n\nBefore the program starts, the following things are done:\n1. Create a new Lua runtime\n2. Execute `start.lua`\n3. Load all lua files under `scripts/`\n4. Axum service is started\n\nThis is how requests are processed:\n1. Request arrived and the rust `handle` function is called\n2. Route file is loaded and returning function captured\n3. `handle.lua` is run if it exists\n4. Route handle function is called\n5. HTTP response is constructed from the returning table","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsty00a4-code%2Fhome-orbit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsty00a4-code%2Fhome-orbit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsty00a4-code%2Fhome-orbit/lists"}