{"id":13514076,"url":"https://github.com/elipZis/inertia-echo","last_synced_at":"2025-03-31T02:33:20.312Z","repository":{"id":53219047,"uuid":"292356751","full_name":"elipZis/inertia-echo","owner":"elipZis","description":"💻 Echo (Go) Server-Side Adapter for Inertia.js","archived":false,"fork":false,"pushed_at":"2023-02-27T07:38:56.000Z","size":974,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T15:02:29.203Z","etag":null,"topics":["echo","go","golang","inertiajs","svelte"],"latest_commit_sha":null,"homepage":"https://inertia-echo.herokuapp.com","language":"Go","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/elipZis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"custom":["https://www.paypal.me/elipzis"]}},"created_at":"2020-09-02T18:01:07.000Z","updated_at":"2024-03-26T01:48:35.000Z","dependencies_parsed_at":"2024-01-13T19:24:22.079Z","dependency_job_id":"8b553382-0a64-4aac-b9d9-7150c3399d6d","html_url":"https://github.com/elipZis/inertia-echo","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elipZis%2Finertia-echo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elipZis%2Finertia-echo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elipZis%2Finertia-echo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elipZis%2Finertia-echo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elipZis","download_url":"https://codeload.github.com/elipZis/inertia-echo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246407401,"owners_count":20772126,"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":["echo","go","golang","inertiajs","svelte"],"created_at":"2024-08-01T05:00:45.503Z","updated_at":"2025-03-31T02:33:16.636Z","avatar_url":"https://github.com/elipZis.png","language":"Go","readme":"# Inertia-Echo - An Echo Server-Side Adapter for Inertia.js \n[![GitHub license](https://img.shields.io/github/license/elipzis/inertia-echo.svg)](https://github.com/elipzis/inertia-echo/blob/master/LICENSE.md) [![GitHub (pre-)release](https://img.shields.io/badge/release-0.1.0-yellow.svg)](https://github.com/elipzis/inertia-echo/releases/tag/0.1.0) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/elipzis)\n\nInertia-Echo is an [Echo][3] (Go) server-side adapter for [Inertia.js][2] to build modern monolithic single-page apps. \nBased on [inertia-laravel][4] and [zgabievi's PingCRM Demo][5].\n\n\u003e A demo app can be found in the `demo` branch at https://github.com/elipZis/inertia-echo/tree/demo\n\n## Pre-requisites\n[Download and install][7] Golang for your platform.\n\n## Notes\nThis module serves as middleware to the [Echo][3] server system and has to be registered accordingly.\nIt is not intended to be used without [Echo][3] and a client-side [Inertia.js][2].\n\n\u003e For usage instructions about Echo please refer to the [official documentation][14]\n\n## Setup\nCreate a copy of the example environment variables\n```sh\ncp .env.example .env\n```\nSetup your own properties accordingly.\n\nIn the configured `resources` directory you need to create a `views` folder and a configured `INERTIA_ROOT_VIEW` file.\nYou may use the example file provided in this repository which requires [Webpack][15] and [Mix][16].\n\n## Usage\nCreate a new [Echo][3] instance and register the Inertia middleware with it\n```golang\nimport (\n\t...\n\n\t\"github.com/elipzis/inertia-echo\"\n\t\n    ...\n)\n\ne := echo.New()\ne.Use(inertia.Middleware(e))\n```\nImport the module into your project.\n\nThe middleware hooks into the [Echo][3] error and template rendering with a dedicated Inertia instance by itself. \nTherefore, to render a client-side [Inertia.js][2] view you can register a route and render a component\n```\n// Handler\nfunc hello(c echo.Context) error {\n    // Status, Component Name, Data to pass on\n    return c.Render(http.StatusOK, \"Index\", map[string]interface{}{})\n}\n\n// Route\ne.GET(\"/hello\", hello)\n```\nThe internal template renderer of Inertia-Echo checks whether a fresh full base-site has to be returned or only the reduced Inertia response.\n\n\u003e For more examples refer to the `demo` branch at https://github.com/elipZis/inertia-echo/tree/demo\n\n## Configuration\nYou can leverage several `...WithConfig` functions to configure this module to your needs.\n\nFor example, you may create your own `Inertia-Echo` instance via `NewInertia(...)` and pass the instance to the middleware via \n```\ne.Use(inertia.MiddlewareWithConfig(inertia.MiddlewareConfig{\n    Inertia: MyInertia,\n}))\n```\nBy that you enable yourself to use functionality such as `Share(...)` in your own e.g. handlers.\n\n## License and Credits\nThis module is released under the MIT license by [elipZis][1].\n\nThis program uses multiple other libraries. Credits and thanks to all the developers working on these great projects:\n* [Inertia.js][2]\n* [Echo][3]\n* [Svelte Ping CRM][5]\n\nand many more.\n\n## Disclaimer\nThis source and the whole package comes without a warranty. It may or may not harm your computer. \nIt is not a reference for best-practices or security concerns or any other application concept.\nPlease use with care and not as absolute reference.  \nAny damage cannot be related back to the author. \n\n  [1]: https://elipZis.com\n  [2]: https://inertiajs.com/\n  [3]: https://echo.labstack.com/\n  [4]: https://github.com/inertiajs/inertia-laravel\n  [5]: https://github.com/zgabievi/pingcrm-svelte\n  [6]: https://svelte.dev/\n  [7]: https://golang.org/dl/\n  [8]: https://www.postgresql.org/download/\n  [9]: https://github.com/go-gorm/gorm/\n  [10]: https://github.com/gorilla/sessions\n  [11]: https://github.com/dgrijalva/jwt-go\n  [12]: https://github.com/go-playground/validator\n  [13]: https://github.com/joho/godotenv\n  [14]: https://echo.labstack.com/guide\n  [15]: https://webpack.js.org/\n  [16]: https://laravel.com/docs/8.x/mix\n","funding_links":["https://www.paypal.me/elipzis"],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FelipZis%2Finertia-echo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FelipZis%2Finertia-echo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FelipZis%2Finertia-echo/lists"}