starting planning

This commit is contained in:
Marko Djordjevic 2026-02-12 09:42:55 +01:00
commit 7d2fc42b73
6 changed files with 164 additions and 0 deletions

View file

@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-02-12

View file

@ -0,0 +1,34 @@
## 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

20
openspec/config.yaml Normal file
View file

@ -0,0 +1,20 @@
schema: spec-driven
# Project context (optional)
# This is shown to AI when creating artifacts.
# Add your tech stack, conventions, style guides, domain knowledge, etc.
# Example:
# context: |
# Tech stack: TypeScript, React, Node.js
# We use conventional commits
# Domain: e-commerce platform
# Per-artifact rules (optional)
# Add custom rules for specific artifacts.
# Example:
# rules:
# proposal:
# - Keep proposals under 500 words
# - Always include a "Non-goals" section
# tasks:
# - Break tasks into chunks of max 2 hours