{"id":19974405,"url":"https://github.com/daviddevmx31/mv-todoapp","last_synced_at":"2026-05-10T13:48:21.678Z","repository":{"id":216228810,"uuid":"740784911","full_name":"DavidDevMx31/mv-todoApp","owner":"DavidDevMx31","description":"Example of a Todo App using MV architecture in SwiftUI","archived":false,"fork":false,"pushed_at":"2024-02-21T23:13:02.000Z","size":4329,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T09:42:41.062Z","etag":null,"topics":["architectural-patterns","swift","swiftui"],"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/DavidDevMx31.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-01-09T03:59:19.000Z","updated_at":"2024-01-09T04:13:21.000Z","dependencies_parsed_at":"2024-11-13T03:25:00.632Z","dependency_job_id":null,"html_url":"https://github.com/DavidDevMx31/mv-todoApp","commit_stats":null,"previous_names":["daviddevmx31/mv-todoapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidDevMx31%2Fmv-todoApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidDevMx31%2Fmv-todoApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidDevMx31%2Fmv-todoApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidDevMx31%2Fmv-todoApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidDevMx31","download_url":"https://codeload.github.com/DavidDevMx31/mv-todoApp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241411428,"owners_count":19958746,"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":["architectural-patterns","swift","swiftui"],"created_at":"2024-11-13T03:14:56.514Z","updated_at":"2026-05-10T13:48:16.638Z","avatar_url":"https://github.com/DavidDevMx31.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MV-ToDo App for iOS\n\n## Overview\n\nThis ToDo app allows you to manage and organize your daily tasks. You can add, edit, and delete tasks and mark them as completed.\n\nThe project is developed using SwiftUI following the MV pattern. The data is stored in memory and not persists between launches.\n\n## Installation\n\n1. Clone the repository: `git clone https://github.com/DavidDevMx31/mv-todoApp`\n2. Open the project in Xcode.\n3. Launch the simulator or connect your device.\n4. Run the app.\n\n## Usage\n\n### Adding a task\n\nhttps://github.com/DavidDevMx31/mv-todoApp/assets/67614342/cb0e1d7c-e26b-4508-aa8b-78df81ef9820\n\n1. Launch the app\n2. Tap on + icon\n3. Add task data\n\n### Delete task\n\nhttps://github.com/DavidDevMx31/mv-todoApp/assets/67614342/36d6b295-65f9-4965-8fda-7307d82c78b3\n\n1. Swipe left the row you would like to delete.\n2. Tap on the trash icon.\n\n### Mark task as done\n\nhttps://github.com/DavidDevMx31/mv-todoApp/assets/67614342/0250ec3b-4e5a-44e1-b4c2-043fa9aca919\n\nMarking a task as done can be performed in two ways:\n\n1. Swipe left on the desired task.\n2. Tap on the check icon ✅.\n\nOr:\n1. Full swipe left on the task you would like to mark as done.\n\n### Edit list name\n\nhttps://github.com/DavidDevMx31/mv-todoApp/assets/67614342/0801b40f-4cdf-45e2-93e9-a760fef3efd4\n\n1. Tap on the pencil icon on the navigation bar.\n2. Enter the new name for the list (it cannot be empty).\n\n### Clear list\n\nhttps://github.com/DavidDevMx31/mv-todoApp/assets/67614342/3da2d249-28f8-40df-9585-f35a21d009bd\n\n1. Tap on the pencil icon on the navigation bar.\n2. Tap on the 'Vaciar lista' option.\n3. The app will show an alert asking for confirmation.\n4. Tap 'Vaciar'.\n   \n## Documentation\n\nThe project structure follows the MV pattern. This is not the official name of the pattern; some refer to it as the State Pattern, while others call it the Model-View Pattern.\n\nAlthough using the MVVM (Model-View-ViewModel) pattern has been recommended since the introduction of SwiftUI, it is common to feel that implementing projects under this paradigm adds unnecessary complexity. The MV pattern draws inspiration from principles used in other declarative paradigm platforms, such as React and Flutter, which have greater maturity, having appeared years before SwiftUI.\n\nThis pattern is based on the following fundamental concepts:\n1. **Views are also view-models in SwiftUI**:\nDue to SwiftUI views' built-in binding, they can also function as view models; therefore, it is not necessary to add extra complexity by introducing a view model for each view.\n2. **Models are structs (value types)**:\nModels are defined as structs, which offer inherent benefits of immutability and efficient data handling.\n3. **Access to models through ObservableObject**:\nAccess to models is exclusively done through an ObservableObject. This serves as the gateway to information, ensuring that the information is always in a valid and consistent state. The name given to this gateway varies; some call it Store, while others use Aggregate Root or Aggregate Model.\n\nThe fundamental idea of this pattern is that the user will perform actions that generate changes or mutations in the app's state. Changes in the app's state will prompt the UI to update to reflect the most recent state of the information.\n\nHere is a brief description of each component in the MV pattern:\n\n- **Model (Model)**: Represents the data.\n- **View (View)**: Displays the user interface and manages interaction.\n- **Aggregate Root**: Encapsulates and protects the internal state of the information. As the business logic becomes more complex, we might need to split it into many Aggregate Roots, to preserve the Separation of Concerns principle. Then, we can use them together to achieve the desired functionality.\n\n## Technologies\n- SwiftUI\n- Swift\n\n## Requirements\n- Minimum deploy target: iOS 16.2\n\n## License\n\nThis repository is under the MIT license agreement. Check [LICENSE](LICENSE) for further information.\n\n## To-do\n- Add on disk storage to persist data between launches.\n- Add unit tests.\n- Add end-to-end tests.\n- Allow to edit task data.\n\n## Inspiration\n\nThis implementation is based on the concepts from the MV Design Pattern in iOS - Build SwiftUI Apps Apple's Way course by Mohammad Azam. You can find the course at this [link](https://www.udemy.com/share/109yMo3@Ep4Nq6ydrVww-yT9Hs9JZpS8HzBldzGi0ukOknQ2taKnxlhgO1DhGrHh4T8ayhp4/).\n\nFor further information, you can also check this [blog post](https://azamsharp.com/2022/08/09/intro-to-mv-state-pattern.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaviddevmx31%2Fmv-todoapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaviddevmx31%2Fmv-todoapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaviddevmx31%2Fmv-todoapp/lists"}