Commit graph

75 commits

Author SHA1 Message Date
Marko Djordjevic
1a653c5866 feat: add ML service scaffolding with Python FastAPI, Docker, and MLflow setup 2026-02-15 11:58:31 +01:00
Marko Djordjevic
92abab5316 span annotations are working 2026-02-15 10:16:05 +01:00
Marko Djordjevic
6a899c3ecf feat: add span-label-types link to main page and create migration for default types 2026-02-14 11:16:33 +01:00
Marko Djordjevic
38cbdc22e1 feat: add span label types admin page with seed functionality 2026-02-14 11:12:39 +01:00
Marko Djordjevic
6ef6b2562c add start data 2026-02-14 10:50:49 +01:00
Marko Djordjevic
4b5cc2f174 fix: install missing shadcn/ui components and fix TypeScript build errors
- Install missing shadcn/ui components: dialog, select, label, slider, textarea
- Fix import paths in export API endpoint (@/lib/db instead of @/db)
- Fix CandleChart activeChartId type (handle undefined with nullish coalescing)
- Fix SpanRectanglePrimitive renderer to use proper lightweight-charts v4 API:
  - Implement ISeriesPrimitivePaneRenderer interface
  - Use useBitmapCoordinateSpace for HiDPI rendering
  - Add proper scaling factor for coordinates and dimensions
  - Fix hitTest to return PrimitiveHoveredItem with required zOrder property
