## Why

Building a custom machine-learning model for trading requires labeled training data. Currently there is no tool to manually annotate EUR/USD candlestick charts with pattern labels (break up, break down, trend lines) and export those annotations as structured data. This app provides a TradingView-like charting interface with an interactive labeling layer, enabling a trader to visually mark patterns on historical candle data and export the results for ML pipelines.

## What Changes

- New full-stack Next.js application (App Router, TypeScript, Tailwind CSS)
- CSV upload for OHLC candle data (time, open, high, low, close) with parsing and SQLite persistence
- Interactive candlestick chart powered by `lightweight-charts`
- Annotation toolbox: point labels (Break Up, Break Down) and two-click line drawing
- Visual markers on chart for existing annotations (arrows, lines)
- Backend API for data ingestion, annotation CRUD, and CSV export
- Dark mode UI with sidebar toolbox and responsive chart area

## Capabilities

### New Capabilities

- `data-ingestion`: CSV file upload, parsing with papaparse, and storage of OHLC candle records in SQLite via Drizzle ORM
- `chart-canvas`: Candlestick chart rendering using lightweight-charts with responsive layout and dark theme
- `annotation-tools`: Interactive labeling (Break Up, Break Down markers) and two-click line drawing with coordinate mapping between screen and price/time
- `backend-api`: REST endpoints for CSV upload (POST /api/upload), annotation read/write (GET/POST /api/annotations), and annotation export as CSV
- `ui-shell`: Dark mode layout with sidebar toolbox, main chart area, and export button

### Modified Capabilities

(none — greenfield project)

## Impact

- **New dependencies**: next, react, typescript, tailwindcss, lightweight-charts, lucide-react, papaparse, drizzle-orm, better-sqlite3, shadcn-ui
- **New database**: Local SQLite file with `candles` and `annotations` tables
- **New API surface**: Three REST endpoints under /api/
- **File structure**: /components, /lib/db, /app/api modular layout
