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.
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.
- Overview
- Features
- Navigation
- Architecture & Modules
- API Keys & Configuration
- Build, Run & Verify
- Agentic Development Lifecycle
- Unsplash API Compliance
- Project Wiki
| 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.
- 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 (
⌘Son 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, interactivePhotoColorEnginetonal swatches, tracked Full / RAW downloads, and inline geolocation maps (Google Maps Lite Mode on Android; cachedMKMapSnapshotteron 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.
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
- Android: Sealed
AppRoutekeys (Feed,Collections,CollectionDetails,Favorites,Search,PhotoDetails,UserProfile) with per-tab backstacks,SharedTransitionLayouthero transitions, predictive back, and adaptiveListDetailSceneStrategypanes. - iOS & macOS: Unified
AppRoute+.appNavigationDestinations(...)with iOS 18+.navigationTransition(.zoom)hero transitions, iOS 26+ Liquid GlassTabView(falling back toFloatingTabCapsuleon iOS 17–25), and macOSNavigationSplitView.
Full routing, backstack, and adaptive scene details live in Design Systems & Navigation.
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 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_HEREunsplash.api.keyis injected into shared Kotlin viaBuildKonfig.google.maps.api.keyis optional and enables inline Google Maps in Android's Photo Details screen.
See Business Rules & API Compliance for credential and networking invariants.
- 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)
# 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=NOYou can also open the root folder in Android Studio (androidApp run configuration) or open iosApp/iosApp.xcodeproj in Xcode (iosApp or macosApp scheme).
# 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.
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
- Research (Optional) — Major architectural or cross-cutting explorations start in
specs/researches/viaresearch-lifecycle. - Spec Author & Approve (Default Entry Point) — Features, refactors, and bugfixes are drafted under
specs/NN_<slug>.mdwith collision-safe IDs viaspec-author, then approved, pre-merge ID checked, committed, merged tomain, and cleaned up viaspec-approvebefore execution. - 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 viaspec-execute. - Spec Complete & Knowledge Evolution — Finalized specs sync
wiki/, move to immutablespecs/archive/, and register inspecs/steps.mdviaspec-complete. Systemic friction is logged towiki/issue-log.mdand triaged on demand.
Key entry points: AGENTS.md · specs/README.md · specs/steps.md · .agents/skills/
- Direct Hotlinking: Load photos directly from Unsplash URLs; no persistent image disk caching.
- Parameter Preservation: Preserve
ixidtracking 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_locationon 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.
- Wiki Home — Documentation layer boundaries and full index
- Architecture & Modules — Module graph, Metro DI, MVI lifecycle, and
build-logic - Business Rules & API Compliance — Unsplash mandates, CDN math, pagination, search, favorites, and localization
- Design Systems & Navigation — Android M3 Expressive + Nav 3, Apple Liquid Glass, and visual review
- Performance & Memory — BlurHash, Coil/
ImageMemoryCache, hot-path optimizations, R8, and Baseline Profiles - ADR Index — Chronological log of architectural decisions
- Issue Log — Known systemic friction and evolution queue