feat: initialize Next.js project with database schema
- Set up Next.js with App Router, TypeScript, Tailwind CSS - Configure shadcn/ui with dark theme - Install dependencies: lightweight-charts, papaparse, lucide-react - Set up Drizzle ORM with better-sqlite3 - Create database schema for candles and annotations tables - Generate migration SQL
This commit is contained in:
parent
7d2fc42b73
commit
d04b673cfa
25 changed files with 903 additions and 0 deletions
18
src/lib/db/schema.ts
Normal file
18
src/lib/db/schema.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { sqliteTable, integer, real, text } from 'drizzle-orm/sqlite-core';
|
||||
|
||||
export const candles = sqliteTable('candles', {
|
||||
id: integer('id').primaryKey({ autoIncrement: true }),
|
||||
time: integer('time').notNull().unique(),
|
||||
open: real('open').notNull(),
|
||||
high: real('high').notNull(),
|
||||
low: real('low').notNull(),
|
||||
close: real('close').notNull(),
|
||||
});
|
||||
|
||||
export const annotations = sqliteTable('annotations', {
|
||||
id: integer('id').primaryKey({ autoIncrement: true }),
|
||||
timestamp: integer('timestamp').notNull(),
|
||||
label_type: text('label_type').notNull(),
|
||||
geometry: text('geometry'), // JSON string for line coordinates
|
||||
created_at: integer('created_at').notNull(),
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue