{"id":24213628,"url":"https://github.com/mushthak/tddswiftdatamvvm","last_synced_at":"2026-04-29T14:03:33.352Z","repository":{"id":268147866,"uuid":"903459317","full_name":"mushthak/TDDSwiftDataMVVM","owner":"mushthak","description":"TDD approach for utilizing SwiftData with MVVM pattern in SwiftUI","archived":false,"fork":false,"pushed_at":"2025-02-20T10:55:34.000Z","size":293,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T23:05:42.490Z","etag":null,"topics":["clean-architecture","mvvm","solid-principles","swiftdata","swiftui","tdd"],"latest_commit_sha":null,"homepage":"https://medium.com/@musmein/balancing-swiftdata-and-mvvm-in-swiftui-7e7490ec1b95","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/mushthak.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,"zenodo":null}},"created_at":"2024-12-14T16:57:40.000Z","updated_at":"2025-02-20T10:55:37.000Z","dependencies_parsed_at":"2025-01-21T08:21:27.399Z","dependency_job_id":"39df429c-2f07-4c1d-828c-c652458b103c","html_url":"https://github.com/mushthak/TDDSwiftDataMVVM","commit_stats":null,"previous_names":["mushthak/tddswiftdatamvvm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mushthak/TDDSwiftDataMVVM","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushthak%2FTDDSwiftDataMVVM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushthak%2FTDDSwiftDataMVVM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushthak%2FTDDSwiftDataMVVM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushthak%2FTDDSwiftDataMVVM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mushthak","download_url":"https://codeload.github.com/mushthak/TDDSwiftDataMVVM/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushthak%2FTDDSwiftDataMVVM/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32428622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"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":["clean-architecture","mvvm","solid-principles","swiftdata","swiftui","tdd"],"created_at":"2025-01-14T03:17:19.286Z","updated_at":"2026-04-29T14:03:33.334Z","avatar_url":"https://github.com/mushthak.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI-macOS](https://github.com/mushthak/TDDSwiftDataMVVM/actions/workflows/CI-macOS.yml/badge.svg)](https://github.com/mushthak/TDDSwiftDataMVVM/actions/workflows/CI-macOS.yml)\n[![CI-iOS](https://github.com/mushthak/TDDSwiftDataMVVM/actions/workflows/CI-iOS.yml/badge.svg)](https://github.com/mushthak/TDDSwiftDataMVVM/actions/workflows/CI-iOS.yml)\n\n# TDDSwiftDataMVVM\n\n## Application Overview\n\nTDDSwiftDataMVVM is an iOS application that demonstrates the use of Test-Driven Development (TDD) with the Model-View-ViewModel (MVVM) architecture pattern. The application is built using Swift and leverages SwiftUI for the user interface. It showcases best practices for building maintainable and testable iOS applications.\n\n### Features\n\n- **MVVM Architecture**: Separation of concerns by dividing the application into Model, View, and ViewModel layers.\n- **Test-Driven Development**: Writing tests before implementing the actual functionality to ensure code quality and reliability.\n- **SwiftUI**: Modern declarative framework for building user interfaces across all Apple platforms.\n- **Swift Data**: Persistent storage for managing the application's data model.\n- **Unit Testing**: Comprehensive unit tests to validate the functionality of the ViewModels and Models.\n\n\n### License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n# User Stories:\n\n## 1. Customer requests to see user list\n\n### Narrative #1:\n\n```\nAs customer\nI want the app to show the latest saved user list\nSo I can view the whole list of users I have \n```\n\n#### Acceptance criterias:\n```\nGiven there’s a cached version of the users\n When the customer requests to see the users\n Then the app should display the saved user list\n ```\n\n  ```\nGiven the cache is empty\n When the customer requests to see the users\n Then the app should show empty list\n ```\n\n## 2. Customer requests to add new user\n\n### Narrative #1:\n\n```\nAs customer\nI want the app to allow saving new user detail\nSo I can view them later\n```\n\n#### Acceptance criterias:\n```\nGiven there’s a no cached version of the users\n When the customer adds a new user\n Then the app should display the latest user saved in the list\n ```\n\n```\nGiven there’s a cached version of the users\n When the customer adds a new user\n Then the app should display whole users including the last added one\n ```\n\n\n## 3. Customer requests to delete a user\n\n### Narrative #1:\n\n```\nAs customer\nI want the app to allow deleting an existing user\nSo I can remove them from the list\n```\n\n#### Acceptance criterias:\n\n```\nGiven there’s more than one cached version of the users\n When the customer deletes a user\n Then the app should list the remaining users\n ```\n\n```\nGiven there’s more than one cached version of the users\n When the customer deletes a user\n Then the app should show empty list\n ```\n---\n# Use cases\n\n### Load Users From Cache Use Case\n\n#### Primary course:\n```\n1. Execute \"Load users\" command.\n2. System retrieves user data from cache.\n4. System creates user list from cached data.\n5. System delivers user list.\n```\n\n#### Retrieval error course (sad path):\n```\n1. System delivers error.\n```\n\n#### Empty cache course (sad path):\n``` \n1. System delivers empty users.\n```\n\n---\n\n### Cache Users Use Case\n\n#### Data:\n```\nUser\n```\n\n#### Primary course (happy path):\n```\n1. Execute \"Save user\" command with above data.\n3. System encodes users.\n4. System saves new cache data.\n5. System delivers success message.\n```\n\n#### Saving error course (sad path):\n```\n1. System delivers error.\n```\n\n---\n\n### Delete User Use Case\n\n#### Data:\n```\nUser\n```\n\n#### Primary course (happy path):\n```\n1. Execute \"Remove user\" command with above data.\n2. Systen deletes the user data from the cache\n3. System delivers success message.\n```\n\n#### Deleting error course (sad path):\n```\n1. System delivers error.\n```\n---\n## Architecture\n\n![Architecure](Architecture.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushthak%2Ftddswiftdatamvvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmushthak%2Ftddswiftdatamvvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushthak%2Ftddswiftdatamvvm/lists"}