Skip to content

About

Highly Agentic Engineering Project: This repository is a proof of concept exploring end-to-end agentic software development for Kotlin Multiplatform (Android, iOS, and macOS).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

192 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agentic Engineering Project: This repository explores end-to-end agentic software development for Kotlin Multiplatform (Android, iOS, and macOS) using vendor-neutral rules (AGENTS.md), modular skills (.agents/skills/), a living wiki (wiki/README.md), and structured specs (specs/README.md). See Agentic Development Lifecycle.

Unsplash Image Feed App (Kotlin Multiplatform)

A Kotlin Multiplatform (KMP) photo discovery app powered by the public Unsplash API, pairing a shared Kotlin business/presentation core with native Jetpack Compose (Android) and SwiftUI (iOS & macOS) shells.

Table of Contents


Overview

Platform UI Toolkit & Design System Minimum Target
Android Jetpack Compose, Material 3 Expressive (Matte → Satin → Float), Jetpack Navigation 3, adaptive ListDetailSceneStrategy Android 10 (API 29)
iOS SwiftUI, Liquid Glass (Matte → Satin → Float), native iOS 26+ Liquid Glass TabView with iOS 17–25 fallback iOS 17+
macOS SwiftUI (shared iosApp/iosApp sources via XcodeGen), NavigationSplitView sidebar, desktop shortcuts (⌘F, ⌘S) macOS 14+

All platforms share a single MVI/UDF presentation and data layer compiled via Metro DI, enforce Unsplash API guidelines (hotlinking, ixid preservation, attribution, download tracking), and adapt column counts and Retina CDN widths to the active pane size.

For deeper technical documentation, start at the Project Wiki.


Features

  • Photo Discovery & Topics Feed: Editorial and topic feeds with horizontal category pills, responsive multi-column masonry grids, BlurHash placeholders, Retina-scaled CDN requests, infinite pagination with deduplication, pull-to-refresh, and Shake-to-Shuffle (⌘S on macOS).
  • Unified Multi-Facet Search: 300ms debounced search segmented across Photos, Collections, and Users, with orientation, color, and sort filters plus clickable tag navigation from photo details.
  • Photo Details, EXIF & Geolocation: Pinch-to-zoom (1.0x–4.0x) and double-tap zoom canvas, Frame-0 preview seeding, EXIF camera specs, interactive PhotoColorEngine tonal swatches, tracked Full / RAW downloads, and inline geolocation maps (Google Maps Lite Mode on Android; cached MKMapSnapshotter on Apple). Presented in a detented glass sheet on iOS phones and dual-pane layouts on wide screens/tablets/macOS.
  • Local Favorites: On-device Room KMP + bundled SQLite bookmarking (metadata-only JSON storage preserving Unsplash hotlinking), offline detail fallback, and newest-first ordering.
  • Curated Collections: 3-photo mosaic preview cards, infinite collection detail grids, and related collections carousels.
  • Photographer Profiles & Analytics: Public portfolios with avatar hero transitions, bio/social links, segmented Photos / Likes / Collections feeds, and interactive Views/Downloads trend charts.

See Design Systems & Navigation and Performance & Memory in the wiki for platform UI tokens, motion, caching, and hot-path optimizations.


Navigation

All platforms expose 4 top-level destinations (Photos, Collections, Favorites, Search) with cross-linked navigation to Photo Details, Collection Details, and User Profile.

flowchart TD
    Shell["Root Shell<br/>Android: Nav 3 Rail / Floating Bar<br/>iOS: Liquid Glass TabView / Capsule<br/>macOS: NavigationSplitView"]

    Shell --> Feed["Photos Feed"]
    Shell --> Collections["Collections"]
    Shell --> Favorites["Favorites"]
    Shell --> Search["Search"]

    Feed -->|"Photo / Shuffle (⌘S)"| PhotoDetails["Photo Details"]
    Feed -->|"Photographer"| UserProfile["User Profile"]

    Collections -->|"Collection"| CollectionDetails["Collection Details"]
    Collections -->|"Search"| Search

    Favorites -->|"Photo"| PhotoDetails
    Favorites -->|"Photographer"| UserProfile

    PhotoDetails -->|"Photographer"| UserProfile
    PhotoDetails -->|"Tag Chip"| Search

    CollectionDetails -->|"Photo"| PhotoDetails
    CollectionDetails -->|"Related"| CollectionDetails

    UserProfile -->|"Photo / Like"| PhotoDetails
    UserProfile -->|"Collection"| CollectionDetails

    Search -->|"Photo"| PhotoDetails
    Search -->|"Collection"| CollectionDetails
    Search -->|"User"| UserProfile
Loading
  • Android: Sealed AppRoute keys (Feed, Collections, CollectionDetails, Favorites, Search, PhotoDetails, UserProfile) with per-tab backstacks, SharedTransitionLayout hero transitions, predictive back, and adaptive ListDetailSceneStrategy panes.
  • iOS & macOS: Unified AppRoute + .appNavigationDestinations(...) with iOS 18+ .navigationTransition(.zoom) hero transitions, iOS 26+ Liquid Glass TabView (falling back to FloatingTabCapsule on iOS 17–25), and macOS NavigationSplitView.

Full routing, backstack, and adaptive scene details live in Design Systems & Navigation.


Architecture & Modules

The codebase uses Vertical Feature Ownership with a :shared umbrella framework, Shared MVI / UDF (MviViewModel, UiState, UiIntent, UiEffect), and compile-time Metro dependency injection (dev.zacsweers.metro).

