{"id":18683039,"url":"https://github.com/numbersprotocol/lifebox-legacy","last_synced_at":"2025-04-12T04:31:20.137Z","repository":{"id":38609040,"uuid":"235037440","full_name":"numbersprotocol/lifebox-legacy","owner":"numbersprotocol","description":"Personal life data management management and analysis.","archived":false,"fork":false,"pushed_at":"2023-01-24T01:20:24.000Z","size":14748,"stargazers_count":3,"open_issues_count":38,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-26T00:02:51.227Z","etag":null,"topics":["lifebox"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/numbersprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-20T06:53:51.000Z","updated_at":"2025-02-22T14:01:45.000Z","dependencies_parsed_at":"2023-02-13T08:31:08.992Z","dependency_job_id":null,"html_url":"https://github.com/numbersprotocol/lifebox-legacy","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numbersprotocol%2Flifebox-legacy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numbersprotocol%2Flifebox-legacy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numbersprotocol%2Flifebox-legacy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numbersprotocol%2Flifebox-legacy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numbersprotocol","download_url":"https://codeload.github.com/numbersprotocol/lifebox-legacy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248517131,"owners_count":21117392,"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":["lifebox"],"created_at":"2024-11-07T10:13:34.075Z","updated_at":"2025-04-12T04:31:20.102Z","avatar_url":"https://github.com/numbersprotocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lifebox Mobile Client\n\n## Reference Development Environment\n\n``` txt\nIonic:\n\n   Ionic CLI                     : 5.2.1 (/home/seanwu/.nvm/versions/node/v10.16.0/lib/node_modules/ionic)\n   Ionic Framework               : @ionic/angular 4.6.0\n   @angular-devkit/build-angular : 0.13.9\n   @angular-devkit/schematics    : 7.3.9\n   @angular/cli                  : 7.3.9\n   @ionic/angular-toolkit        : 1.5.1\n\nCordova:\n\n   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)\n   Cordova Platforms : android 8.0.0\n   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 4 other plugins)\n\nUtility:\n\n   cordova-res : not installed\n   native-run  : 0.2.7\n\nSystem:\n\n   Android SDK Tools : 26.1.1 (/home/seanwu/android-sdk-26.1.1-4333796)\n   NodeJS            : v10.16.0 (/home/seanwu/.nvm/versions/node/v10.16.0/bin/node)\n   npm               : 6.9.0\n   OS                : Linux 4.18\n```\n\n## Setup Development Environment\n\nAssume the OS is Ubuntu 18.04.\n\n### Install JDK 8 and Gradle\n\n``` sh\nsudo apt install openjdk-8-jdk gradle\n```\n\n### Setup Android SDK Command Line Tools\n\nDownload and unzip Android SDK tools.\n\n``` sh\nwget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip\nunzip sdk-tools-linux-4333796.zip -d $HOME/android-sdk-26.1.1-4333796\n```\n\nConfigure command line tools by adding the environment variables to shell startup scripts (e.g. `~/.bashrc`).\n\n``` sh\n# ~/.bashrc\n\n# JDK\nexport JAVA_HOME=\"/usr/lib/jvm/java-8-openjdk-amd64\"\n\n# Android SDK\nANDROIDDIR=\"$HOME\"\nexport ANDROID_SDK_ROOT=\"$ANDROIDDIR/android-sdk-26.1.1-4333796\"\n# avdmanager, sdkmanager\nexport PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin\n# adb, logcat\nexport PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools\n# emulator\nexport PATH=$PATH:$ANDROID_SDK_ROOT/tools\n```\n\nUse the new startup script.\n\n``` sh\nsource $HOME/.bashrc\n```\n\nInstall SDK tools.\n\n``` sh\nsdkmanager 'build-tools;28.0.3' 'platform-tools' 'platforms;android-27' 'tools'\n```\n\n### Setup Node.js and Global Packages\n\n[Use NVM to install Node.js](https://github.com/nvm-sh/nvm/blob/master/README.md) (highly recommended).\n\n``` sh\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash\n```\n\nInstall and use Node.js LTS version.\n\n``` sh\nnvm install --lts\n```\n\nWe assume the version of Node.js for this project's development to be `10.x`.\n\nInstall Ionic CLI and Cordova CLI.\n\n``` sh\nnpm install -g ionic cordova native-run\n```\n\n`native-run` is required if you want to [run the app in mobile devices with Cordova](#deploy-app-to-android-devices).\n\n\u003e You do **NOT** have to use `sudo` to install global NPM packages if you install Node.js and NPM with NVM.\n\n### Download and Install Lifebox Mobile Client\n\nClone project and check to `feature-migration-ionic4` branch.\n\n``` sh\ngit clone git@gitlab.com:DT42/numbers/numbers-mobile-client.git\ncd numbers-mobile-client\ngit checkout feature-migration-ionic4\n```\n\nInstall NPM packages.\n\n``` sh\nnpm install\n```\n\n### `ionic info`\n\n``` txt\nIonic:\n\n   Ionic CLI                     : 5.2.1 (/home/seanwu/.nvm/versions/node/v10.16.0/lib/node_modules/ionic)\n   Ionic Framework               : @ionic/angular 4.6.0\n   @angular-devkit/build-angular : 0.13.9\n   @angular-devkit/schematics    : 7.3.9\n   @angular/cli                  : 7.3.9\n   @ionic/angular-toolkit        : 1.5.1\n\nCordova:\n\n   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)\n   Cordova Platforms : not available\n   Cordova Plugins   : not available\n\nUtility:\n\n   cordova-res : not installed\n   native-run  : 0.2.7\n\nSystem:\n\n   Android SDK Tools : 26.1.1 (/home/seanwu/android-sdk-26.1.1-4333796)\n   NodeJS            : v10.16.0 (/home/seanwu/.nvm/versions/node/v10.16.0/bin/node)\n   npm               : 6.9.0\n   OS                : Linux 4.18\n```\n\n## Run the App with Hot-Reload\n\n### Run in Browser\n\n``` sh\nionic serve\n```\n\n\u003e Run in a browser would cause errors due to the lack of mobile API.\n\n### Run in Mobile\n\nThere are 2 different ways to run the app on mobile devices.\n\n#### [Ionic DevApp](https://ionicframework.com/docs/building/running)\n\nUse [Ionic DevApp](https://ionicframework.com/docs/building/running) to run the app. If the app calls any native functionality, DevApp can handle this and return the correct native implementation. You do not have to install or configure complicated Native SDKs. Also, you do not have to use USB to debug the mobile devices.\n\n#### [Deploy App to Android Devices](https://ionicframework.com/docs/building/android#running-with-cordova)\n\nMake sure your devices are connected via USB with debugging mode enabled.\n\nRun the following to start a long-running CLI process that boots up a live-reload server.\n\n``` sh\nionic cordova run android -l\n```\n\n## Use of Ionic CLI\n\n**Please use Ionic CLI to generate pages, services, directives, etc. to keep the project structure consistent.**\n\n## Issues and Suggestion\n\n1. `tour.page.ts` 排版出問題。可能需要重新設計 SCSS。\n1. **_WORKAROUND_**: `cordova-plugin-background-geolocation` v^3.0.3 has the ![GitHub issue/pull request detail](https://img.shields.io/github/issues/detail/state/mauron85/cordova-plugin-background-geolocation/553.svg), and thus we cannot build or run on Android with Cordova. Currently, we use [this workaround](https://github.com/mauron85/cordova-plugin-background-geolocation/issues/553#issuecomment-507505198) to fix the problem. We should update this plugin after this issue has been closed.\n1. Ugly Ionic-Creator-generated IDs should be eliminated.\n1. Page name choice: record center (current one) or control center (better consistency)?\n1. `href-inappbrowser=\"/signup\"` in `login.html` does not work.\n1. `datetime.service.ts` uses a string comparison to check object type, which might be a bad idea.\n1. in `weather.service.ts`, `getWeatherByLocation()` using possibly non-exist string-literal (`'main'`) to access `Response` object. Search `tslint:disable-next-line: no-string-literal` to find them.\n1. in `airquality.service.ts`, `getAirQualityByLocation()` using possibly non-exist string-literal (`'main'`) to access `Response` object. Search `tslint:disable-next-line: no-string-literal` to find them.\n1. the page `account-setting` should be renamed as `account-settings`.\n1. modulize page components. E.g. home, journal-daily-report, profile pages.\n1. menu or back button in the login page. 需要 App 頁面的狀態圖來確定設計。\n1. improve page (routing) structure.\n1. how to share: `SharePopUpPage` or `SocialSharing`?\n1. make injectable private in components.\n\n## Testing Notes\n\n1. Do **NOT** try to import `AppModule` in each `spec.ts` file, though it can make sure every service is provided, your tests have to reload **everything** every time, and the state of each test becomes hugely complex.\n1. Because both [ionic-native-mocks](https://github.com/chrisgriffith/ionic-native-mocks) and [ionic-mocks](https://github.com/stonelasley/ionic-mocks) have not yet supported Ionic 4, we build our Ionic native mocks in `src/mocks`.\n1. If you use `ReactiveFormModule` in component, you need to import `ReactiveFormModule` and `IonicModule.forRoot()` in `spec.ts`.\n1. If you use `\u003cion-back-button\u003e` in component and import `IonicModule.forRoot()` in `spec.ts`, you need to import `RouterTestingModule` in `spec.ts`. Rationale: `IonicModule.forRoot()` is the ngModule to make any `\u003cion-*\u003e` directive work. When you use `ReactiveFormModule` to create form, you have to make sure `\u003cion-input\u003e` is working, and thus, import `IonicModule.forRoot()` as well. Furthermore, due to `\u003cion-back-button\u003e` is working by importing `IonicModule.forRoot()`, you need to import `RouterTestingModule` for the provider of `Location` which is required for any routing behavior.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumbersprotocol%2Flifebox-legacy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumbersprotocol%2Flifebox-legacy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumbersprotocol%2Flifebox-legacy/lists"}