- Mark all section 12 integration testing tasks as completed
2026-02-14 10:43:10 +01:00
Marko Djordjevic
842a58f12b feat: implement section 11 - span export endpoints (JSON, windowed CSV, BIO-tagged CSV) 2026-02-14 10:14:58 +01:00
Marko Djordjevic
b5e4d6573e feat: implement section 10 - hotkey label assignment for span annotations 2026-02-14 10:14:17 +01:00
Marko Djordjevic
4089aab77c feat: implement section 9 - span annotation sidebar list 2026-02-14 10:13:23 +01:00
Marko Djordjevic
2f05136f20 feat: implement section 8 - span selection, editing, and deletion 2026-02-14 10:11:51 +01:00
Marko Djordjevic
586f02ed69 feat: implement sections 6-7 - span selection, preview, and label assignment popover 2026-02-14 10:10:41 +01:00
Marko Djordjevic
c9d2cbfc4b feat: implement Section 5 - Span Tool State & Integration
- Add SpanAnnotation and SpanLabelType interfaces to page.tsx
- Add span-related state: spanAnnotations, selectedSpanId, spanLabelTypes
- Add fetchSpanAnnotations() and fetchSpanLabelTypes() data fetching functions
- Load span annotations and label types when chart changes
- Add "Span" tool button to Toolbox component with RectangleHorizontal icon
- Mark Section 5 tasks (5.1-5.5) as complete in tasks.md

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14 06:42:24 +01:00
Marko Djordjevic
5ea63a613e feat: implement SpanRectanglePrimitive for span annotation rendering
- Created SpanRectanglePrimitive.ts implementing ISeriesPrimitive interface
- Implemented updateAllViews() with coordinate conversion from data-space to pixel-space
- Added semi-transparent rectangle rendering with configurable opacity
- Implemented label tag rendering above rectangles showing pattern names
- Added hitTest() for click detection within span bounds
- Implemented highlight state with thicker borders and increased opacity
- Set zOrder to 'bottom' to render rectangles behind candlesticks
- Completed Section 4 tasks (4.1-4.6) from span-annotation specification

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-14 06:35:01 +01:00
Marko Djordjevic
7c1007f712 chore: mark completed tasks in span-annotation tasks.md (sections 1-3) 2026-02-14 06:08:36 +01:00
Marko Djordjevic
dadf515406 feat: add database schema, migrations, and API endpoints for span annotations
- Add span_label_types and span_annotations tables to schema
- Seed default span label types (bull_flag, bear_flag, etc.)
- Implement CRUD API endpoints for span label types
- Implement CRUD API endpoints for span annotations
- Add time swap validation in POST endpoint (start_time <= end_time)
2026-02-14 05:56:28 +01:00
Marko Djordjevic
8a7eb1fb08 openspec: span annotation 2026-02-14 05:51:23 +01:00
Marko Djordjevic
88e7347918 archive: add-dark-light-mode change complete 2026-02-13 09:37:18 +01:00
Marko Djordjevic
a8f9327d19 sync: apply add-dark-light-mode delta specs to main specs 2026-02-13 09:37:06 +01:00
Marko Djordjevic
3da4987f89 archive: multi-chart-management change complete 2026-02-13 09:23:33 +01:00
Marko Djordjevic
603b08209b use github action runners 2026-02-13 09:19:08 +01:00
Marko Djordjevic
4121a87875 sync: apply multi-chart-management delta specs to main specs
- Created new chart-management capability spec
- Updated data-ingestion: chart-scoped candles, duplicate filename handling
- Updated backend-api: all endpoints gain chartId parameter, chart CRUD
- Updated chart-canvas: chart switching, scoped data fetching
- Updated label-management: annotations scoped to active chart
- Updated ui-shell: upload creates/selects chart, theme-aware link styling
2026-02-13 09:06:37 +01:00
Marko Djordjevic
7cb308788e test: verify multi-chart management implementation
- Verified ChartSelector uses theme-aware classes
- Tested full workflow: upload, chart creation, switching, annotation scoping
- Verified migration creates default chart with existing data
- Tested chart deletion with cascade delete of candles/annotations
- Tested edge cases: duplicate filenames, deleting last chart, upload with no charts
- Build passes with no type errors
2026-02-13 00:29:21 +01:00
Marko Djordjevic
b9771fe89f feat: wire frontend state and data flow for multi-chart support
- Add activeChartId/charts state to page.tsx with chart fetching on mount
- ChartSelector integrated in sidebar between header and file upload
- CandleChart and SvgOverlay fetch data scoped by activeChartId
- FileUpload returns chart info, auto-selects new chart after upload
- Annotation create/delete flows include chart_id
- Export scoped by activeChartId
- Toolbox receives activeChartId prop
2026-02-13 00:17:09 +01:00
Marko Djordjevic
a3c7137b01 feat: create ChartSelector component with dropdown, delete, and empty state 2026-02-13 00:14:53 +01:00
Marko Djordjevic
90e1e179cc feat: scope candles/annotations/export APIs by chartId query param
- GET /api/candles accepts ?chartId= with fallback to most recent chart
- GET /api/annotations accepts ?chartId= with fallback to most recent chart
- POST /api/annotations now requires chart_id in request body
- GET /api/export accepts ?chartId= to scope exported annotations
- DELETE /api/annotations supports optional chartId scoping
2026-02-13 00:14:22 +01:00
Marko Djordjevic
98e91b047a feat: upload creates new chart from filename with duplicate handling
- POST /api/upload now creates a chart named from the CSV filename
- Duplicate names get numeric suffix (e.g., btc-daily-2)
- Candles inserted with chart_id instead of replacing all data
- Response includes chart id and name
2026-02-13 00:13:23 +01:00
Marko Djordjevic
b53cb1b7d1 feat: add charts API endpoints (GET list, DELETE with cascade) 2026-02-13 00:12:53 +01:00
Marko Djordjevic
92d3339a48 feat: add charts table schema and migration with data backfill
- Add charts table with id, name (unique), created_at
- Add chart_id FK to candles table with composite unique on (chart_id, time)
- Add chart_id FK to annotations table
- Custom migration handles existing data: creates 'Imported Data' chart and backfills chart_id
- Recreates tables for NOT NULL constraint (SQLite limitation)
2026-02-13 00:12:21 +01:00
Marko Djordjevic
178834f3b2 fix: resolve type errors in ThemeProvider and ThemeToggle
- Remove import from 'next-themes/dist/types' (no longer exported)
- Use React.ComponentProps<typeof NextThemesProvider> instead
- Remove unsupported 'asChild' prop from TooltipTrigger
- Remove unsupported 'side' prop from TooltipContent
2026-02-12 23:48:58 +01:00
Marko Djordjevic
9ec571389b night friendly candle colors 2026-02-12 23:38:11 +01:00
Marko Djordjevic
0d235602af feat: implement dark/light mode with system detection
- Install and configure next-themes for theme management
- Add ThemeProvider wrapper component with suppressHydrationWarning
- Define light theme CSS variables (off-white backgrounds, green accents)
- Define dark theme CSS variables (hacker theme: terminal blacks, matrix green)
- Update scrollbar styles for both themes
- Add CRT scanline/glow effects (dark mode only)
- Create ThemeToggle component with system/light/dark cycling
- Add theme toggle to Toolbox sidebar
- Update CandleChart to apply theme-specific colors
- Chart colors update dynamically on theme change
- All components use CSS variables for theme compatibility
- FOUC prevention via next-themes inline script
2026-02-12 23:31:51 +01:00
Marko Djordjevic
4dad24845e chore: archive update-candle-colors change 2026-02-12 23:26:25 +01:00
Marko Djordjevic
cce55c63c1 docs: sync candlestick color spec from update-candle-colors change 2026-02-12 23:26:10 +01:00
Marko Djordjevic
48883e60f0 feat: update candlestick colors to black/white scheme
- Change bullish candles to white interior with black outline
- Change bearish candles to solid black
- Update all wick colors to black
- Enable borders for candlesticks
2026-02-12 23:23:17 +01:00
Marko Djordjevic
62e0c554df use github actions again 2026-02-12 20:23:13 +01:00
Marko Djordjevic
8330566080 docs: update README with CSV replace mode and initial data loading 2026-02-12 18:49:16 +01:00
Marko Djordjevic
6522f501b6 feat: add EURUSD.csv data loading on Docker startup 2026-02-12 18:48:54 +01:00
Marko Djordjevic
011bea2350 feat: delete old candles on CSV upload before inserting new ones 2026-02-12 18:47:11 +01:00
Marko Djordjevic
974d9f5598 feat: add annotation types management system
- Created annotation_types table with name, display_name, color, category, icon
- Implemented CRUD API endpoints for annotation types management
- Built annotation types management UI page at /annotation-types
- Updated Toolbox component to dynamically load and display annotation types
- Updated CandleChart component to use dynamic annotation types for markers
- Added seed functionality for default types (break_up, break_down, line)
- Cleaned up duplicate migration files
2026-02-12 18:17:44 +01:00
Marko Djordjevic
50229e2ccf chore: archive both OpenSpec changes and sync specs to main 2026-02-12 18:17:44 +01:00
exe.dev user
a6e763c153 Switch deploy to webhook-based approach
exe.dev SSH proxy blocks direct SSH from GitHub Actions.
Use webhook listener on port 9000 instead.

