4 Commits

Author SHA1 Message Date
bed53dbbd3 Epic 1, Story 1.4: Database Schema Definition with Prisma
- Installed Prisma and @prisma/client in backend/ directory
- Initialized Prisma with PostgreSQL provider (Prisma 7.x)
- Created prisma/schema.prisma with Book and ReadingLog models
- Configured prisma.config.ts with DATABASE_URL from environment
- Added .gitignore for Prisma-generated files

Book model includes:
- All required fields (id, title, author, totalPages, coverUrl, deadlineDate, isPrimary, status)
- Timestamps (createdAt, updatedAt)
- Indexes on deadlineDate and status for query performance
- One-to-many relationship with ReadingLog

ReadingLog model includes:
- All required fields (id, bookId, logDate, currentPage)
- Timestamps (createdAt, updatedAt)
- Foreign key relationship to Book with cascade delete
- Unique constraint on (bookId, logDate) - one entry per book per day
- Indexes on bookId and logDate for query performance

All acceptance criteria met:
 Prisma installed in backend/
 Initialized with PostgreSQL provider
 schema.prisma defines Book and ReadingLog models
 Appropriate indexes for performance
 One-to-many relationship defined
 Unique constraint ensures one log entry per book per day

Schema validated with npx prisma format

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 16:12:04 +01:00
27802f4bf3 Epic 1, Story 1.3: Backend Scaffolding with Node.js + Express
- Created Express application in backend/src/server.js
- Installed dependencies: express, cors, helmet, dotenv, express-validator
- Installed dev dependencies: nodemon, eslint, globals
- Configured middleware: CORS (frontend origin), Helmet (security), JSON parser
- Loaded environment configuration via dotenv
- Server listens on port from API_PORT env variable (default: 3001)
- Implemented error handling middleware for validation and server errors
- Created health check endpoint: GET /api/health returns status and timestamp
- Added npm scripts: dev (nodemon), start (production), lint
- Configured ESLint for Node.js/Express with CommonJS
- Created backend/.env with all required environment variables

All acceptance criteria met:
 Express application created in backend/src/server.js
 All required dependencies installed
 Middleware configured (CORS, Helmet, JSON parser)
 Environment configuration via dotenv
 Server listens on env port
 Error handling middleware implemented
 Health check endpoint working
 Package.json scripts: dev, start, lint
 ESLint configured for Node.js/Express

Tested and verified:
- ESLint passes with no errors
- Server starts successfully
- Health endpoint returns correct JSON
- Changed default port to 3001 (3000 occupied)

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 16:09:03 +01:00
f5c37615ab Epic 1, Story 1.2: Frontend Scaffolding with Vite + React
- Created Vite + React 19.2 project in frontend/ directory
- Installed and configured Tailwind CSS v4 with @tailwindcss/postcss
- Configured PostCSS with Tailwind and Autoprefixer
- Added Tailwind directives to index.css (@tailwind base/components/utilities)
- Created sample landing page component demonstrating Tailwind styles
- ESLint pre-configured for React/JavaScript (by Vite)
- Added SESSION_STATUS.md tracking Epic 1 progress

All acceptance criteria met:
 Vite project created in frontend/ directory
 React 18+ configured (19.2.0 installed)
 Tailwind CSS installed and configured
 Base Tailwind directives in main CSS file
 Sample component with Tailwind styles working
 ESLint configured for React/JavaScript
 Build and lint scripts verified working
 Package.json scripts: dev, build, preview, lint

Fixed: Updated to @tailwindcss/postcss for Tailwind CSS v4 compatibility

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 15:58:51 +01:00
fa8acef423 Epic 1, Story 1.1: Project Initialization & Repository Setup
- Initialize Git repository with main branch
- Create comprehensive .gitignore for Node.js, React, and environment files
- Set up directory structure (frontend/, backend/, docs/)
- Create detailed README.md with project overview and setup instructions
- Add .env.example with all required environment variables
- Configure Prettier for consistent code formatting

All acceptance criteria met:
 Git repository initialized with appropriate .gitignore
 Directory structure matches Technical Assumptions
 README.md created with project overview and setup docs
 .env.example file with all required environment variables
 Prettier config files added for code formatting consistency

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 15:12:30 +01:00