- Create src/app/api/auth/profile/route.ts with PUT handler - Validates user is authenticated (returns 401 if not) - Validates request body has a non-empty name field - Updates user's name in the database - Returns 200 with updated user data Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
51 lines
2.9 KiB
Markdown
51 lines
2.9 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Landing page at root route
|
|
The system SHALL serve a public landing page at `/` (route `src/app/(public)/page.tsx`). The page SHALL match the Lovable design mockup from `lovable_design_html/candles_lovable_design_landing_page.html`.
|
|
|
|
#### Scenario: Landing page renders
|
|
- **WHEN** an unauthenticated user navigates to `/`
|
|
- **THEN** the landing page renders with the CandleAnnotator branding, hero section, features grid, stats bar, and CTA section
|
|
|
|
#### Scenario: Authenticated user visits landing
|
|
- **WHEN** an authenticated user navigates to `/`
|
|
- **THEN** the landing page renders normally (no redirect — user can still view marketing page)
|
|
|
|
### Requirement: Landing page navigation
|
|
The landing page navbar SHALL display the CandleAnnotator logo/name on the left and "Log in" + "Get Started" buttons on the right. "Log in" SHALL link to `/login`. "Get Started" SHALL link to `/register`.
|
|
|
|
#### Scenario: Nav links for unauthenticated user
|
|
- **WHEN** an unauthenticated user views the landing page
|
|
- **THEN** the navbar shows "Log in" (text button) linking to `/login` and "Get Started" (primary button) linking to `/register`
|
|
|
|
#### Scenario: Nav links for authenticated user
|
|
- **WHEN** an authenticated user views the landing page
|
|
- **THEN** the navbar shows "Go to App" (primary button) linking to `/app` instead of login/register buttons
|
|
|
|
### Requirement: Hero section
|
|
The hero section SHALL display: a badge "Built for quants & ML engineers", the heading "Annotate OHLC Charts. Train Smarter Models.", a description paragraph, and two CTAs: "Start Annotating" (primary, links to `/register`) and "Try Demo" (secondary, links to `/app`).
|
|
|
|
#### Scenario: Hero renders correctly
|
|
- **WHEN** the landing page loads
|
|
- **THEN** the hero section displays the heading, description, badge, and both CTA buttons
|
|
|
|
### Requirement: Features grid
|
|
The features section SHALL display 6 feature cards in a 3-column grid: Precision Annotation, ML Training Pipeline, Real-Time Predictions, Multi-Chart Workspace, Keyboard-First Workflow, Export & Persist. Each card SHALL have an icon, title, and description.
|
|
|
|
#### Scenario: Features grid renders
|
|
- **WHEN** the landing page loads
|
|
- **THEN** 6 feature cards are displayed in a responsive grid (3 columns on desktop, 1 on mobile)
|
|
|
|
### Requirement: Stats bar
|
|
The stats section SHALL display 3 metrics: "50ms" (Render latency), "6" (Shortcut keys), "JSON" (Export format) in a horizontal bar.
|
|
|
|
#### Scenario: Stats bar renders
|
|
- **WHEN** the landing page loads
|
|
- **THEN** the stats bar displays the 3 metrics with labels
|
|
|
|
### Requirement: Footer CTA section
|
|
The page SHALL include a bottom CTA section with heading "Ready to label?", description "No credit card required", and a "Create Free Account" button linking to `/register`. Below that, a footer with the CandleAnnotator name and copyright year.
|
|
|
|
#### Scenario: Footer CTA renders
|
|
- **WHEN** the landing page loads
|
|
- **THEN** the CTA section and footer render with correct links
|