{"id":32396059,"url":"https://github.com/iletai/basenavigationstack","last_synced_at":"2025-10-25T06:58:04.072Z","repository":{"id":213202985,"uuid":"731518165","full_name":"iletai/BaseNavigationStack","owner":"iletai","description":"Build a navigation controller with Navigation Stack SwiftUI ","archived":false,"fork":false,"pushed_at":"2024-10-27T05:52:50.000Z","size":27,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2024-10-27T06:45:03.863Z","etag":null,"topics":["navigationstack","swiftpackagemanager","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/iletai.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":{"buy_me_a_coffee":"iletai","custom":["https://www.paypal.me/iletai"]}},"created_at":"2023-12-14T09:05:11.000Z","updated_at":"2024-03-19T02:21:04.000Z","dependencies_parsed_at":"2023-12-24T09:32:20.506Z","dependency_job_id":"673c9def-4b07-4709-8a85-ea127dc813c6","html_url":"https://github.com/iletai/BaseNavigationStack","commit_stats":null,"previous_names":["iletai/basenavigationstack"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/iletai/BaseNavigationStack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iletai%2FBaseNavigationStack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iletai%2FBaseNavigationStack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iletai%2FBaseNavigationStack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iletai%2FBaseNavigationStack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iletai","download_url":"https://codeload.github.com/iletai/BaseNavigationStack/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iletai%2FBaseNavigationStack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280917370,"owners_count":26413206,"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-10-25T02:00:06.499Z","response_time":81,"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":["navigationstack","swiftpackagemanager","swiftui"],"created_at":"2025-10-25T06:57:45.767Z","updated_at":"2025-10-25T06:58:04.068Z","avatar_url":"https://github.com/iletai.png","language":"Swift","readme":"# BaseNavigationStack\nBuild a navigation controller with Navigation Stack SwiftUI \n\n[![Swift Version](https://img.shields.io/badge/Swift-5.9-orange.svg)](https://swift.org)\n[![Platform](https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat)](https://developer.apple.com/ios/)\n\nBaseNavigationStack is a Swift package that provides a flexible and reusable base class for managing navigation stacks in SwiftUI applications.\n\n## Overview\n\n`BaseNavigationStack` is designed to simplify the management of navigation stacks in SwiftUI applications. It introduces a generic approach to handle different types for views and presentation targets. This allows you to build navigation flows with ease, supporting various types of views and presentation styles.\n\n## Example: \n\n[\u003cvideo width=\"640\" height=\"360\" controls\u003e\n  \u003cvideo src=\"https://github.com/iletai/BaseNavigationStack/assets/26614687/9f4ae052-577d-4b99-bf5a-39eee6e75c9a.mp4\" type=\"video/mp4\"\u003e\n\u003c/video\u003e](https://github.com/iletai/BaseNavigationStack/assets/26614687/9f4ae052-577d-4b99-bf5a-39eee6e75c9a)\n\n\n## Installation\n\n### Swift Package Manager\n\nYou can use the Swift Package Manager to install `BaseNavigationStack` by adding it to your `Package.swift` file:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/iletai/BaseNavigationStack.git\", from: \"1.0.0\"),\n],\ntargets: [\n    .target(name: \"YourTarget\", dependencies: [\"BaseNavigationStack\"]),\n]\n```\n\n## Usage\n\n1. Import the `BaseNavigationStack` module into your Swift file:\n\n```swift\nimport BaseNavigationStack\n```\n2. Build In View:\n\n```swift\nstruct ContentView: View {\n    @State \n    var navigationRouter = BaseNavigationStack\u003c\n        ViewNavigationTarget,\n        SheetViewPresentTarget\n    \u003e(\n        isPresented: .constant(.splash)\n    )\n    \n    var body: some View {\n        NavigationStack(path: navigationRouter.navigationPath) {\n            BaseView()\n                .withNavigationRouter()\n                .withSheetRouter(sheetDestination: navigationRouter.presentingSheet)\n        }\n        .environment(navigationRouter)\n    }\n}\n```\n\n3. Quick To Push/Present View\n```swift\nstruct ListView: View {\n    @Environment(BaseNavigationStack\u003cViewNavigationTarget, SheetViewPresentTarget\u003e.self)\n    var navigationRouter\n    \n    var body: some View {\n        VStack {\n            Text(\"List View\")\n                .font(.title)\n                .fontWeight(.bold)\n            HStack {\n                Button {\n                    navigationRouter.pushToView(.splash)\n                } label: {\n                    Text(\"Splash\")\n                }\n                Button {\n                    navigationRouter.popBack()\n                } label: {\n                    Text(\"Pop Back\")\n                }\n                Button {\n                    navigationRouter.navigateToRoot()\n                } label: {\n                    Text(\"Pop To Root\")\n                }\n            }\n            .buttonStyle(.bordered)\n            Spacer()\n        }\n    }\n}\n```\n","funding_links":["https://buymeacoffee.com/iletai","https://www.paypal.me/iletai"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filetai%2Fbasenavigationstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filetai%2Fbasenavigationstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filetai%2Fbasenavigationstack/lists"}