{"id":25832769,"url":"https://github.com/ompreetham/betterrest","last_synced_at":"2026-05-11T21:31:46.014Z","repository":{"id":240438200,"uuid":"802634580","full_name":"OmPreetham/BetterRest","owner":"OmPreetham","description":"BetterRest is a SwiftUI application that helps users determine the optimal bedtime based on their desired wake-up time, amount of sleep needed, and daily coffee intake. The app leverages CoreML to make predictions about the best time to go to bed. Designed for 100DaysOfSwiftUI","archived":false,"fork":false,"pushed_at":"2024-05-18T21:03:25.000Z","size":106,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T09:10:50.798Z","etag":null,"topics":["100daysofswiftui","apple","apple-ios","betterrest","core-ml","create-ml","hackingwithswift","ios","ios17","ios18","mlmodel","swift","swiftui","swiftui-learning","swiftuicomponents"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OmPreetham.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-18T20:50:13.000Z","updated_at":"2024-12-18T02:15:56.000Z","dependencies_parsed_at":"2024-05-18T21:49:06.889Z","dependency_job_id":null,"html_url":"https://github.com/OmPreetham/BetterRest","commit_stats":null,"previous_names":["ompreetham/betterrest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OmPreetham/BetterRest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmPreetham%2FBetterRest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmPreetham%2FBetterRest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmPreetham%2FBetterRest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmPreetham%2FBetterRest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OmPreetham","download_url":"https://codeload.github.com/OmPreetham/BetterRest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OmPreetham%2FBetterRest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32913550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"ssl_error","status_checked_at":"2026-05-11T17:08:45.420Z","response_time":120,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["100daysofswiftui","apple","apple-ios","betterrest","core-ml","create-ml","hackingwithswift","ios","ios17","ios18","mlmodel","swift","swiftui","swiftui-learning","swiftuicomponents"],"created_at":"2025-02-28T21:48:46.694Z","updated_at":"2026-05-11T21:31:45.996Z","avatar_url":"https://github.com/OmPreetham.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BetterRest\n\nBetterRest is a SwiftUI application that helps users determine the optimal bedtime based on their desired wake-up time, amount of sleep needed, and daily coffee intake. The app leverages CoreML to make predictions about the best time to go to bed.\n\n## Features\n\n- **Wake-up Time Picker:** Allows users to select their desired wake-up time.\n- **Sleep Amount Stepper:** Enables users to set the amount of sleep they want to get, between 4 and 12 hours.\n- **Coffee Intake Picker:** Lets users specify their daily coffee intake, from 1 to 20 cups.\n- **Sleep Time Calculation:** Uses a machine learning model to predict the optimal bedtime based on user inputs.\n\n## Screenshots\n\n![BetterRest](./screenshots/betterrest.png)\n\n## Installation\n\n1. **Clone the repository:**\n   ```sh\n   git clone https://github.com/OmPreetham/BetterRest.git\n   ```\n2. **Open the project in Xcode:**\n   ```sh\n   cd BetterRest\n   ```\n3. **open BetterRest.xcodeproj**\n   - Build and run the project:\n   - Select the target device or simulator.\n   - Press Cmd + R to build and run the application.\n\n## Usage\n\n1. **Open the BetterRest app.**\n2. **Set your desired wake-up time** using the date picker.\n3. **Adjust the amount of sleep** you want using the stepper.\n4. **Select your daily coffee intake** using the picker.\n5. The app will calculate and display the **optimal bedtime**.\n\n## Code Structure\n\n- **ContentView.swift:** Contains the main user interface and logic for the BetterRest app.\n- **SleepCalculator.mlmodel:** Machine learning model used for predicting optimal bedtime.\n\n## Contributing\n\nContributions are welcome! If you have any improvements or suggestions, please fork the repository and submit a pull request.\n\n## License\n\nThis project is licensed under the [LICENSE](LICENSE).\n\n## Acknowledgements\n\n- **Hacking with Swift** for providing the project inspiration.\n- **Apple CoreML and SwiftUI** for making this app possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fompreetham%2Fbetterrest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fompreetham%2Fbetterrest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fompreetham%2Fbetterrest/lists"}