{"id":41556750,"url":"https://github.com/lukevdbroek-nl/hybrid-javascript-php","last_synced_at":"2026-01-24T05:14:00.844Z","repository":{"id":320720883,"uuid":"1082221260","full_name":"lukevdbroek-nl/hybrid-javascript-php","owner":"lukevdbroek-nl","description":"A lightweight reactive framework that bridges PHP and JavaScript through a shared Virtual DOM for real-time state synchronization.","archived":false,"fork":false,"pushed_at":"2025-10-25T13:30:31.000Z","size":17,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-25T14:18:20.827Z","etag":null,"topics":["framework","fullstack","javascript","php","reactive","vdom"],"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/lukevdbroek-nl.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-23T23:13:19.000Z","updated_at":"2025-10-25T14:16:53.000Z","dependencies_parsed_at":"2025-10-25T14:28:32.228Z","dependency_job_id":null,"html_url":"https://github.com/lukevdbroek-nl/hybrid-javascript-php","commit_stats":null,"previous_names":["lukevdbroek-nl/hybrid-javascript-php"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/lukevdbroek-nl/hybrid-javascript-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukevdbroek-nl%2Fhybrid-javascript-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukevdbroek-nl%2Fhybrid-javascript-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukevdbroek-nl%2Fhybrid-javascript-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukevdbroek-nl%2Fhybrid-javascript-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukevdbroek-nl","download_url":"https://codeload.github.com/lukevdbroek-nl/hybrid-javascript-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukevdbroek-nl%2Fhybrid-javascript-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28712841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T05:01:10.984Z","status":"ssl_error","status_checked_at":"2026-01-24T04:59:18.328Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["framework","fullstack","javascript","php","reactive","vdom"],"created_at":"2026-01-24T05:14:00.078Z","updated_at":"2026-01-24T05:14:00.840Z","avatar_url":"https://github.com/lukevdbroek-nl.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hybrid JavaScript PHP (HJP)\n\n**HJP** is a lightweight experimental framework that merges **PHP and JavaScript** using a shared **Virtual DOM**.  \nIt lets PHP and JS work together in real time — **no Node.js, no reloads**.\n\n---\n\n## Features\n\n- **Unified vDOM** — Shared Virtual DOM between PHP \u0026 JS  \n- **Reactive Updates** — PHP state changes reflected instantly in the browser  \n- **Server Logic + Client Interactivity** — Combine PHP logic with live JS updates  \n- **No Build Step** — Runs with native PHP and vanilla JavaScript  \n- **Lightweight** — Zero dependencies, pure codebase\n\n---\n\n## How It Works\n\n1. PHP renders the initial HTML and a JSON vDOM.  \n2. JavaScript hydrates and diff-patches DOM updates.  \n3. State changes are sent to PHP (`update.php`) and returned as a new vDOM.  \n\n---\n\n## Example\n\n```php\n\u003c?php\nrequire_once __DIR__ . '/framework/vdom.php';\nrequire_once __DIR__ . '/framework/compile_html.php';\nrequire_once __DIR__ . '/components/Button.php';\n\nfunction app($state) {\n    $name = $state[\"name\"] ?? \"Hybrid Javascript PHP\";\n    $reactive = $state[\"reactive\"] ?? \"PHP\";\n\n    ob_start(); ?\u003e\n    \u003cdiv id=\"main\"\u003e\n        \u003ch1 id=\"title\"\u003eHello \u003c?php echo $name; ?\u003e\u003c/h1\u003e\n        \u003ch1 id=\"subtitle\"\u003eThis is a reactive \u003c?php echo $reactive; ?\u003e framework\u003c/h1\u003e\n        \u003cp\u003eStatic content\u003c/p\u003e\n        \u003c?php new Button(\"Toggle State\", \"toggleState\"); ?\u003e\n    \u003c/div\u003e\n    \u003c?php return compile_html(ob_get_clean());\n}\n```\n\n---\n\n## Run Locally\n\n```bash\nphp -S localhost:8000 -t project\n```\n\nThen open [http://localhost:8000/index.php](http://localhost:8000/index.php)\n\n---\n\nMIT License © 2025\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukevdbroek-nl%2Fhybrid-javascript-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukevdbroek-nl%2Fhybrid-javascript-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukevdbroek-nl%2Fhybrid-javascript-php/lists"}