Layer Modules Responsibility
Platform Shells :androidApp, iosApp / macosApp Thin Compose and SwiftUI shells observing shared state flows
Umbrella :shared Aggregates Metro @DependencyGraph and exports the static Apple framework (shared)
Vertical Features :feature-feed, :feature-details, :feature-favorites, :feature-search, :feature-collections, :feature-profile Self-contained slices owning ViewModels, repositories, API clients, and commonTest suites
Foundational Core :core-model, :core-mvi, :core-network, :core-database @Serializable models & PhotoColorEngine, MVI base contracts, Ktor client & BuildKonfig, Room KMP + sqlite-bundled
Tooling & Perf build-logic, :benchmark Gradle convention plugins (imagefeed.*) and Android Macrobenchmark / Baseline Profiles

For the full module dependency graph, Metro DI wiring, coroutine teardown contracts, and historical decisions, see Architecture & Modules and the ADR Index.


API Keys & Configuration

API keys are loaded at compile time from a git-ignored local.properties file in the project root:

unsplash.api.key=YOUR_UNSPLASH_ACCESS_KEY_HERE
google.maps.api.key=YOUR_GOOGLE_MAPS_API_KEY_HERE
  • unsplash.api.key is injected into shared Kotlin via BuildKonfig.
  • google.maps.api.key is optional and enables inline Google Maps in Android's Photo Details screen.

See Business Rules & API Compliance for credential and networking invariants.


Build, Run & Verify

Prerequisites

  • macOS (required for iOS and macOS targets)
  • JDK 21 (required for build-logic / Metro; app modules target JVM 17)
  • Android Studio (latest with KMP support)
  • Xcode 16+ (Xcode 26+ for iOS 26 Liquid Glass SDK) and XcodeGen (brew install xcodegen)

Build & Run

# Android debug APK
./gradlew :androidApp:assembleDebug

# Generate Xcode project (required before Xcode / xcodebuild)
xcodegen generate --spec iosApp/project.yml

# iOS Simulator build
xcodebuild -project iosApp/iosApp.xcodeproj -scheme iosApp -destination 'generic/platform=iOS Simulator' build CODE_SIGNING_ALLOWED=NO

# macOS build
xcodebuild -project iosApp/iosApp.xcodeproj -scheme macosApp -destination 'platform=macOS,arch=arm64' build CODE_SIGNING_ALLOWED=NO

You can also open the root folder in Android Studio (androidApp run configuration) or open iosApp/iosApp.xcodeproj in Xcode (iosApp or macosApp scheme).

Test & Lint

# Shared KMP test suite across all modules
./gradlew allTests

# Android unit tests
./gradlew :androidApp:testDebugUnitTest

# Kotlin formatting & static analysis
./gradlew ktlintCheck detekt
./gradlew -p build-logic :convention:ktlintCheck :convention:test
./gradlew ktlintFormat

# Swift formatting & linting
swiftformat --lint .
swiftlint lint iosApp/iosApp iosApp/iosAppTests iosApp/iosAppUITests
swiftformat .

See .agents/skills/verification-and-linting/SKILL.md for the complete verification matrix and worktree SDK setup.


Agentic Development Lifecycle

AI coding agents collaborate across the full engineering loop under explicit human approval gates, isolated git worktrees, automated cross-platform build/visual checks, and a portable knowledge base:

flowchart LR
    R["1. Research (Optional)<br/>Author / Reconcile"] -. "Decompose" .-> A["2. Spec Author<br/>Size & Collision-Safe ID"]
    A --> E["3. Spec Execute<br/>Worktree + Build/Visual Gates"]
    E --> C["4. Spec Complete<br/>Archive + Wiki Sync"]
    C --> W["Living Wiki & Archives"]
    C -. "Friction" .-> I["Issue Log Capture"]
    I -. "Manual Triage" .-> Res["Issue Log Resolution"]
    Res -. "Evolve Rules / Wiki" .-> W
Loading
  1. Research (Optional) — Major architectural or cross-cutting explorations start in specs/researches/ via research-lifecycle.
  2. Spec Author & Approve (Default Entry Point) — Features, refactors, and bugfixes are drafted under specs/NN_<slug>.md with collision-safe IDs via spec-author, then approved, pre-merge ID checked, committed, merged to main, and cleaned up via spec-approve before execution.
  3. Spec Execute — Agents isolate work in a git worktree, run drift checks, capture ephemeral Before/After UI snapshots (ui-visual-review), and pass cross-platform builds and linters via spec-execute.
  4. Spec Complete & Knowledge Evolution — Finalized specs sync wiki/, move to immutable specs/archive/, and register in specs/steps.md via spec-complete. Systemic friction is logged to wiki/issue-log.md and triaged on demand.

Key entry points: AGENTS.md · specs/README.md · specs/steps.md · .agents/skills/


Unsplash API Compliance

  • Direct Hotlinking: Load photos directly from Unsplash URLs; no persistent image disk caching.
  • Parameter Preservation: Preserve ixid tracking parameters when appending &w=, &q=, and &auto=format.
  • Photographer Attribution: Display photographer names/avatars with UTM referral links (utm_source=ImageFeedApp&utm_medium=referral).
  • Download Tracking: Trigger photo.links.download_location on explicit Full/RAW download actions.
  • Retina CDN Sizing: Scale requested widths by display density (UIScreen.main.scale, NSScreen.backingScaleFactor, Android density).

See Business Rules & API Compliance for enforcement details.


Project Wiki

About

Highly Agentic Engineering Project: This repository is a proof of concept exploring end-to-end agentic software development for Kotlin Multiplatform (Android, iOS, and macOS).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages