{"id":22358797,"url":"https://github.com/darrarski/darrarski-app","last_synced_at":"2025-04-13T08:33:25.549Z","repository":{"id":194331373,"uuid":"684649641","full_name":"darrarski/darrarski-app","owner":"darrarski","description":"iOS \u0026 macOS SwiftUI application about my work and services","archived":false,"fork":false,"pushed_at":"2025-03-13T01:19:29.000Z","size":21416,"stargazers_count":69,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T00:12:13.711Z","etag":null,"topics":["composable-architecture","example-app","ios","macos","swift","swiftui","tca"],"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/darrarski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"darrarski","buy_me_a_coffee":"darrarski"}},"created_at":"2023-08-29T15:14:57.000Z","updated_at":"2025-03-13T01:19:32.000Z","dependencies_parsed_at":"2024-02-08T15:29:46.061Z","dependency_job_id":"e25143c4-c2b4-4ae6-b494-8c5fe7aa4305","html_url":"https://github.com/darrarski/darrarski-app","commit_stats":null,"previous_names":["darrarski/darrarski-app"],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrarski%2Fdarrarski-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrarski%2Fdarrarski-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrarski%2Fdarrarski-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrarski%2Fdarrarski-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darrarski","download_url":"https://codeload.github.com/darrarski/darrarski-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248684322,"owners_count":21145056,"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":["composable-architecture","example-app","ios","macos","swift","swiftui","tca"],"created_at":"2024-12-04T15:17:45.562Z","updated_at":"2025-04-13T08:33:25.519Z","avatar_url":"https://github.com/darrarski.png","language":"Swift","funding_links":["https://github.com/sponsors/darrarski","https://buymeacoffee.com/darrarski","https://www.buymeacoffee.com/darrarski"],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"Projects/App/DarrarskiApp/Resources/Assets.xcassets/AppIcon.appiconset/Mac 128pt 2x.png\" height=\"128\" align=\"right\"\u003e Darrarski.app\n\n![Swift v5.10](https://img.shields.io/badge/swift-v5.10-orange.svg)\n![platforms iOS, macOS](https://img.shields.io/badge/platforms-iOS,_macOS-blue.svg)\n\nHello, my name is Dariusz and this is the iOS \u0026 macOS SwiftUI application about my work and services.\n\n\u003c!-- [\u003cimg src=\"web/assets/appstore.png\" width=\"200\" alt=\"Download on the App Store\"\u003e](https://apps.apple.com/app/darrarski/id6463758169) --\u003e\n[\u003cimg src=\"web/assets/testflight.png\" width=\"200\" alt=\"Available on TestFlight\"\u003e](https://testflight.apple.com/join/sGoIvYtI) \n\n\u003cimg src=\"web/assets/darrarski-app-no-icon-1280x640.png\" alt=\"Darrarski.app screenshots\"\u003e\n\n## 📖 Documentation\n\nDarrarski.app is as an example of a modular iOS \u0026 macOS application built with [Composable Architecture](https://github.com/pointfreeco/swift-composable-architecture) and [Tuist](https://tuist.io). \n\n### Workspace structure\n\n\u003cdetails open\u003e\n\u003csummary\u003eDependency graph\u003c/summary\u003e\n\n![Darrarski.app dependency graph](web/assets/graph.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDependency graph with tests\u003c/summary\u003e\n\n![Darrarski.app dependency graph with tests](web/assets/graph-tests.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDependency graph with external dependencies\u003c/summary\u003e\n\n![Darrarski.app dependency graph with external dependencies](web/assets/graph-external.png)\n\n\u003c/details\u003e\n\nThe Xcode workspace and projects are generated from manfest files (like `Workspace.swift` and `Projects.swift`).\n\n### App modules\n\nIndividual features of the application are implemented as frameworks.\n\n| Module | Description |\n|:--|:--|\n| [AppFeature](Projects/App/AppFeature) | Root feature of the application. Manages application state and presents split view or tabs navigation UI, depending on platform and device.\n| [AppShared](Projects/App/AppShared) | Contains source code shared between other libraries.\n| [ContactFeature](Projects/App/ContactFeature) | Contains contact screen UI, as well as the logic responsible for loading contact information from the backend.\n| [FeedFeature](Projects/App/FeedFeature) | Implements social feed screen, based on posts fetched from Mastodon. Presents statuses and boosts with attachments.\n| [Mastodon](Projects/App/Mastodon) | Provides models and API client for Mastodon network. Implements only a small subset of the API endpoints, that are needed by the app. Internally it uses swift macros for code generation (defined in [MastodonMacros](Projects/App/MastodonMacros) and [MastodonMacrosPlugin](Projects/App/MastodonMacrosPlugin)).\n| [ProjectFeature](Projects/App/ProjectsFeature) | Implements screen with a list of projects. Each project, with some basic information about it, is presented on a grid. The list is fetched from the backend.\n\n### Architecture\n\nThe application and its components are built using [Composable Architecture](https://github.com/pointfreeco/swift-composable-architecture). Each component of the application contains a state and action definition, as well as a reducer that mutates the state and handles side effects. The `State` clearly defines a data set the given component is operating on. The `Action` provides an interface for all events that the component is handling, like user interactions or receiving a response to a network request.\n\n![Screenshot of Xcode with source code of contact reducer](web/assets/xcode-contact-reducer.png)\n\n### Previews\n\nEach view of the application is implemented in SwiftUI and comes with a preview. The preview is driven by a real `Store` and `Reducer`, but the application dependencies are mocked up for preview purposes. For example, an API client fetch-endpoint dependency immediately returns a JSON file loaded from disk, instead of performing an actual network request. This behavior allows for easier UI development in Xcode, in isolation from the outside world.\n\n![Screenshot of Xcode running feed screen preview](web/assets/xcode-preview-feed.png)\n\n### App icon\n\nThe workspace contains a project named `AppIcon`. It provides `AppIcon` framework with SwiftUI implementation of the icon view. The included preview allows you to see how the icon will look on different platforms. The package also contains an executable target `AppIconExport`. It's used to render the icon and save it as assets for the app. This way of creating an app icon is possible thanks to [SwiftUI App Icon Creator](https://github.com/darrarski/swiftui-app-icon-creator).\n\n![Screenshot of Xcode running app icon preview](web/assets/xcode-preview-app-icon.png)\n\n### Tests\n\nEvery feature of the application is covered by unit tests. Each module can be tested in isolation, using the provided build scheme with the same name as the module, like `AppFeature`. All tests contained in the workspace can be run using `DarrarskiApp-Workspace` build scheme.\n\n![Screenshot of Xcode test results](web/assets/xcode-test-results.png)\n\n### Telemetry\n\nThe application uses [TelemetryDeck](https://telemetrydeck.com/) to collect anonymous information about how it's being used by the users.\n\n\u003e TelemetryDeck helps app and web developers improve their product by supplying immediate, accurate usage data while users use their app. And the best part: It's all anonymized so users' data stays private!\n\nThe fact that all events that can occur in the application are defined by the reducer's actions powers the logic responsible for producing telemetry signals. [`AppTelemetryReducer`](Projects/App/AppFeature/Sources/AppTelemetryReducer.swift) is responsible for describing each action in a privacy-aware way and then sending a telemetry signal.\n\n![Screenshot of Xcode console with telemetry logs](web/assets/xcode-telemetry-logs.png)\n\n\u003e [!WARNING]  \n\u003e The AppID key required to communicate with TelemetryDeck is **NOT** included in the repository. If you want to use telemetry, you need to set your own key in `Projects/App/app-secrets/Sources/AppSecrets/Secrets/TelemetryDeckAppID`.\n\n### CI/CD\n\nThe project is integrated with [Xcode Cloud](https://developer.apple.com/xcode-cloud/). There are two workflows defined: one that runs tests for each pull request, and one that archives the app and deploys it to TestFlight. For the deployment lane, the [ci_post_xcodebuild](ci_scripts/ci_post_xcodebuild.sh) script does some extra work. Version tag (e.g. `v1.0.0-123`) is added to the repository, and `WhatToTest` file is created with commit messages since the last tag. This file is automatically picked up by Xcode Cloud and used as release notes on App Store Connect.\n\n![Screenshot of Xcode with cloud workflows](web/assets/xcode-cloud-deploy.png)\n\n## 🛠 Develop\n\n- Use Xcode (version ≥ 16.0).\n- Clone the repository or create a fork \u0026 clone it.\n- Run `setup_for_development.sh` script to generate Xcode workspace and set everything up for development:\n    ```sh\n    $ scripts/setup_for_development.sh --open\n    ```\n- Use the `DarrarskiApp` scheme for building and running the app.\n- Use other schemes to build or test individual libraries in isolation.\n- If you want to contribute, create a pull request containing your changes or bug fixes. Make sure to include tests for new/updated code.\n\n### Development scripts\n\nThe repository contains several scripts for ease of development. These are located inside [`scripts`](scripts) directory. You just need to run [`setup_for_development.sh`](scripts/setup_for_development.sh) once, and it should set everything up for development. Other scripts help to clean up the workspace, generate dependency graphs, etc. Each of the executable scripts accepts `--help` flag that prints info about the script and its usage.\n\n```sh\n$ scripts/setup_for_development.sh --help\nOVERVIEW: Prepares everything needed for development.\n\nUSAGE: setup_for_development.sh [options]\n\nOPTIONS:\n  -o, --open      Open Xcode workspace.\n  -h, --help      Show help information.\n```\n\n## ☕️ Do you like the project?\n\nI would love to hear if you like my work. I can help you apply any of the solutions used in this repository in your app too! Feel free to reach out to me, or if you just want to say \"thanks\", you can buy me a coffee.\n\n\u003ca href=\"https://www.buymeacoffee.com/darrarski\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"60\" width=\"217\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\n## 📄 License\n\nCopyright © 2023 Dariusz Rybicki Darrarski\n\nLicense: [MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrarski%2Fdarrarski-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarrarski%2Fdarrarski-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrarski%2Fdarrarski-app/lists"}