Spaces:
Sleeping
Sleeping
Commit History
-
Fix Task 1 code review issues: schema defaults, DB init, model validation, StepSequence JSON parsing
- Add DEFAULT (datetime('now')) to all timestamp columns in schema.sql - Require ./db/database in server/index.js so DB initializes on startup - Add NOT NULL validation guards in Conversation, Message, SkillEvent, SafetyEvent create() methods - Parse steps JSON string into array in StepSequence.findById() and findByConversationId() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a84d637 -
Task 1: Project setup and database schema
- Initialize Node.js/Express backend with all required dependencies (express, ws, better-sqlite3@12.8.0, @anthropic-ai/sdk, uuid, dotenv, cors) and dev dependencies (jest, nodemon, concurrently) - Scaffold React + Vite frontend in client/ with proxy config for /api and /ws pointing to localhost:3001 - Create server/db/schema.sql with all 6 tables: users, conversations, messages, step_sequences, skill_events, safety_events - Create server/db/database.js with better-sqlite3 initialization, WAL mode, FK enforcement, and schema auto-execution - Create server/config.js for centralized env config via dotenv - Create all 6 model files (User, Conversation, Message, SkillEvent, SafetyEvent, StepSequence) with full CRUD operations - Add .env.example and .gitignore Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0737291