Skip to content
Agentmart
Submit a tool

kmp-template-anatomy

KMP TV template repo structure: shared-core, androidtv-app, appletv-app modules and where screens, theme, data, and navigation live

Skill by giolaq

IndexedMIT-0★ 4
Write a review

Chalk Labs

Need help deploying kmp-template-anatomy?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/giolaq-kmp-template-anatomy

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

KMP TV template repo structure: shared-core, androidtv-app, appletv-app modules and where screens, theme, data, and navigation live

Use cases: data

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/kmp-template-anatomy

What's inside

Skill name
kmp-template-anatomy
Description
KMP TV template repo structure: shared-core, androidtv-app, appletv-app modules and where screens, theme, data, and navigation live
License
MIT-0
Instructions
155 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# KMP Template Anatomy

> The base template is `kmptv` — a Kotlin Multiplatform project targeting Android TV (Compose for TV) and Apple TV (SwiftUI). Knowing where things live prevents editing the wrong module.

## Top-level layout

```
kmptv/
├── settings.gradle.kts       # Declares :shared-core and :androidtv-app modules
├── build.gradle.kts           # Root plugins: kotlin multiplatform 1.9.24, AGP 8.2.2
├── gradle.properties          # Kotlin/JVM settings
├── shared-core/               # Kotlin Multiplatform shared code (models, data, services)
├── androidtv-app/             # Android TV app (Compose for TV)
├── appletv-app/               # Apple TV app (SwiftUI, Xcode project)
└── gradle/wrapper/            # Gradle wrapper (8.9)
```

## `shared-core/` — the shared data layer

This is a Kotlin Multiplatform library consumed by both platform apps. It compiles for Android and iOS (for Apple TV via iOS targets).

```
shared-core/
├── build.gradle.kts                    # KMP plugin, serialization, android-library
└── src/
    ├── commonMain/kotlin/
    │   ├── models/
    │   │   ├── ContentItem.kt          # Core data class: id, title, thumbnailUrl, videoUrl, metadata
    │   │   ├── Metadata.kt             # ContentMetadata (genre, rating, releaseDate, duration)
    │   │   ├── Types.kt                # ContentType enum (Video, Audio, Image, Mixed)
    │   │   ├── TVApplication.kt        # App config model
    │   │   ├── UserSession.kt          # Session state
    │   │   └── Result.kt               # Result<T> sealed class (Success/Error)
    │   ├── repositories/
    │   │   └── ContentRepository.kt    # Interface + impl: getContentItems, searchContent, markAccessed
    │   ├── services/
    │   │   ├── CatalogService.kt       # CatalogSource interface + JSON catalog loader
    │   │   ├── SessionManager.kt       # Auth/session lifecycle
    │   │   └── TVApplicationManager.kt # App state management
    │   └── di/
    │       └── ServiceLocator.kt       # Manual DI: contentRepository(), sessionManager()
    ├── commonTest/kotlin/contract/     # Contract tests for repositories and services
    ├── androidMain/kotlin/             # Android-specific: OkHttp Ktor engine
    └── iosMain/kotlin/                 # iOS-specific: Darwin Ktor engine
```

**Key dependencies (commonMain):**
- `kotlinx-coroutines-core:1.8.1`
- `kotlinx-serialization-json:1.6.3`
- `kotlinx-datetime:0.6.0`
- `ktor-client-core:2.3.12` (+ content-negotiation, kotlinx-json serialization)

## `androidtv-app/` — Compose for TV

Single-activity app using Compose for TV components.

```
androidtv-app/
├── build.gradle.kts                           # AGP + Compose (extension 1.5.14)
└── src/main/
    ├── AndroidManifest.xml                    # Leanback launcher, LEANBACK_ONLY feature
    ├── java/com/kmptv/androidtv/
    │   ├── MainActivity.kt                    # Single activity: setContent { KMPTVTheme { MainScreen() } }
    │   ├── compose/
    │   │   ├── TVCard.kt                      # Focusable card with scale animation + border on focus
    │   │   ├── FocusModifiers.kt              # transparentSurfaceColors() helper
    │   │   ├── ContentDetailScreen.kt         # Detail view with metadata + Play button
    │   │   └── VideoPlayerScreen.kt           # ExoPlayer-based video playback
    │   └── theme/
    │       ├── Color.kt                       # KmptvColors object (Background, SurfaceElevated, Accent)
    │       ├── Theme.kt                       # KMPTVTheme composable wrapping darkColorScheme()
    │       └── Type.kt                        # Typography definitions
    └── res/
        ├── drawable/tv_banner.xml
        ├── values/strings.xml, themes.xml
        └── xml/searchable.xml

```

**Key dependencies:**
- `androidx.tv:tv-foundation:1.0.0-alpha10` (TvLazyRow, TvLazyColumn)
- `androidx.tv:tv-material:1.0.0-alpha10` (Surface, ClickableSurfaceDefaults)
- `androidx.compose.material3:material3:1.2.1`
- `io.coil-kt:coil-compose:2.6.0` (image loading)
- `androidx.media3:media3-exoplayer:1.4.1` (video playback)
- `project(":shared-core")` (shared data layer)

## `appletv-app/` — SwiftUI for tvOS

Xcode project with SwiftUI views. Does NOT consume shared-core as a KMP framework yet (uses its own Swift models mirroring the Kotlin ones).

```
appletv-app/kmptv/kmptv/
├── kmptvApp.swift              # App entry point
├── ContentView.swift           # Root view with navigation
├── HomeView.swift              # Main browse screen with hero + category rows
├── HeroBannerView.swift        # Featured content banner
├── CategoryRowView.swift       # Horizontal scroll row
├── TVCardView.swift            # Focusable card (ButtonStyle-based focus)
├── TVCardButtonStyle.swift     # Custom ButtonStyle with scale on focus
├── TVFocusButtonStyle.swift    # Focus appearance styling
├── ContentDetailView.swift     # Detail screen
├── VideoPlayerView.swift       # AVPlayer wrapper
├── ContentItem.swift           # Swift mirror of Kotlin ContentItem
└── CatalogFeed.swift           # JSON catalog loader (Swift-native)
```

## Where new content goes

| You want to add...              | Put it here                                          |
|--------------------------------|------------------------------------------------------|
| A new data model               | `shared-core/src/commonMain/kotlin/models/`          |
| A new repository               | `shared-core/src/commonMain/kotlin/repositories/`    |
| A new service                  | `shared-core/src/commonMain/kotlin/services/`        |
| Content manifest (JSON)        | Load via CatalogService (URL or bundled asset)       |
| A new Compose screen           | `androidtv-app/src/main/java/.../compose/`           |
| A new Compose component        | `androidtv-app/src/main/java/.../compose/`           |
| Theme colors                   | `androidtv-app/.../theme/Color.kt`                   |
| A new Swift screen             | `appletv-app/kmptv/kmptv/`                           |

From giolaq/tv-build-harness, MIT-0.

More from giolaq/tv-build-harness

Signals

Stars
4
Forks
0
Open issues
3
Last commit (this folder)
Jun 24, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT-0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from giolaq

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get kmp-template-anatomy running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying kmp-template-anatomy?

CallGet help
Cite this page

kmp-template-anatomy skill. Agent Mart. https://agentmart.dev/skills/giolaq-kmp-template-anatomy (last updated 2026-10-24)