project-standalo-sonic-cloud/.workflow/versions/v001/contexts/page_register.yml

106 lines
2.4 KiB
YAML

task_id: task_create_page_register
entity_id: page_register
generated_at: '2025-12-18T15:16:50.290659'
workflow_version: v001
target:
type: page
definition:
id: page_register
path: /register
title: Register
description: User registration page
data_needs:
- api_id: api_register
purpose: Create new account
on_load: false
components:
- component_auth_form
auth:
required: false
redirect_if_authenticated: /
related:
models: []
apis:
- id: api_register
definition: &id002
id: api_register
method: POST
path: /api/auth/register
description: Register new user account
request_body:
email: string
password: string
name: string
role: enum[musician, listener, label]
responses:
- status: 201
description: User created successfully
schema:
user:
id: uuid
email: string
name: string
role: string
token: string
- status: 400
description: Validation error
schema:
error: string
- status: 409
description: Email already exists
schema:
error: string
auth:
required: false
depends_on_models:
- model_user
components:
- id: component_auth_form
definition: &id001
id: component_auth_form
name: AuthForm
description: Reusable authentication form
props:
- name: mode
type: enum[login, register, forgot]
required: true
state:
- name: email
type: string
- name: password
type: string
- name: name
type: string
- name: role
type: string
events:
- name: onSubmit
payload: object
uses_apis:
- api_login
- api_register
- api_forgot_password
uses_components: []
dependencies:
entity_ids:
- component_auth_form
- api_register
definitions:
- id: component_auth_form
type: component
definition: *id001
- id: api_register
type: api
definition: *id002
files:
to_create:
- app/register/page.tsx
reference: []
acceptance:
- criterion: Page renders at /register
verification: Navigate to /register
- criterion: Data fetching works
verification: Check network tab
- criterion: Components render correctly
verification: Visual inspection