{"id":16226655,"url":"https://github.com/sarcevicantonio/kcalcalc","last_synced_at":"2025-03-19T13:30:48.444Z","repository":{"id":45838517,"uuid":"463140855","full_name":"SarcevicAntonio/kcalCalc","owner":"SarcevicAntonio","description":"free calorie counting app designed for fast user interactions","archived":false,"fork":false,"pushed_at":"2025-01-17T10:05:13.000Z","size":4501,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T20:40:45.582Z","etag":null,"topics":["calorie","firebase","firestore","health","svelte","sveltekit"],"latest_commit_sha":null,"homepage":"https://kcal-calc.vercel.app","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/SarcevicAntonio.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":"2022-02-24T12:31:32.000Z","updated_at":"2025-01-16T23:38:45.000Z","dependencies_parsed_at":"2024-10-27T20:34:41.957Z","dependency_job_id":"a987a4d9-53d0-46d4-bf4e-ee6e92286341","html_url":"https://github.com/SarcevicAntonio/kcalCalc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SarcevicAntonio%2FkcalCalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SarcevicAntonio%2FkcalCalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SarcevicAntonio%2FkcalCalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SarcevicAntonio%2FkcalCalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SarcevicAntonio","download_url":"https://codeload.github.com/SarcevicAntonio/kcalCalc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243989729,"owners_count":20379648,"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":["calorie","firebase","firestore","health","svelte","sveltekit"],"created_at":"2024-10-10T12:49:58.421Z","updated_at":"2025-03-19T13:30:45.579Z","avatar_url":"https://github.com/SarcevicAntonio.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./static/favicon.svg\" width=\"64\" height=\"64\" alt=\"\" /\u003e\n\n# kcalCalc\n\nA free calorie counting app made to fit my needs.\n\nGive it a shot at [kcal-calc.vercel.app](https://kcal-calc.vercel.app)\n\n| Mobile Day View                       | Item Selection                                          | Mobile Week View                          |\n| ------------------------------------- | ------------------------------------------------------- | ----------------------------------------- |\n| ![DayView](./screenshots/DayView.png) | ![SelectItemSearch](./screenshots/SelectItemSearch.png) | ![WeekGraph](./screenshots/WeekGraph.png) |\n\n| Desktop Unified View                           |\n| ---------------------------------------------- |\n| ![Unified View](./screenshots/UnifiedView.png) |\n\n## Self Hosting\n\nkcalCalc can be self-hosted for free using Firebase and a Cloud Host like Vercel.\n\n### Setup Firebase\n\n- Create new Firebase Project\n- Create Web App\n- Copy following env values for later:\n  - VITE_APIKEY\n  - VITE_AUTHDOMAIN\n  - VITE_PROJECTID\n  - VITE_STORAGEBUCKET\n  - VITE_MESSAGINGSENDERID\n  - VITE_APPID\n- Enable Auth: Go to \"Authentication\" \u003e \"Get started\" \u003e \"Google\" \u003e \"Enable\" \u003e set \"Project support email\" field \u003e \"Save\"\n  - Also set up your hosted app Domain under \"Authentication\" \u003e \"Settings\" \u003e \"Authorized domains\"\n- Enable Firestore: Go to \"Firestore Database\" \u003e \"Create database\" \u003e \"Start in test mode\" \u003e \"Next\" \u003e set \"Cloud Firestore location\" field near you \u003e \"Enable\"\n- Setup Rules: \"Firestore Database\" \u003e \"Rules\" \u003e paste following\n  - ```js\n    rules_version = '2';\n    service cloud.firestore {\n      match /databases/{database}/documents {\n          match /Users/{userId}/{documents=**} {\n          allow read, write: if userId == request.auth.uid;\n        }\n      }\n    }\n    ```\n\n### Host frontend\n\n- You can use a service like Vercel to host the frontend.\n- Fork the repo and login to Vercel via GitHub\n- Create a new project using the forked repo and add the env variables from above\n\n## Development\n\n- Copy env variables in a `.env` file\n- `pnpm i`\n- `pnpm dev`\n\n- firebase emulator usage can be toggled via `VITE_USE_EMULATION=true`.\n- firebase cli\n  - install `curl -sL https://firebase.tools | bash`\n  - `firebase login`\n  - `firebase emulators:start`\n\n### Svelte Style Guide\n\n- Layout: Script, Markup, Styles\n- Script Layout: Imports, createEventDispatcher, export props, local state, reactive statements, functions.\n- Hints that you component is too complicated:\n  - If you feel like you want to organize script differently\n  - ~6 Levels of Indentation max\n  - ~300LOC max\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarcevicantonio%2Fkcalcalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsarcevicantonio%2Fkcalcalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsarcevicantonio%2Fkcalcalc/lists"}