> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Feature — Tracks

The `Track` model the song list is built on, plus a small zustand UI store. The feature used to
ship a mock API, query hooks and a detail screen as the repo's example of a server-backed feature;
nothing used them, so they were removed. It is **no longer the canonical example** — for the shape
of a feature that talks to a backend see [adding-a-feature.md](/docs/adding-a-feature.md) and
[data-fetching.md](/docs/data-fetching.md) (their `tracks` snippets are illustrative).

## Files

```
src/features/tracks/
  types.ts   # DTO, domain (Track), filters — Track is imported by songs, catalog and analytics
  store.ts   # zustand (filters + selectedId, NOT persisted); shown in the DevTools store list
```

There is no route and no query layer here any more: `/tracks/[id]`, `TrackDetailScreen`,
`api.ts`, `mappers.ts` and `queries.ts` were deleted.

## Types

```mermaid
classDiagram
  class Track {
    +string id
    +string title
    +string artist
    +difficulty tutorial|easy|medium|hard|extreme|impossible
    +number durationSeconds
    +string coverUrl
    +boolean isFavorite
  }
  class TrackFilters {
    +string search
    +difficulty | 'all' difficulty
  }
```

`TrackDto` (the old wire shape) is still declared in `types.ts` but has no consumer now.

***

<small>Source: [`docs/features/tracks.md`](https://github.com/leapgame/leap-sim-piano/blob/f794b594016038c483e2d20b6af56aea0ae1b982/docs/features/tracks.md)</small>
