{"id":25100630,"url":"https://github.com/bryanhogan/gametolearnkorean","last_synced_at":"2025-04-02T05:42:35.276Z","repository":{"id":263197781,"uuid":"889643533","full_name":"BryanHogan/gametolearnkorean","owner":"BryanHogan","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-02T17:21:31.000Z","size":288,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T17:29:21.706Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Svelte","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/BryanHogan.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":"2024-11-16T21:05:50.000Z","updated_at":"2025-02-02T17:21:34.000Z","dependencies_parsed_at":"2024-12-20T01:17:45.280Z","dependency_job_id":"72b4b6ac-3738-4942-b2dd-eaccc085288b","html_url":"https://github.com/BryanHogan/gametolearnkorean","commit_stats":null,"previous_names":["bryanhogan/gametolearnkorean"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BryanHogan%2Fgametolearnkorean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BryanHogan%2Fgametolearnkorean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BryanHogan%2Fgametolearnkorean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BryanHogan%2Fgametolearnkorean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BryanHogan","download_url":"https://codeload.github.com/BryanHogan/gametolearnkorean/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246763844,"owners_count":20829798,"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-02-07T20:16:50.553Z","updated_at":"2025-04-02T05:42:35.260Z","avatar_url":"https://github.com/BryanHogan.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Game To Learn Korean\n\nMake learning with flashcards more efficient and fun with a gamification approach.\n\nWebsite not yet available.  \nApp not yet available.\n\n## Tech-Stack\n\n- SvelteKit\n- PostCSS: A css pre-processor, enhances CSS.\n- CapacitorJS: Turn my website into an Android and iOS app.\n- Tauri: Turn my website into a Windows and Mac app.\n\nAdditional libraries:\n- es-hangul: https://es-hangul.slash.page/en/docs/introduction\n\n## Setup\n\n1. Setup SvelteKit project with `npx sv create my-app` - https://svelte.dev/docs/kit/creating-a-project\n2. Add Capacitor - https://ionic.io/blog/cross-platform-sveltekit-capacitor-application-yes-its-possible\n   - `npm i @capacitor/core`\n   - `npm i -D @capacitor/cli`\n   - `npx cap init`\n   - Adjust capacitor.config.ts, change webDir to `build`.\n   - `npm i -D @sveltejs/adapter-static`. Add lines to `svelte.config.js` to change adapter to static, adjust first line and add options to adapter. (See guide on ionic.io)\n   - Create layout which sets prerender true. (See guide on ionic.io)\n   - Probably also want to download Android studio to develop Android app. Install Android Studio and setup emulator.\n   - More on using CapacitorJS here: https://capacitorjs.com/docs/getting-started\n3. Add Tauri\n    - Tauri requires you to download\n4. Add PostCSS\n\n## Using Capacitor\n\nThe steps above is everything you need to setup the project.  \nTo now open the app on the emulator we just need to:\n- `npm run build`\n- `npx cap sync`\n- `npx cap open android`\n\nWhat about \"hot module reloading\" / \"live reloading\"?\n\nFor that adjust the `vite.config.ts` and `capacitor.config.json`.\n\nTo vite.config.ts add this:\n```\nserver: {\n    host: '0.0.0.0',\n    port: 5173,\n}\n```\n\nTo capacitor.config.json add this:\n```\nserver: {\n    url: 'http://10.0.2.2:5173',\n    cleartext: true\n}\n```\n\n\u003cdetails\u003e \u003csummary\u003e How your vite.config.ts and capacitor.config.ts might look now: \u003c/summary\u003e\n\n```\n//vite.config.ts\nimport { sveltekit } from '@sveltejs/kit/vite';\nimport { defineConfig } from 'vite';\n\nexport default defineConfig({\n\tplugins: [sveltekit()],\n\tserver: {\n\t\thost: '0.0.0.0',\n\t\tport: 5173,\n\t  }\n});\n\n//capacitor.config.json\nimport type { CapacitorConfig } from '@capacitor/cli';\n\nconst config: CapacitorConfig = {\n  appId: 'game.tolearnkorean.com',\n  appName: 'gametolearnkorean',\n  webDir: 'build',\n  server: {\n    url: 'http://10.0.2.2:5173',\n    cleartext: true\n  }\n};\n\nexport default config;\n```\n\n\u003c/details\u003e\n\nNow to make running the server as well as starting the android emulator easier I made it all into one command which you can run with `npm run android-dev`. Add this to the `package.json` and then under `scripts`:  \n`\"android-dev\": \"start /B npm run dev -- --host \u0026\u0026 npm run build \u0026\u0026 npx cap sync \u0026\u0026 npx cap open android\"`\n\n## Audit fixes\n\nWhen I first setup SvelteKit and added Capacitor I had a few low severity vulnerabilities from the \"npm audit report\", using \"npm audit fix --force\" didn't work since it resulted in an error.\n\nDeleting `node_modules` and `package-lock.json` and using pnpm instead solved this issue for me.\n\n1. `npm install -g pnpm`\n2. `pnpm install`\n3. `pnpm audit --fix`\n\n## Additional Notes\n\nTauri has recently added the option to not only turn your website into a Windows and Mac app, but also Android and iOS. But that it's still very new and has a much smaller plugin ecosystem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanhogan%2Fgametolearnkorean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryanhogan%2Fgametolearnkorean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryanhogan%2Fgametolearnkorean/lists"}