{"id":19956891,"url":"https://github.com/mrnegativetw/justdrinkit","last_synced_at":"2026-04-13T01:04:31.771Z","repository":{"id":114176962,"uuid":"378349087","full_name":"MrNegativeTW/JustDrinkIt","owner":"MrNegativeTW","description":"Drink reminder, built with Raspberry Pi, Firebase and Android app.","archived":false,"fork":false,"pushed_at":"2021-06-23T09:12:55.000Z","size":327,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T15:44:35.219Z","etag":null,"topics":["android","firebase","firestore","raspberry-pi","raspberrypi"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/MrNegativeTW.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":"2021-06-19T07:14:17.000Z","updated_at":"2021-07-26T14:23:13.000Z","dependencies_parsed_at":"2023-07-04T13:50:54.667Z","dependency_job_id":null,"html_url":"https://github.com/MrNegativeTW/JustDrinkIt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MrNegativeTW/JustDrinkIt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNegativeTW%2FJustDrinkIt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNegativeTW%2FJustDrinkIt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNegativeTW%2FJustDrinkIt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNegativeTW%2FJustDrinkIt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrNegativeTW","download_url":"https://codeload.github.com/MrNegativeTW/JustDrinkIt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrNegativeTW%2FJustDrinkIt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264545168,"owners_count":23625404,"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":["android","firebase","firestore","raspberry-pi","raspberrypi"],"created_at":"2024-11-13T01:35:52.065Z","updated_at":"2026-04-13T01:04:31.731Z","avatar_url":"https://github.com/MrNegativeTW.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \n\u003cimg src=\"https://fakeimg.pl/128x128/282828/eae0d0/?text=Icon\" width=\"128\" height=\"128\"\u003e\n\n\u003ch1\u003eJust Drink It\u003c/h1\u003e\n\u003ch4\u003e\n他會提醒你喝水，包含 Server 端和 Android 客戶端原始碼。\n\u003c/h4\u003e\n\n![](https://img.shields.io/badge/Raspberry%20Pi-Any-C51A4A?style=flat-square)\n![](https://img.shields.io/badge/Python-3.7+-4B8BBE?style=flat-square)\n![](https://img.shields.io/badge/Android%20Studio-4.1.2+-32DE84?style=flat-square)\n![](https://img.shields.io/badge/Android-6.0+-32DE84?style=flat-square)\n![](https://img.shields.io/badge/Firebase-Firestore-FFA611?style=flat-square)\n![](https://img.shields.io/badge/Firebase-Cloud%20Message-FFA611?style=flat-square)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#Preview\"\u003ePreview\u003c/a\u003e •\n  \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e •\n  \u003ca href=\"#requirements\"\u003eRequirements\u003c/a\u003e •\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\u003c/div\u003e\n\n## Preview\n\u003cimg src=\"https://raw.githubusercontent.com/MrNegativeTW/JustDrinkIt/main/android_client_screenshot.jpg\" width=\"240\"\u003e\n\n## Features\n\n- Drink reminder\n\n## Requirements\n\n### Server\n\n- Raspberry Pi\n- Fast as fuck internet connection\n- HCSR04\n- HCSR501\n\n### Android Client\n\n- Android Studio 4.1.2+\n- Android 6.0+\n\n### Others\n\n- Firebase Firestore\n- Firebase Cloud Message\n\n\n## Architecture\n\n![](https://fakeimg.pl/1280x720/)\n\n\n## Installation \n\n### Firebase\n\n1. Create a firebase project\n\n2. [Get your Admin SDK credentials](https://console.firebase.google.com/u/1/project/_/settings/serviceaccounts/adminsdk), \u003cbr\u003elooks like  `YOUR_PROJECT-firebase-adminsdk-RANDOM_STRING.json`\n\n3. [Get your Cloud Mesaage API Key](https://console.firebase.google.com/project/_/settings/cloudmessaging)\n\n4. In Firestore, Create a `collection` called `bottleStatus`, than create a `document` with random id.\n\n5. Copy that random id.\n\n\n### Android Client\n\n1. Get your `google-services.json` from Firebase when adding app, put it in to `./DrinkInClient/app`\n\n2. Modify `FirestoreManager.py` line 12, replace with your random document id.\n```kotlin\nreturn db.collection(\"bottleStatus\").document(\"RANDOM_ID\")\n    \n```\n\n3. Click `RUN`.\n\n3. Get your `device token` by pressing the float action button, which will looks like this:\n\n```\nfWo6-TFJSVCDAV8h8DPRaQ:APA91bELNaBgKduEAWACJN-tIB8CkpDSkbloGIluxaCeMFLDjmpiz26UZqU4L-cW5VeYGK1GiMFywdcaalav8zNWCHurKu10ZnPUlH_w9YYm1WwftXrDv7X58YJNUwtdk60n6ebQWX1r\n```\n\n\n### Server Side\n\n1. Modify `firestore.py` line 6, replace with your Admin SDK credentials path.\n\n```python\ncred = credentials.Certificate(\n    \"YOUR_PROJECT-firebase-adminsdk-RANDOM_STRING.json\")\n```\n\n2. Modify `fcm.py` line 5, replace with your `Cloud Mesaage API Key`.\n\n```python\napi_key = \"API_KEY_HERE\"\n```\n\n3. Modify `firestore.py` line 10, replace with your random document id.\n\n```python\ndoc_ref = db.collection(u'bottleStatus').document(u'RANDOM_ID')\n```\n\n4. Modify `fcm.py` line 8, replace with your `android device token`.\n\n```python\ndevice_token = \"DEVICE_TOKEN_HERE\"\n```\n\n5. Install dependences than start the server.\n\n```bash\npip3 install -r requirements.txt\npython3 index.txt\n```\n\n## Typo\n\nI know. DrinkItClient become DrinkInClient.\n\n## License\n```\nNo idea.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrnegativetw%2Fjustdrinkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrnegativetw%2Fjustdrinkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrnegativetw%2Fjustdrinkit/lists"}