{"id":16237034,"url":"https://github.com/nayemalam/sleepmeasureapp","last_synced_at":"2026-04-14T04:31:51.316Z","repository":{"id":229381388,"uuid":"762341211","full_name":"nayemalam/SleepMeasureApp","owner":"nayemalam","description":"A sleep mode app that allows you to view your family members sleep data; iOS and Android. Built with React Native.","archived":false,"fork":false,"pushed_at":"2024-05-02T17:58:21.000Z","size":513,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-15T00:36:39.058Z","etag":null,"topics":["android","ios","mobile","react","react-native"],"latest_commit_sha":null,"homepage":"","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/nayemalam.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-02-23T15:22:15.000Z","updated_at":"2024-05-02T17:58:24.000Z","dependencies_parsed_at":"2025-02-14T05:30:31.671Z","dependency_job_id":"b3ef4870-a4e0-4391-b2d4-d11462d46bcd","html_url":"https://github.com/nayemalam/SleepMeasureApp","commit_stats":null,"previous_names":["nayemalam/family_mode_sleep_data"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nayemalam/SleepMeasureApp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayemalam%2FSleepMeasureApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayemalam%2FSleepMeasureApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayemalam%2FSleepMeasureApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayemalam%2FSleepMeasureApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nayemalam","download_url":"https://codeload.github.com/nayemalam/SleepMeasureApp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nayemalam%2FSleepMeasureApp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31782736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","ios","mobile","react","react-native"],"created_at":"2024-10-10T13:34:05.220Z","updated_at":"2026-04-14T04:31:51.301Z","avatar_url":"https://github.com/nayemalam.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Family Mode Mobile App 🌘\nThis app, designed for family mode, enables family members to conveniently view each other's sleep data on the Pod, offering insights into the sleep habits of your family members.\n\n## Table of Contents\n- [Family Mode Mobile App 🌘](#family-mode-mobile-app-)\n  - [Table of Contents](#table-of-contents)\n  - [Screenshot](#screenshot)\n  - [How To Run](#how-to-run)\n    - [Assumptions Made](#assumptions-made)\n    - [Notes](#notes)\n    - [Troubleshooting](#troubleshooting)\n\n## Screenshot\n\u003cimg width=\"394\" alt=\"1\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/0bf6d57d-c1fe-4fd7-90a6-70b01914113c\"\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eMore screenshots\u003c/summary\u003e\n\u003cimg width=\"1001\" alt=\"2\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/1eae7ca9-1cb3-4aa0-842d-babc79ebc74f\"\u003e\n\u003cimg width=\"390\" alt=\"3\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/24d261cd-b1c6-466b-a26a-5f1c16a55db0\"\u003e\n\u003cimg width=\"997\" alt=\"4\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/e6aea2de-3bb7-4425-9374-6002341b6291\"\u003e\n\u003cimg width=\"994\" alt=\"5\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/474cf020-32cd-491e-8cfa-debca8920749\"\u003e\n\u003cimg width=\"1003\" alt=\"6\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/906dce4b-e010-469b-a411-e9b5dac94184\"\u003e\n\u003cimg width=\"1009\" alt=\"7\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/e39587fd-6ce1-4416-9372-81fc8ccd6df1\"\u003e\n\u003cimg width=\"995\" alt=\"8\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/04069939-74ff-4d53-b589-1ba5a49c41c5\"\u003e\n\u003cimg width=\"988\" alt=\"9\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/836e2235-ed0a-4e5a-abb8-55b0aa13256b\"\u003e\n\u003cimg width=\"392\" alt=\"10\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/1f956426-ba4e-46a0-b174-8ee5ba9bb0b2\"\u003e\n  \u003cimg width=\"996\" alt=\"11\" src=\"https://github.com/nayemalam/family_mode_sleep_data/assets/25883629/8b3bc140-1b37-4836-89d1-fb5e15755b10\"\u003e\n\u003c/details\u003e\n\n## How To Run\nTo run the application locally: \n\n1. Clone repo: \n```bash\ngit clone https://github.com/nayemalam/family_mode_sleep_data.git\n```\n2. cd into the folder:\n```bash\ncd family_mode_sleep_data\n```\n3. Install dependencies:\n```bash\nyarn # or yarn install\n```\n4. Install CocoaPods (for ios):\n```bash\ncd ios \u0026\u0026 pod install\n```\n5. Go back to root and run the metro server:\n```bash\nyarn start\n```\n6. Run app on ios:\n```bash\nreact-native run-ios\n```\nor\n```bash\nyarn ios # this will run iPhone 15 as the simulator specified\n```\n7. Run app on android:\n```bash\nyarn android # or react-native run-android\n```\n\n\n### Assumptions Made\n- based on the annotated example [here](https://gist.github.com/maghis/8c35fe1bb5c7810bdcc6ca389c6cd702), ignored heating\n- there could be multiple intervals of sleep data for a single day, so the data is grouped by date (`screens/Profile` -\u003e `groupedDaysByTsMap`)\n- Assumed 8 hours as deep sleep and 6 hours as light sleep (`src/components/TimeSlept`)\n- Created 3 fictitious family members locally all having an `id` attached to them (this is the challengeId), can be seen in `src/services/FamilyService.ts`\n\n### Notes\n- Dialogs are not implemented, but the UI is designed to show the dialog\n- There is a Details screen which is implemented for one type of timeseries data, but it can be extended to show other types of data (types of data can be seen in `types/index.ts` -\u003e `DetailsType`)\n- Added two tabs on the bottom, but the second tab is not necessary, it was just added to show the UI design and also to test selecting a different family member\n- For \"tnt\" I just counted the total number of tnt's there are, technically it should be extended to show how many were tosses and how many were turns, at this moment there is a Details view that shows at what time the tnt's happened and how many during that time\n- Instead of adding a percentage of sleep fitness, I opted to create a sleep fitness status (`src/utils/index.ts` -\u003e `sleepScoreLabel`), where 0-60 is \"Poor\", 61-80 is \"Fair\", 81-90 is \"Good\" and 91-100 is \"Excellent\" - I feel that this might provide the user better understanding and feedback\n- No calendar picker - the days were implemented in `src/components/CircularDayScoreSelector` - though it would be better to have a calendar picker\n- The timeframe selector (`src/components/TimeframeSelector`) on the top (DAYS, WEEKS, MONTHS, YEARS) is not implemented, but the UI is designed to show the selector\n- There is definitely a lot of places for improvement, but I tried to keep it focused on the main features laid out on this [figma](https://www.figma.com/file/wDc9mTgq4Px1CKn57mNkrQ/Mobile-Eng-Take-Home?node-id=0%3A1)\n- It will always show the current day's data and also handle when there is no data\n- Built with the latest version of React Native (0.73.4) as of today's date (Feb 28, 2024)\n\n### Troubleshooting\nSometimes \n```bash\nyarn start --reset-cache\n```\nis needed to clear the cache and then run `yarn ios` or `yarn android` again\n\n- if android simulator fails to boot up and it gives this error: \"INSUFFICIENT STORAGE\", then you can try the following:\n  - open Android Studio\n  - Under \"More Actions\" dropdown, click \"AVD Manager\"\n  - Select your device (in my case it was \"Pixel 3a API 31 arm64-v8a\")\n  - There is a dropdown on the right, click it and select \"Edit\"\n  - Select \"Show Advanced Settings\", scroll down and adjust the \"Memory and Storage\" -\u003e \"RAM\" to \"2048\" or back to \"1024\" and then click \"Finish\"\n  - restart the simulator\n- If above doesn't work, you can click the dropdown on the right and select \"Wipe Data\" or \"Cool Boot Now\" and then restart the simulator\n\n- if ios simulator causes any issues, you can try the following:\n   - General -\u003e Storage Settings -\u003e Developer -\u003e Delete Cache\n\nIf all else doesn't work, I am more than happy to screen share/record the application and flow for both ios and android simulators.\n___\n\n\nThis is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).\n\n# Getting Started (React Native Generated README)\n\n\u003e**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till \"Creating a new application\" step, before proceeding.\n\n## Step 1: Start the Metro Server\n\nFirst, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.\n\nTo start Metro, run the following command from the _root_ of your React Native project:\n\n```bash\n# using npm\nnpm start\n\n# OR using Yarn\nyarn start\n```\n\n## Step 2: Start your Application\n\nLet Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:\n\n### For Android\n\n```bash\n# using npm\nnpm run android\n\n# OR using Yarn\nyarn android\n```\n\n### For iOS\n\n```bash\n# using npm\nnpm run ios\n\n# OR using Yarn\nyarn ios\n```\n\nIf everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.\n\nThis is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.\n\n## Step 3: Modifying your App\n\nNow that you have successfully run the app, let's modify it.\n\n1. Open `App.tsx` in your text editor of choice and edit some lines.\n2. For **Android**: Press the \u003ckbd\u003eR\u003c/kbd\u003e key twice or select **\"Reload\"** from the **Developer Menu** (\u003ckbd\u003eCtrl\u003c/kbd\u003e + \u003ckbd\u003eM\u003c/kbd\u003e (on Window and Linux) or \u003ckbd\u003eCmd ⌘\u003c/kbd\u003e + \u003ckbd\u003eM\u003c/kbd\u003e (on macOS)) to see your changes!\n\n   For **iOS**: Hit \u003ckbd\u003eCmd ⌘\u003c/kbd\u003e + \u003ckbd\u003eR\u003c/kbd\u003e in your iOS Simulator to reload the app and see your changes!\n\n## Congratulations! :tada:\n\nYou've successfully run and modified your React Native App. :partying_face:\n\n### Now what?\n\n- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).\n- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).\n\n# Troubleshooting\n\nIf you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.\n\n# Learn More\n\nTo learn more about React Native, take a look at the following resources:\n\n- [React Native Website](https://reactnative.dev) - learn more about React Native.\n- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.\n- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.\n- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.\n- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnayemalam%2Fsleepmeasureapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnayemalam%2Fsleepmeasureapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnayemalam%2Fsleepmeasureapp/lists"}