{"id":21206786,"url":"https://github.com/rifandani/svelte-app","last_synced_at":"2025-07-10T08:33:16.592Z","repository":{"id":168902097,"uuid":"614448158","full_name":"rifandani/svelte-app","owner":"rifandani","description":"Bulletproof Svelte 4 SPA Template","archived":false,"fork":false,"pushed_at":"2024-01-07T16:15:18.000Z","size":497,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-15T22:17:37.803Z","etag":null,"topics":["commitlint","daisyui","eslint","felte","iconify","msw","prettier","redaxios","svelte","tailwind-merge","tailwindcss","tanstack-react-query","testing-library","typescript","vite","vitest","zod"],"latest_commit_sha":null,"homepage":"https://svelte-app-rifandani.vercel.app/","language":"TypeScript","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/rifandani.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}},"created_at":"2023-03-15T15:50:29.000Z","updated_at":"2024-05-01T05:40:14.000Z","dependencies_parsed_at":"2024-01-07T17:25:01.718Z","dependency_job_id":"be5bf370-11a1-46d1-855c-56ca55f2cb91","html_url":"https://github.com/rifandani/svelte-app","commit_stats":null,"previous_names":["rifandani/svelte-app"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rifandani%2Fsvelte-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rifandani%2Fsvelte-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rifandani%2Fsvelte-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rifandani%2Fsvelte-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rifandani","download_url":"https://codeload.github.com/rifandani/svelte-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225629864,"owners_count":17499295,"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":["commitlint","daisyui","eslint","felte","iconify","msw","prettier","redaxios","svelte","tailwind-merge","tailwindcss","tanstack-react-query","testing-library","typescript","vite","vitest","zod"],"created_at":"2024-11-20T20:56:49.315Z","updated_at":"2024-11-20T20:56:50.035Z","avatar_url":"https://github.com/rifandani.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intro\n\n[![DeepScan grade](https://deepscan.io/api/teams/13942/projects/25053/branches/777069/badge/grade.svg)](https://deepscan.io/dashboard#view=project\u0026tid=13942\u0026pid=25053\u0026bid=777069)\n\nSvelte template built with:\n\n- `vite` + `typescript` + `eslint` + `prettier` -\u003e dev productivity\n- `svelte-spa-router` -\u003e hash based routing\n- `vitest` + `@testing-library/svelte` -\u003e unit test, integration test, coverage\n- `msw` -\u003e browser and server mocking\n- `tailwindcss` + `tailwind-merge` + `daisyui` -\u003e styling\n- `@melt-ui/svelte` -\u003e accessible and customizable UI component builders library\n- `axios` + `@tanstack/svelte-query` -\u003e data fetching\n- `zod` -\u003e schema validation\n- `felte` -\u003e form management\n- `@iconify/svelte` -\u003e icon on demand\n- `type-fest` -\u003e useful type helpers\n- `typesafe-i18n` -\u003e typesafe i18n\n\n## Development\n\n```bash\n# install deps\n$ pnpm install\n\n# init msw for browser mocking\n$ pnpm msw:init\n\n# Runs the app\n$ pnpm start\n```\n\n```bash\n# run test\n$ pnpm test\n\n# coverage with istanbul\n$ pnpm test:coverage\n```\n\n## Build\n\nBuilds the app for production to the `dist` folder.\u003cbr\u003e\nIt correctly bundles Svelte in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\u003cbr\u003e\nYour app is ready to be deployed!\n\n```bash\n# build app\n$ pnpm build\n```\n\n## Deployment\n\nYou can deploy the `dist` folder to any static host provider (netlify, surge, now, etc.)\n\n## Technical considerations (from the vite starter)\n\n**Why use this over SvelteKit?**\n\n- It brings its own routing solution which might not be preferable for some users.\n- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.\n\nThis template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.\n\nShould you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.\n\n**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**\n\nSetting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.\n\n**Why include `.vscode/extensions.json`?**\n\nOther templates indirectly recommend extensions via the README, but this file allows VS Code to prompt the user to install the recommended extension upon opening the project.\n\n**Why enable `allowJs` in the TS template?**\n\nWhile `allowJs: false` would indeed prevent the use of `.js` files in the project, it does not prevent the use of JavaScript syntax in `.svelte` files. In addition, it would force `checkJs: false`, bringing the worst of both worlds: not being able to guarantee the entire codebase is TypeScript, and also having worse typechecking for the existing JavaScript. In addition, there are valid use cases in which a mixed codebase may be relevant.\n\n**Why is HMR not preserving my local component state?**\n\nHMR state preservation comes with a number of gotchas! It has been disabled by default in both `svelte-hmr` and `@sveltejs/vite-plugin-svelte` due to its often surprising behavior. You can read the details [here](https://github.com/rixo/svelte-hmr#svelte-hmr).\n\nIf you have state that's important to retain within a component, consider creating an external store which would not be replaced by HMR.\n\n```ts\n// store.ts\n// An extremely simple external store\nimport { writable } from 'svelte/store';\nexport default writable(0);\n```\n\n## NOTES\n\n- [ ] fix all tests -\u003e `typesafe-i18n` always returns empty string,,, `axios` + `svelte-query` + `msw` base url somehow does not works.\n- [ ] add `/docs` folder, including all my decisions or technical considerations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frifandani%2Fsvelte-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frifandani%2Fsvelte-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frifandani%2Fsvelte-app/lists"}