- Fixed overly strict user ID validation that rejected string IDs
- Added proper type conversion from string to integer for user IDs
- Ensured compatibility with both string and numeric user ID formats
- Prevents 'Invalid User ID' error for legitimate users
- Enhanced input validation and error handling across all services
- Added comprehensive JSDoc documentation for all major functions
- Improved database operations with transaction management and better error handling
- Added PropTypes validation and error boundaries for React components
- Unified error handling patterns across backend services
- Reduced code duplication in API routes with shared validation functions
- Enhanced security with stricter input validation and SQL injection prevention
- Improved user experience with better error messages and retry functionality
- Add automatic migration from analysis_id to reading_id in ai_interpretations table
- Handle existing production databases with old schema structure
- Preserve valid numeric ID records during migration
- Prevent deployment failures due to schema changes
- Refactored AI interpretation table to use proper 1-to-1 relationship with reading records
- Fixed recordId parameter passing in AnalysisResultDisplay component
- Updated database schema to use reading_id instead of analysis_id
- Removed complex string ID generation logic
- Fixed TypeScript type definitions for all ID fields
- Added database migration scripts for AI interpretation refactoring
- Improved error handling and debugging capabilities
- Added full Chinese year display (农历一九七六年)
- Implemented detailed solar term intervals (惊蛰后至春分前)
- Enhanced Zi Shi calculation with professional explanations
- Added lunar information display in frontend components
- Improved accuracy of lunar date calculations
- Removed redundant note texts for cleaner UI
- Fixed syntax errors in analyzer modules
- Remove forced database initialization from Dockerfile CMD
- App now auto-initializes database on startup without data loss
- Skip sample data creation in production environment
- Ensure admin user exists in production without recreating
- Fixes database reset issue on every Koyeb deployment
- Maintains data persistence with proper volume mounting
- Added connectSrc to Content Security Policy
- Allow connections to OpenAI, 智谱AI, Azure OpenAI, Anthropic, and Google AI APIs
- Fixes CSP violation error when calling external AI services in production
- Resolves: 'Refused to connect because it violates the document's Content Security Policy'
- Fixed all database connection errors in aiInterpretation.cjs
- Updated better-sqlite3 API calls from callback to sync methods
- Removed AI interpretation buttons from history page
- Added pagination to history page (10 records per page)
- Fixed mobile responsive design for AI interpretation results
- Updated Koyeb deployment configuration to use npm instead of pnpm
- Resolved API limit issues for history records
- Remove PNG server generation option from DownloadButton component
- Remove PNG generation logic from download route
- Delete pngGenerator.cjs and related test files
- Simplify download options to focus on frontend PNG export
- Reduce server complexity and resource usage
- Update project version to 3.0.0
- Add AI-enhanced analysis features for Ziwei numerology
- Add detailed star strength explanations (旺/得地/平/不得地/陷)
- Add comprehensive Ming Gong position analysis
- Update all project branding from 三算命 to 神机阁
- Remove outdated Supabase-based documentation
- Update README with latest tech stack and features
- Clean up docs directory, keeping only relevant files
- Implement comprehensive Chinese-style component library
- Add unified typography system with semantic font classes
- Optimize all pages with responsive design and Chinese aesthetics
- Fix button styling and enhance user experience
- Add loading states, empty states, and toast notifications
- Complete 12 Palaces Details optimization
- Establish consistent color scheme and visual hierarchy
- Add fallback detection using PORT=8000 for Koyeb
- Add environment debugging logs
- Ensure static file serving is enabled in production
- Fix NODE_ENV detection issues in containerized deployment
- Updated .env file with correct VITE_API_BASE_URL for local development
- Fixed API endpoint routing from localhost:5173 to localhost:3001
- Tested npm run build successfully with no errors
- Updated database and server configurations
- Implement dynamic Bazi analysis based on traditional Four Pillars theory
- Add comprehensive pillar interpretations (year, month, day, hour)
- Implement precise Dayun (Great Luck) and yearly fortune calculations
- Add detailed 6-year fortune analysis with monthly highlights
- Replace fixed templates with dynamic pattern analysis
- Implement Wuxing (Five Elements) strength analysis system
- Add professional life guidance and modern application suggestions
- Create new CompleteBaziAnalysis component with modern UI
- Update BaziDetailsPage with improved user experience
- Integrate all analysis modules into unified display system
- Add missing getElementRelation method to BaziAnalyzer
- Ensure all analysis content is dynamically generated from real Bazi data