Co-authored-by: Shelley <shelley@exe.dev>
2026-02-12 15:22:30 +00:00
Marko Djordjevic
133a0ce50f fix: remove obsolete version attribute from docker-compose.yml 2026-02-12 16:18:14 +01:00
Marko Djordjevic
08e8ebd1e0 design: change to minimalistic and clean light theme
- Replace Matrix/terminal dark theme with modern light design
- Update Tailwind config with clean, professional color palette
- Change from monospace to Inter sans-serif font
- Update chart styling to use white background with subtle grids
- Remove glow effects and neon colors from buttons and UI
- Update color picker with better color options
- Improve sidebar spacing and typography
- Update annotation badges with softer colors
- Change scrollbar styling to match light theme
2026-02-12 16:18:14 +01:00
exe.dev user
42bc3ae757 Add GitHub Actions deploy workflow
Automatically deploys to exe.dev VM on push to master.
Uses SSH to pull latest code and rebuild Docker container.

Co-authored-by: Shelley <shelley@exe.dev>
2026-02-12 15:04:06 +00:00
exe.dev user
e7af29145b Add drizzle migration files and remove drizzle/ from .gitignore
The Docker build was failing because drizzle/ was in .gitignore,
so migration files (meta/_journal.json) were never committed.
Generated initial migration from schema.

Co-authored-by: Shelley <shelley@exe.dev>
2026-02-12 14:47:06 +00:00
Marko Djordjevic
6f965c1cc9 fix: add automatic database migrations on startup and copy drizzle folder to Docker
- Auto-run migrations when db module loads
- Copy drizzle migrations folder to Docker image
- Generate missing color column migration
- Fixes 500 errors on /api/candles and /api/annotations in Docker
2026-02-12 15:40:57 +01:00
Marko Djordjevic
4e13648ebf fix: copy node_modules to Docker container for better-sqlite3 native dependencies 2026-02-12 15:32:19 +01:00
Marko Djordjevic
8646777f8d fix: create public directory and simplify Dockerfile COPY logic 2026-02-12 15:21:01 +01:00
Marko Djordjevic
957663e29a fix: use proper Drizzle query syntax in health endpoint instead of execute() 2026-02-12 15:19:50 +01:00
Marko Djordjevic
1f87950caf fix: update Dockerfile to use Node.js 20-alpine (required by Next.js 16) 2026-02-12 15:18:07 +01:00