180 lines
4.1 KiB
YAML
180 lines
4.1 KiB
YAML
task_id: task_create_page_search
|
|
entity_id: page_search
|
|
generated_at: '2025-12-18T15:16:50.306942'
|
|
workflow_version: v001
|
|
target:
|
|
type: page
|
|
definition:
|
|
id: page_search
|
|
path: /search
|
|
title: Search
|
|
description: Search results page
|
|
data_needs:
|
|
- api_id: api_search
|
|
purpose: Search songs, artists, albums
|
|
on_load: false
|
|
components:
|
|
- component_search_bar
|
|
- component_search_results
|
|
- component_song_card
|
|
- component_artist_card
|
|
- component_album_card
|
|
auth:
|
|
required: false
|
|
related:
|
|
models: []
|
|
apis:
|
|
- id: api_search
|
|
definition: &id005
|
|
id: api_search
|
|
method: GET
|
|
path: /api/search
|
|
description: Search songs, artists, and albums
|
|
query_params:
|
|
q: string
|
|
type: enum[song, artist, album, all]
|
|
limit: integer
|
|
responses:
|
|
- status: 200
|
|
description: Search results
|
|
schema:
|
|
songs: array
|
|
artists: array
|
|
albums: array
|
|
auth:
|
|
required: false
|
|
depends_on_models:
|
|
- model_song
|
|
- model_artist
|
|
- model_album
|
|
components:
|
|
- id: component_search_results
|
|
definition: &id001
|
|
id: component_search_results
|
|
name: SearchResults
|
|
description: Search results with filters
|
|
props:
|
|
- name: results
|
|
type: object
|
|
required: true
|
|
events: []
|
|
uses_apis: []
|
|
uses_components:
|
|
- component_song_card
|
|
- component_artist_card
|
|
- component_album_card
|
|
- id: component_album_card
|
|
definition: &id002
|
|
id: component_album_card
|
|
name: AlbumCard
|
|
description: Album display card
|
|
props:
|
|
- name: album
|
|
type: Album
|
|
required: true
|
|
- name: showArtist
|
|
type: boolean
|
|
default: true
|
|
events:
|
|
- name: onClick
|
|
payload:
|
|
albumId: string
|
|
uses_apis: []
|
|
uses_components: []
|
|
- id: component_artist_card
|
|
definition: &id003
|
|
id: component_artist_card
|
|
name: ArtistCard
|
|
description: Artist preview card
|
|
props:
|
|
- name: artist
|
|
type: Artist
|
|
required: true
|
|
events:
|
|
- name: onClick
|
|
payload:
|
|
artistId: string
|
|
uses_apis: []
|
|
uses_components: []
|
|
- id: component_search_bar
|
|
definition: &id004
|
|
id: component_search_bar
|
|
name: SearchBar
|
|
description: Search input with autocomplete
|
|
props:
|
|
- name: placeholder
|
|
type: string
|
|
default: Search songs, artists, albums...
|
|
state:
|
|
- name: query
|
|
type: string
|
|
events:
|
|
- name: onSearch
|
|
payload:
|
|
query: string
|
|
uses_apis:
|
|
- api_search
|
|
uses_components: []
|
|
- id: component_song_card
|
|
definition: &id006
|
|
id: component_song_card
|
|
name: SongCard
|
|
description: Song display card with play button
|
|
props:
|
|
- name: song
|
|
type: Song
|
|
required: true
|
|
- name: showArtist
|
|
type: boolean
|
|
default: true
|
|
- name: showAlbum
|
|
type: boolean
|
|
default: false
|
|
events:
|
|
- name: onPlay
|
|
payload:
|
|
songId: string
|
|
- name: onAddToPlaylist
|
|
payload:
|
|
songId: string
|
|
uses_apis: []
|
|
uses_components: []
|
|
dependencies:
|
|
entity_ids:
|
|
- component_search_results
|
|
- component_album_card
|
|
- component_artist_card
|
|
- component_search_bar
|
|
- api_search
|
|
- component_song_card
|
|
definitions:
|
|
- id: component_search_results
|
|
type: component
|
|
definition: *id001
|
|
- id: component_album_card
|
|
type: component
|
|
definition: *id002
|
|
- id: component_artist_card
|
|
type: component
|
|
definition: *id003
|
|
- id: component_search_bar
|
|
type: component
|
|
definition: *id004
|
|
- id: api_search
|
|
type: api
|
|
definition: *id005
|
|
- id: component_song_card
|
|
type: component
|
|
definition: *id006
|
|
files:
|
|
to_create:
|
|
- app/search/page.tsx
|
|
reference: []
|
|
acceptance:
|
|
- criterion: Page renders at /search
|
|
verification: Navigate to /search
|
|
- criterion: Data fetching works
|
|
verification: Check network tab
|
|
- criterion: Components render correctly
|
|
verification: Visual inspection
|