{"id":27203247,"url":"https://github.com/r8vnhill/echo-app-swift","last_synced_at":"2025-07-31T06:33:22.013Z","repository":{"id":286205916,"uuid":"958902778","full_name":"r8vnhill/echo-app-swift","owner":"r8vnhill","description":"📦 A SwiftPM-based CLI project for learning modular design in Swift — part of the Software Library Design and Implementation (DIBS) course. Includes a basic setup and a multi-module structure.","archived":false,"fork":false,"pushed_at":"2025-04-04T23:27:23.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T22:43:00.011Z","etag":null,"topics":["cli","course-material","dibs-course","education","educational","modular-design","multi-module","software-libraries","software-library","starter-project","swift","swift-package-manager","swiftpm","teaching"],"latest_commit_sha":null,"homepage":"https://dibs.pages.dev","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r8vnhill.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":"2025-04-02T00:29:25.000Z","updated_at":"2025-04-04T23:29:42.000Z","dependencies_parsed_at":"2025-04-09T22:29:32.095Z","dependency_job_id":null,"html_url":"https://github.com/r8vnhill/echo-app-swift","commit_stats":null,"previous_names":["r8vnhill/echo-app-swift"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/r8vnhill/echo-app-swift","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Fecho-app-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Fecho-app-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Fecho-app-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Fecho-app-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r8vnhill","download_url":"https://codeload.github.com/r8vnhill/echo-app-swift/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r8vnhill%2Fecho-app-swift/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267998018,"owners_count":24178437,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","course-material","dibs-course","education","educational","modular-design","multi-module","software-libraries","software-library","starter-project","swift","swift-package-manager","swiftpm","teaching"],"created_at":"2025-04-09T22:29:15.622Z","updated_at":"2025-07-31T06:33:22.003Z","avatar_url":"https://github.com/r8vnhill.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EchoAppSwift\n\n![Swift](https://img.shields.io/badge/swift-6.1%2B-orange?logo=swift)\n![License: BSD-2](https://img.shields.io/badge/license-BSD--2--Clause-green.svg)\n![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macOS%20%7C%20windows-lightgrey)\n[![Lesson (ES) – Basic Project](https://img.shields.io/badge/ver%20lecci%C3%B3n-proyecto%20b%C3%A1sico-blueviolet)](https://dibs.pages.dev/docs/build-systems/init/swift/)\n[![Lesson (ES) – Modular Project](https://img.shields.io/badge/ver%20lecci%C3%B3n-proyecto%20modular-blueviolet)](https://dibs.pages.dev/docs/build-systems/modular-design/swift/)\n\nThis repository accompanies two lessons on how to create and structure Swift projects using **Swift Package Manager (SwiftPM)**.\n\n\u003e 📘 **The lessons are written in Spanish**, but the repository and its structure are fully in English for broader accessibility:\n\u003e\n\u003e - [Lesson 1 – Basic Project Setup](https://dibs.pages.dev/docs/build-systems/init/swift/)\n\u003e - [Lesson 2 – Modular Project Design](https://dibs.pages.dev/docs/build-systems/modular-design/swift/)\n\n## 📁 Project Structure\n\nThe project evolves in two stages:\n\n1. **Initial structure**: A single Swift executable created with `swift package init --type executable`.\n2. **Modular design**: The project is split into:\n   - `App`: An executable module.\n   - `Lib`: A reusable library module.\n   - `LibTests`: A unit test module for `Lib`.\n\n```\nEchoAppSwift/\n├── Package.swift\n├── Sources\n│   ├── App\n│   │   └── main.swift\n│   └── Lib\n│       └── Echo.swift\n├── Tests\n│   └── LibTests\n│       └── EchoTests.swift\n└── README.md\n```\n\nThis structure follows SwiftPM conventions strictly. Each folder name must match the declared targets in `Package.swift`.\n\n## 🧪 What does it do?\n\nYou can run the app from the root with:\n\n```bash\nswift run App Kanna Kenji Friend\n```\n\nExpected output:\n\n```text\nKanna\nKenji\nFriend\n```\n\n## 📦 What's inside?\n\n- `Sources/Lib/Echo.swift`:  \n  Defines a simple public function:\n\n  ```swift\n  public func echo(_ message: String) -\u003e String {\n      return message\n  }\n  ```\n\n- `Sources/App/main.swift`:  \n  Entry point that uses `echo`:\n\n  ```swift\n  import Lib\n\n  func main() {\n      let args = CommandLine.arguments.dropFirst()\n      for arg in args {\n          print(echo(arg))\n      }\n  }\n\n  main()\n  ```\n\n## 💡 Learn More\n\nThese lessons guide you through:\n\n- Installing Swift on Linux, macOS, or Windows.\n- Using `swift package init` to bootstrap a project.\n- Understanding `Package.swift` and SwiftPM conventions.\n- Refactoring to a modular structure with a library and tests.\n- Running and organizing Swift projects from the terminal.\n\nAlthough written in Spanish, the code is accessible and the directory structure is self-explanatory.\n\n## 🔗 References\n\n- [🌐 Swift Package Manager Documentation](https://www.swift.org/documentation/package-manager/)\n- [📰 Modular Project Structure with SwiftPM](https://santoshbotre01.medium.com/modular-project-structure-with-swift-package-manager-spm-c81fb62c8619)\n- [🎥 How to Make a Swift Command Line Tool – YouTube](https://youtu.be/w7HvY29P9A4)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr8vnhill%2Fecho-app-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr8vnhill%2Fecho-app-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr8vnhill%2Fecho-app-swift/lists"}