{"id":49574679,"url":"https://github.com/sajjon/nanoviewcontroller","last_synced_at":"2026-05-06T07:05:43.866Z","repository":{"id":355245084,"uuid":"1227276295","full_name":"Sajjon/NanoViewController","owner":"Sajjon","description":"UIKit architecture built on top of MVVM-C allowing for single line UIViewControllers.","archived":false,"fork":false,"pushed_at":"2026-05-02T15:06:13.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T17:11:47.553Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sajjon.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-02T13:07:45.000Z","updated_at":"2026-05-02T15:06:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Sajjon/NanoViewController","commit_stats":null,"previous_names":["sajjon/nanoviewcontroller"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Sajjon/NanoViewController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FNanoViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FNanoViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FNanoViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FNanoViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sajjon","download_url":"https://codeload.github.com/Sajjon/NanoViewController/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sajjon%2FNanoViewController/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32575170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"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":[],"created_at":"2026-05-03T16:05:47.381Z","updated_at":"2026-05-03T16:05:48.126Z","avatar_url":"https://github.com/Sajjon.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NVC: NanoViewController\nA UIKit architecture built on top of MVVM-C allowing you to create `UIViewController`s declaratively with as little as a single line of code.\n\n# History\nImplementation happened in 2018 in https://github.com/sajjon/zhip (originally https://github.com/openzesame/zhip); then called \"SLC: SingleLineController\". You can read my blog posts from 2018, [part one](https://medium.com/@sajjon/single-line-controller-fbe474857787) and [part two](https://medium.com/@sajjon/single-line-controller-advanced-case-406e76731ee6) - since ported from RxSwift to Combine and extracted into this separate repo.\n\n# Library products\nThe package ships six independent SPM library targets so consumers can pick exactly what they need:\n\n| Product | Layer | Notes |\n|---|---|---|\n| `NanoViewControllerCore` | value types | `ViewModelType`, `InputType`, `EmptyInitializable`, `AbstractViewModel`, `AbstractTarget`, `ActivityIndicator`, `ErrorTracker` |\n| `NanoViewControllerCombine` | reactive | `Binder`, the `--\u003e` operator, `Publisher+Extras`, `UIControl`/`UITextField`/`UIView` publisher extensions |\n| `NanoViewControllerNavigation` | coordinators | `Coordinating`, `BaseCoordinator`, `Navigator`, `Stepper` |\n| `NanoViewControllerController` | UIKit glue | `SceneController\u003cView\u003e`, `BarButtonContent`, `InputFromController`, `ViewModelled`, `NavigationBarLayoutingNavigationController`, `Toast` |\n| `NanoViewControllerSceneViews` | UIKit views | `AbstractSceneView`, `BaseScrollableStackViewOwner`, `BaseTableViewOwner`, `SingleCellTypeTableView`, `CellConfigurable`, pull-to-refresh / class-identifiable / footer plumbing |\n| `NanoViewControllerDIPrimitives` | DI protocols | `Clock`, `MainScheduler`, `DateProvider`, `HapticFeedback`, `Pasteboard`, `UrlOpener` |\n\n`Combine`, `Navigation`, `Controller`, `SceneViews`, `DIPrimitives` all depend on `Core`. UIKit modules (`Controller`, `SceneViews`, `DIPrimitives`) need iOS 26+; pure value-type modules build on macOS 14+ too. Every target compiles in Swift 6.2 language mode (`swift-tools-version: 6.2`) so the package's `@MainActor`-on-UIKit annotations are enforced as hard errors at the consumer's call site.\n\n# Local development\n\nFirst-time setup on a fresh clone:\n\n```sh\nbrew install just     # bootstraps the rest\njust bootstrap        # brew bundle install + git hooks (pre-commit + pre-push)\n```\n\nThen:\n\n```sh\njust test       # build + run the per-package XCTest bundles on iPhone 17 / iOS 26.1\njust cov        # tests with coverage report\njust fmt        # swiftformat + swiftlint --fix\njust            # list every recipe\n```\n\nCI runs the same pipeline on every push / PR — typos check, swiftformat lint, swiftlint strict, build + test on the iOS Simulator. See `.github/workflows/ci.yml`.\n\nThe `pre-commit` hook installed by `just bootstrap` enforces: typos, shellcheck, swiftformat lint, swiftlint strict on every commit; and the full test suite on every push.\n\n# Example: SignUpDemo\n\n`Examples/SignUpDemo/` is a small UIKit iOS app that walks through every load-bearing piece of the package: a `SceneController`-backed sign-up screen, a `Coordinator` swap on success, and a logout button on the home screen that re-runs the onboarding flow. It uses a stub `SignUpServicing` (instant-success) so it runs out of the box on the simulator.\n\n```sh\njust example-gen     # generate Examples/SignUpDemo/SignUpDemo.xcodeproj from project.yml\njust example-build   # xcodebuild for iPhone 17 simulator\nopen Examples/SignUpDemo/SignUpDemo.xcodeproj   # then ⌘R in Xcode\n```\n\nThe example shows the canonical wiring: scene = `SceneController\u003cView\u003e`, view-model subclasses the package's `BaseViewModel\u003cNavigationStep, InputFromView, Output\u003e` (which fixes `FromController` to `InputFromController` and provides a `Navigator\u003cStep\u003e`), coordinator subscribes to that navigator and routes the user-actions to push / pop / present transitions. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajjon%2Fnanoviewcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsajjon%2Fnanoviewcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsajjon%2Fnanoviewcontroller/lists"}