{"id":26696386,"url":"https://github.com/dashpilot/inertia-vanilla-php","last_synced_at":"2025-03-26T20:20:12.029Z","repository":{"id":282878055,"uuid":"949948194","full_name":"dashpilot/inertia-vanilla-php","owner":"dashpilot","description":"Use Inertia.js without a php framework. Uses bramus/router for php routing","archived":false,"fork":false,"pushed_at":"2025-03-17T12:27:08.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T12:43:48.916Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dashpilot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-03-17T11:50:10.000Z","updated_at":"2025-03-17T12:27:11.000Z","dependencies_parsed_at":"2025-03-17T12:43:52.169Z","dependency_job_id":"990e9a91-8c1f-4bcd-bf78-d89a769f3a02","html_url":"https://github.com/dashpilot/inertia-vanilla-php","commit_stats":null,"previous_names":["dashpilot/inertia-vanilla-php"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpilot%2Finertia-vanilla-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpilot%2Finertia-vanilla-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpilot%2Finertia-vanilla-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashpilot%2Finertia-vanilla-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashpilot","download_url":"https://codeload.github.com/dashpilot/inertia-vanilla-php/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245727749,"owners_count":20662558,"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-03-26T20:20:11.525Z","updated_at":"2025-03-26T20:20:12.017Z","avatar_url":"https://github.com/dashpilot.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inertia for Vanilla PHP\n\nA lightweight implementation of Inertia.js with plain PHP. No frameworks required.\n\nThis version uses Vue, but there's also a [Svelte 5 version](https://github.com/dashpilot/inertia-vanilla-php-svelte)\n\nFull blog and blog CMS using Inertia, Svelte and SQLite example [here](https://github.com/dashpilot/inertia-vanilla-php-svelte-sqlite)\n\n## Why?\n\nModern PHP comes with many powerful features built-in:\n\n-   Database connections with PDO\n-   Session handling\n-   File system operations\n-   Array functions and more\n\nThis project leverages these capabilities while adding just what you need to build modern SPAs:\n\n-   **Simple but powerful** - Just PHP, a router, and Inertia.js\n-   **No framework overhead** - Use PHP's built-in features directly\n-   **Modern UX** - SPA-like experience without building a separate API\n-   **Lightweight** - Understand your entire codebase without framework complexity\n\n## Installation\n\n```bash\n# Clone the repository using degit (no git history)\nnpx degit dashpilot/inertia-vanilla-php my-project\n\n# Navigate to project directory and install dependencies\ncd my-project\ncomposer install\nnpm install\n```\n\n## Usage\n\n### Development\n\nRun both the Vite dev server and PHP server concurrently:\n\n```bash\n# Start both servers with a single command\nnpm run dev\n```\n\nThis will start:\n\n-   PHP development server at http://localhost:8000\n-   Vite dev server (for assets) at http://localhost:3000\n\nAlways access your app through http://localhost:8000\n\n### Production\n\nBuild your assets for production:\n\n```bash\n# Build optimized assets\nnpm run build\n```\n\nSet `$isProduction` in `config.php` to true\n\nThen deploy your application to your production server. In production, all assets are served directly from the `public/assets` directory.\n\n## How It Works\n\n1. Use the PHP router to define routes\n2. Return page data with `Inertia::render('PageName', ['prop' =\u003e 'value'])`\n3. Inertia.js handles client-side page transitions, history, and state\n\nEnjoy the simplicity of vanilla PHP with the power of modern frontend tooling!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpilot%2Finertia-vanilla-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashpilot%2Finertia-vanilla-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashpilot%2Finertia-vanilla-php/lists"}