{"id":15043284,"url":"https://github.com/litestar-org/litestar-vite","last_synced_at":"2026-05-03T03:04:45.576Z","repository":{"id":198067968,"uuid":"700151870","full_name":"litestar-org/litestar-vite","owner":"litestar-org","description":"Vite Plugin for Litestar","archived":false,"fork":false,"pushed_at":"2026-03-29T00:06:33.000Z","size":3873,"stargazers_count":29,"open_issues_count":2,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-29T02:56:29.263Z","etag":null,"topics":["angular","astrojs","inertiajs","litestar","litestar-api","litestar-framework","nuxt","react","svelte","sveltekit","vite","vitejs","vue"],"latest_commit_sha":null,"homepage":"http://litestar-org.github.io/litestar-vite/","language":"Python","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/litestar-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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},"funding":{"github":["litestar-org"],"open_collective":"litestar","polar":"litestar-org"}},"created_at":"2023-10-04T03:39:08.000Z","updated_at":"2026-03-29T00:05:39.000Z","dependencies_parsed_at":"2023-12-20T07:22:37.300Z","dependency_job_id":"eaa2a122-d093-44d0-b692-ec3b64b7de83","html_url":"https://github.com/litestar-org/litestar-vite","commit_stats":{"total_commits":199,"total_committers":4,"mean_commits":49.75,"dds":"0.10050251256281406","last_synced_commit":"c302a70baaaf31cbef041c98e6a2e6b5356bb072"},"previous_names":["cofin/litestar-vite","litestar-org/litestar-vite"],"tags_count":84,"template":false,"template_full_name":null,"purl":"pkg:github/litestar-org/litestar-vite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litestar-org%2Flitestar-vite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litestar-org%2Flitestar-vite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litestar-org%2Flitestar-vite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litestar-org%2Flitestar-vite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/litestar-org","download_url":"https://codeload.github.com/litestar-org/litestar-vite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/litestar-org%2Flitestar-vite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31312873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","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":["angular","astrojs","inertiajs","litestar","litestar-api","litestar-framework","nuxt","react","svelte","sveltekit","vite","vitejs","vue"],"created_at":"2024-09-24T20:48:48.306Z","updated_at":"2026-04-02T18:28:02.613Z","avatar_url":"https://github.com/litestar-org.png","language":"Python","funding_links":["https://github.com/sponsors/litestar-org","https://opencollective.com/litestar","https://polar.sh/litestar-org"],"categories":[],"sub_categories":[],"readme":"# Litestar Vite\n\nLitestar Vite connects the Litestar backend to a Vite toolchain. It supports SPA, Template, Inertia, and meta-framework workflows, and it can proxy Vite dev traffic through your ASGI port or run Vite directly.\n\n## Features\n\n- One-port dev: proxies Vite HTTP + WS/HMR through Litestar by default; switch to two-port with `VITE_PROXY_MODE=direct`.\n- Framework-mode support: use `mode=\"framework\"` (alias `mode=\"ssr\"`) for Astro, Nuxt, and SvelteKit. Litestar proxies everything except your API routes.\n- Production assets: reads the Vite manifest from `public/manifest.json` (configurable) and serves under `asset_url`.\n- Type-safe frontends: optional OpenAPI/routes export plus `@hey-api/openapi-ts` via the Vite plugin.\n- Inertia support: Inertia v2/v3 protocol support with session middleware, script-element bootstrap by default, and optional SSR.\n\n## Install\n\n```bash\npip install litestar-vite\nnpm install litestar-vite-plugin\n```\n\n## Quick Start\n\n```python\nimport os\nfrom pathlib import Path\nfrom litestar import Litestar\nfrom litestar_vite import PathConfig, ViteConfig, VitePlugin\n\nDEV_MODE = os.getenv(\"VITE_DEV_MODE\", \"true\").lower() in (\"true\", \"1\", \"yes\")\n\napp = Litestar(\n    plugins=[VitePlugin(config=ViteConfig(\n        dev_mode=DEV_MODE,\n        paths=PathConfig(root=Path(__file__).parent),\n    ))]\n)\n```\n\n```bash\nlitestar assets init --template vue\nlitestar assets install\nlitestar run --reload\n```\n\n## Documentation\n\n- **[Usage Guide](https://litestar-org.github.io/litestar-vite/latest/usage/)**: Core concepts, configuration, and type generation.\n- **[Inertia](https://litestar-org.github.io/litestar-vite/latest/inertia/)**: Fullstack protocols and SSR.\n- **[Frameworks](https://litestar-org.github.io/litestar-vite/latest/frameworks/)**: Guides for React, Vue, Svelte, Angular, Astro, and Nuxt.\n- **[Reference](https://litestar-org.github.io/litestar-vite/latest/reference/)**: API and CLI documentation.\n\nFor a full list of changes, see the [Changelog](https://litestar-org.github.io/litestar-vite/latest/changelog.html).\n\n## Common Commands\n\n- `litestar assets init --template \u003cname\u003e`: scaffold a frontend or framework app\n- `litestar assets install`: install frontend dependencies with the configured executor\n- `litestar assets build`: build production assets\n- `litestar assets serve`: run the frontend toolchain directly\n- `litestar assets generate-types`: export OpenAPI, routes, and Inertia page-prop metadata\n- `litestar assets doctor`: inspect and optionally repair config drift\n\n## Development\n\n```bash\n# Install Python, docs, and JS dependencies; build package artifacts\nmake install \u0026\u0026 make build\n\n# Run an example app\nuv run litestar --app-dir examples/vue-inertia assets install\nuv run litestar --app-dir examples/vue-inertia run\n```\n\nReplace `vue-inertia` with any other example app: `vue`, `react`, `svelte`, `react-inertia`, `htmx`, `angular`, `astro`, `nuxt`, or `sveltekit`.\n\nlitestar-vite now defaults Inertia apps to script-element bootstrap. Inertia v3 clients use that transport automatically; if you pin Inertia v2, keep `createInertiaApp({ defaults: { future: { useScriptElementForInitialPage: true } } })` aligned in the browser entry and SSR entry when `ssr=True` is enabled, or opt back into the legacy `data-page` path with `InertiaConfig(use_script_element=False)`.\n\n## Links\n\n- Docs: \u003chttps://litestar-org.github.io/litestar-vite/latest/\u003e\n- Examples: `examples/` (React, Vue, Svelte, HTMX, Inertia, Astro, Nuxt, SvelteKit, Angular)\n- Real-world example: [litestar-fullstack](https://github.com/litestar-org/litestar-fullstack)\n- Issues: \u003chttps://github.com/litestar-org/litestar-vite/issues/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitestar-org%2Flitestar-vite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flitestar-org%2Flitestar-vite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flitestar-org%2Flitestar-vite/lists"}