313 lines
7.7 KiB
YAML
313 lines
7.7 KiB
YAML
task_id: task_create_page_dashboard
|
|
entity_id: page_dashboard
|
|
generated_at: '2025-12-19T06:08:12.173922'
|
|
workflow_version: v001
|
|
target:
|
|
type: page
|
|
definition:
|
|
id: page_dashboard
|
|
name: Dashboard
|
|
path: /dashboard
|
|
layout: layout_app
|
|
data_needs:
|
|
- api_id: api_get_current_user
|
|
purpose: Display user info
|
|
on_load: true
|
|
- api_id: api_list_recordings
|
|
purpose: Show recent recordings
|
|
on_load: true
|
|
components:
|
|
- component_header
|
|
- component_sidebar
|
|
- component_record_button
|
|
- component_wake_word_indicator
|
|
- component_recording_list
|
|
seo:
|
|
title: Dashboard - NoteToApp
|
|
description: Your voice recordings and generated apps
|
|
auth:
|
|
required: true
|
|
roles: []
|
|
redirect: /login
|
|
state:
|
|
local:
|
|
- isRecording
|
|
- isListening
|
|
- currentRecording
|
|
global:
|
|
- user
|
|
related:
|
|
models: []
|
|
apis:
|
|
- id: api_list_recordings
|
|
definition: &id002
|
|
id: api_list_recordings
|
|
method: GET
|
|
path: /api/recordings
|
|
summary: List user recordings
|
|
description: Get all recordings for authenticated user, sorted by creation date
|
|
tags:
|
|
- recordings
|
|
path_params: []
|
|
query_params:
|
|
- name: limit
|
|
type: integer
|
|
required: false
|
|
default: 50
|
|
description: Maximum number of recordings to return
|
|
- name: offset
|
|
type: integer
|
|
required: false
|
|
default: 0
|
|
description: Number of recordings to skip
|
|
request_body:
|
|
content_type: application/json
|
|
schema:
|
|
type: object
|
|
properties: []
|
|
responses:
|
|
- status: 200
|
|
description: Recordings list
|
|
schema:
|
|
type: object
|
|
properties:
|
|
- name: recordings
|
|
type: array
|
|
- name: total
|
|
type: integer
|
|
example:
|
|
recordings:
|
|
- id: rec-123
|
|
title: Meeting Notes
|
|
duration: 180
|
|
created_at: '2024-12-19T06:00:00Z'
|
|
total: 42
|
|
depends_on_models:
|
|
- model_recording
|
|
depends_on_apis: []
|
|
auth:
|
|
required: true
|
|
roles: []
|
|
external: false
|
|
- id: api_get_current_user
|
|
definition: &id004
|
|
id: api_get_current_user
|
|
method: GET
|
|
path: /api/auth/me
|
|
summary: Get current user
|
|
description: Get currently authenticated user information
|
|
tags:
|
|
- auth
|
|
path_params: []
|
|
query_params: []
|
|
request_body:
|
|
content_type: application/json
|
|
schema:
|
|
type: object
|
|
properties: []
|
|
responses:
|
|
- status: 200
|
|
description: User data
|
|
schema:
|
|
type: object
|
|
properties:
|
|
- name: id
|
|
type: uuid
|
|
- name: email
|
|
type: string
|
|
- name: name
|
|
type: string
|
|
- name: created_at
|
|
type: datetime
|
|
example:
|
|
id: 550e8400-e29b-41d4-a716-446655440000
|
|
email: user@example.com
|
|
name: John Doe
|
|
created_at: '2024-12-19T06:00:00Z'
|
|
- status: 401
|
|
description: Not authenticated
|
|
schema:
|
|
type: object
|
|
properties:
|
|
- name: error
|
|
type: string
|
|
example:
|
|
error: Not authenticated
|
|
depends_on_models:
|
|
- model_user
|
|
depends_on_apis: []
|
|
auth:
|
|
required: true
|
|
roles: []
|
|
external: false
|
|
components:
|
|
- id: component_recording_list
|
|
definition: &id001
|
|
id: component_recording_list
|
|
name: RecordingList
|
|
props:
|
|
- name: recordings
|
|
type: Recording[]
|
|
required: true
|
|
description: Array of recordings to display
|
|
- name: isLoading
|
|
type: boolean
|
|
required: false
|
|
default: false
|
|
description: Whether recordings are being loaded
|
|
events:
|
|
- name: onSelectRecording
|
|
payload: string
|
|
description: Fired when recording is clicked, payload is recording ID
|
|
- name: onDeleteRecording
|
|
payload: string
|
|
description: Fired when delete confirmed, payload is recording ID
|
|
uses_apis: []
|
|
uses_components:
|
|
- component_recording_card
|
|
internal_state: []
|
|
variants:
|
|
- default
|
|
- compact
|
|
external: false
|
|
- id: component_record_button
|
|
definition: &id003
|
|
id: component_record_button
|
|
name: RecordButton
|
|
props:
|
|
- name: isRecording
|
|
type: boolean
|
|
required: true
|
|
description: Whether currently recording
|
|
- name: isTranscribing
|
|
type: boolean
|
|
required: false
|
|
default: false
|
|
description: Whether transcribing in real-time
|
|
events:
|
|
- name: onStartRecording
|
|
payload: void
|
|
description: Fired when recording starts
|
|
- name: onStopRecording
|
|
payload: Blob
|
|
description: Fired when recording stops, includes audio blob
|
|
uses_apis: []
|
|
uses_components: []
|
|
internal_state:
|
|
- mediaRecorder
|
|
- audioChunks
|
|
variants:
|
|
- default
|
|
- large
|
|
external: false
|
|
- id: component_wake_word_indicator
|
|
definition: &id005
|
|
id: component_wake_word_indicator
|
|
name: WakeWordIndicator
|
|
props:
|
|
- name: isListening
|
|
type: boolean
|
|
required: true
|
|
description: Whether wake word detection is active
|
|
- name: wakeWord
|
|
type: string
|
|
required: true
|
|
description: The wake word phrase
|
|
events:
|
|
- name: onWakeWordDetected
|
|
payload: void
|
|
description: Fired when wake word is detected
|
|
uses_apis: []
|
|
uses_components: []
|
|
internal_state:
|
|
- lastDetectionTime
|
|
variants:
|
|
- default
|
|
external: false
|
|
- id: component_header
|
|
definition: &id006
|
|
id: component_header
|
|
name: Header
|
|
props:
|
|
- name: user
|
|
type: User | null
|
|
required: false
|
|
default: null
|
|
description: Current user for displaying name/avatar
|
|
events: []
|
|
uses_apis: []
|
|
uses_components: []
|
|
internal_state: []
|
|
variants:
|
|
- default
|
|
external: false
|
|
- id: component_sidebar
|
|
definition: &id007
|
|
id: component_sidebar
|
|
name: Sidebar
|
|
props:
|
|
- name: activePath
|
|
type: string
|
|
required: true
|
|
description: Current route path for highlighting
|
|
events:
|
|
- name: onNavigate
|
|
payload: string
|
|
description: Fired when navigation item clicked
|
|
uses_apis: []
|
|
uses_components: []
|
|
internal_state:
|
|
- isCollapsed
|
|
variants:
|
|
- default
|
|
external: false
|
|
dependencies:
|
|
entity_ids:
|
|
- component_recording_list
|
|
- api_list_recordings
|
|
- component_record_button
|
|
- api_get_current_user
|
|
- component_wake_word_indicator
|
|
- component_header
|
|
- component_sidebar
|
|
definitions:
|
|
- id: component_recording_list
|
|
type: component
|
|
definition: *id001
|
|
external: false
|
|
- id: api_list_recordings
|
|
type: api
|
|
definition: *id002
|
|
external: false
|
|
- id: component_record_button
|
|
type: component
|
|
definition: *id003
|
|
external: false
|
|
- id: api_get_current_user
|
|
type: api
|
|
definition: *id004
|
|
external: false
|
|
- id: component_wake_word_indicator
|
|
type: component
|
|
definition: *id005
|
|
external: false
|
|
- id: component_header
|
|
type: component
|
|
definition: *id006
|
|
external: false
|
|
- id: component_sidebar
|
|
type: component
|
|
definition: *id007
|
|
external: false
|
|
files:
|
|
to_create:
|
|
- app/dashboard/page.tsx
|
|
reference: []
|
|
acceptance:
|
|
- criterion: Page renders at /dashboard
|
|
verification: Navigate to /dashboard
|
|
- criterion: Data fetching works
|
|
verification: Check network tab
|
|
- criterion: Components render correctly
|
|
verification: Visual inspection
|