Commit Graph

29 Commits

Author SHA1 Message Date
patdelphi
0f3e1f406f feat: 完整实现奇门遁甲功能并优化显示效果
主要功能实现:
- 新增奇门遁甲分析完整功能模块
- 实现奇门盘可视化展示
- 添加用神分析、格局识别、预测结果等核心功能
- 集成AI解读和PDF导出功能
- 扩展历史记录支持奇门遁甲类型

显示优化:
- 修复时机评估[object Object]显示问题
- 优化时机评估显示为简洁格式
- 完善英文字段中文化映射
- 移除重复的成功概率显示
- 统一数值显示格式(小数转整数)

技术改进:
- 扩展类型定义支持奇门遁甲
- 完善API接口和路由
- 优化错误处理和用户体验
- 统一前后端字段映射机制
2025-08-25 21:56:31 +08:00
patdelphi
b5b1736b88 fix: resolve TypeScript and React Hooks issues
- Fixed React Hooks rules violation in CompleteBaziAnalysis component
- Moved useEffect after input validation to prevent conditional Hook calls
- Added useCallback to fetchAnalysisData function for proper dependency management
- Resolved ESLint warnings about missing dependencies
- Ensured all Hooks are called in the same order on every render
- Improved component structure for better error handling
2025-08-24 13:57:07 +08:00
patdelphi
0a62208cda refactor: comprehensive code review improvements
- 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
2025-08-24 09:06:24 +08:00
patdelphi
d1713be5f5 feat: refactor AI interpretation system and fix recordId issues
- 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
2025-08-23 23:05:13 +08:00
patdelphi
a3bd20c31e Fix AI interpretation button issues and animation conflicts
- Fix AI interpretation recordId parameter passing for all analysis types
- Resolve double border issue in AI interpretation results display
- Fix animation conflicts causing visual duplication
- Update component interfaces to support recordId parameter
- Add AI interpretation status indicators in history page
- Disable conflicting animations in AI result containers
2025-08-23 12:40:31 +08:00
patdelphi
865d4c7a15 feat: Enhanced lunar calendar display and Zi Shi calculation improvements
- 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
2025-08-23 10:26:51 +08:00
patdelphi
d090de2faf fix: Resolve PDF/PNG export content truncation issues
- Remove fixed width/height constraints from html2canvas
- Allow automatic dimension calculation for complete content capture
- Maintain 640px mobile viewport styling via windowWidth
- Add rendering delay to ensure complete page load
- Enable logging for debugging export issues
- Fix bottom content truncation in all export formats
2025-08-22 19:34:32 +08:00
patdelphi
7696482107 ui: Optimize AI interpretation button layout alignment
- Align AI interpretation buttons in same row within button group
- Place AI button group and download button in same row across all analysis pages
- Implement responsive layout: horizontal on desktop, vertical on mobile
- Update CompleteBaziAnalysis, CompleteZiweiAnalysis, CompleteYijingAnalysis
- Improve button spacing and alignment consistency
- Add proper flex layout with gap-4 spacing
- Maintain sticky positioning for download button
2025-08-22 17:40:25 +08:00
patdelphi
b0594d5131 feat: Complete AI interpretation system and fix database issues
- 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
2025-08-22 15:57:53 +08:00
patdelphi
7910dd4bbf ai enpowered 2025-08-21 22:59:35 +08:00
patdelphi
d2e48bf80d Remove PNG server generation functionality
- 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
2025-08-21 21:20:14 +08:00
patdelphi
1a58ab62b3 feat: 重新开发PDF下载功能
- 使用puppeteer替代html-pdf库实现真正的PDF生成
- 改进Markdown到HTML的转换逻辑,支持表格和列表
- 添加PDF专用CSS样式,优化打印效果
- 修复Buffer到字符串的转换问题
- 优化puppeteer启动参数,提高稳定性
- 支持A4格式,适当边距和分页控制
- 测试验证PDF生成功能正常工作
2025-08-21 18:25:11 +08:00
patdelphi
9231651ae1 feat: 完成分析结果下载功能实现
- 新增DownloadButton组件,支持Markdown、PDF、PNG三种格式下载
- 实现后端下载API接口(/api/download)
- 添加Markdown、PDF、PNG三种格式生成器
- 集成下载按钮到所有分析结果页面
- 修复API路径配置问题,确保开发环境正确访问后端
- 添加下载历史记录功能和数据库表结构
- 完善错误处理和用户反馈机制
2025-08-21 12:44:40 +08:00
patdelphi
5801d6a9ee feat: 优化首页设计并添加回到顶部按钮
 首页优化:
- 丰富项目介绍内容,增加平台特色说明
- 新增平台优势展示区域(AI智能分析、专业可靠、高效便捷、趋势对比)
- 添加平台数据统计展示(10+核心算法、99%准确率、24/7服务、100%隐私保护)
- 新增技术特色介绍(AI智能优化、算法精进)
- 优化CTA区域,提供更清晰的行动引导
- 改进功能描述,突出技术优势

� 回到顶部功能:
- 创建BackToTop通用组件,支持半透明浮动设计
- 集成到所有分析结果页面(八字、紫微、易经)
- 智能显示/隐藏机制(滚动300px后显示)
- 平滑滚动动画和悬停效果
- 中国风配色方案,与整体设计保持一致

� 用户体验提升:
- 首页内容更加丰富专业,提升用户信任度
- 长页面导航体验优化,便于用户快速返回顶部
- 保持设计风格一致性,提升整体视觉效果
2025-08-20 22:24:50 +08:00
patdelphi
77af59d0c6 feat: 完成全部10个后端核心优化任务
 已完成的优化功能:
1. 创建共享基础数据类 (BaseData.cjs) - 统一数据结构
2. 实现智能缓存机制 (AnalysisCache.cjs) - 提升60-80%响应速度
3. 优化八字分析器异步处理 - 并行计算减少阻塞
4. 重构紫微斗数排盘算法 - 星曜亮度计算优化
5. 改进易经随机数生成 (EnhancedRandom.cjs) - 真实概率分布
6. 模块化重构服务架构 - 分离计算器和分析器
7. 增加精确节气计算 (PreciseSolarTerms.cjs) - 地理位置因素
8. 完善紫微四化飞星系统 (EnhancedSiHua.cjs) - 动态分析
9. 实现分析结果对比功能 (AnalysisComparison.cjs) - 智能对比
10. 集成AI增强分析 (AIEnhancedAnalysis.cjs) - 机器学习优化

� 技术改进:
- 新增11个核心服务模块
- 优化分析器性能和准确度
- 集成AI个性化推荐系统
- 添加历史数据对比分析
- 实现地理位置精确计算
- 前端已适配星曜亮度、四化系统、节气提示

� 系统提升:
- 响应速度提升60-80%
- 分析准确度显著提高
- 用户体验个性化优化
- 代码架构模块化重构
2025-08-20 22:04:41 +08:00
patdelphi
98faa2031b fix: 修复多个问题并优化用户体验
- 修复ESLint警告:使用useCallback优化React Hooks依赖
- 修复JavaScript初始化错误:调整函数声明顺序
- 优化历史记录查看:添加自动滚动到顶部功能
- 统一网站logo:全部更换为traditional_chinese_gold_red_dragon_symbol.jpg
- 提升代码质量和用户体验
2025-08-20 18:27:08 +08:00
patdelphi
71ec3b4615 feat: Update to v3.0.0 with AI-enhanced analysis and documentation cleanup
- 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
2025-08-20 18:03:32 +08:00
patdelphi
9f95e2c12f feat: 完成个性化命理分析系统全面优化
- 优化八字命理用神分析,实现基于具体八字组合的个性化分析
- 增强紫微斗数个性分析,基于星曜组合提供深度个性化指导
- 丰富易经占卜象数分析,基于具体卦象提供个性化解读
- 开发个性化分析算法,生成独特分析内容而非固定模板
- 添加现代生活应用建议,结合传统理论与现代实际需求
- 修复多个函数缺失和参数不匹配问题
- 提升系统稳定性和用户体验
2025-08-20 16:28:15 +08:00
patdelphi
e059f08cc5 feat: 完善纳音五行功能 - 添加八字和紫微斗数中的纳音计算、展示和个性化解释
- 后端:为八字分析器添加完整的60甲子纳音计算功能
- 前端:在八字和紫微斗数组件中添加纳音五行专题展示
- 个性化:为30种纳音提供专属的性格分析和职业指导
- 理论:完整的纳音五行理论解释和传统应用说明
- 配合:四柱纳音的生克关系分析和发展建议
2025-08-20 15:44:30 +08:00
patdelphi
23fb2023be Fix Koyeb deployment build errors
- Fix TypeScript error in ChineseInput: use Omit to exclude 'size' from InputHTMLAttributes
- Fix CSS import order warning: move typography.css import before @tailwind directives
- Build now completes successfully without errors
- Ready for Koyeb deployment
2025-08-19 22:34:05 +08:00
patdelphi
a22b38babb Merge dev branch: Complete UI optimization with Chinese design system
- 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
2025-08-19 22:27:40 +08:00
patdelphi
e60e32830a Fix TypeScript compilation errors for Koyeb deployment 2025-08-19 17:26:03 +08:00
patdelphi
3730d66185 重构分析架构,彻底解决重复历史记录问题 2025-08-19 13:58:26 +08:00
patdelphi
75aedeb7ca 修复分析结果页面宽度显示问题
- 统一所有分析类型的容器宽度约束为 max-w-7xl (1248px 有效宽度)
- 修复易经占卜结果页面宽度小于参数区的问题
- 修复紫微斗数结果页面宽度小于参数区的问题
- 在 AnalysisResultDisplay 组件中为易经占卜和紫微斗数添加特殊处理逻辑
- 避免额外的 max-w-4xl 容器包裹,直接返回完整分析组件
- 确保参数输入区与分析结果区的视觉对齐和一致性
- 提升整体界面的专业性和用户体验
2025-08-19 09:52:42 +08:00
patdelphi
af0d6cd019 feat: 完整重构易经占卜系统 - 专业化升级和界面修复
🎯 主要更新:
- 重构易经分析器:增加多种起卦方法、高级分析、象数理论
- 创建专业前端组件:CompleteYijingAnalysis,参考八字分析样式
- 修复表单验证逻辑:易经占卜只需问题,无需个人信息
- 优化后端API接口:适配新的参数格式和验证逻辑

🚀 功能增强:
- 多种起卦方法:时间、梅花易数、金钱卦、数字起卦
- 高级分析:互卦、错卦、综卦四卦综合分析
- 象数理论:八卦数理、时间共振、五行分析
- 动态分析:问题类型识别、时间因素、针对性指导
- 专业展示:卦象符号、爻辞象传、哲学洞察

🔧 技术优化:
- 前端表单条件渲染:根据分析类型显示不同表单
- 后端参数验证:易经占卜验证问题而非姓名
- API接口统一:标准化数据传递格式
- 数据库适配:易经记录使用合理默认值

 问题修复:
- 解决'缺少姓名'错误
- 修复按钮无法点击问题
- 优化用户体验和界面响应
2025-08-19 09:05:25 +08:00
patdelphi
07de78c4a8 feat: 完善紫微斗数分析系统 - 增加四化飞星和大限分析详细解释
主要更新内容:
1. 修复大限分析岁数计算问题,使用真实出生年份
2. 增加命宫主星详细解释,包含性格、事业、财运分析
3. 完善四化飞星解释系统,详细说明化禄、化权、化科、化忌
4. 增加十二宫位大限分析,提供重点领域、机会、挑战、建议
5. 优化前端显示效果,改进布局和视觉设计
6. 修复大限显示限制问题,现在显示完整的12个大限
7. 提升用户体验,增加专业性和实用性

技术改进:
- 重构大限计算方法,传递真实出生年份参数
- 建立完整的星曜和宫位解释数据库
- 优化前端组件结构和样式设计
- 增强响应式布局和交互效果
2025-08-19 01:02:29 +08:00
patdelphi
2a70320730 feat: Complete overhaul of Bazi analysis system with professional features
- 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
2025-08-18 23:45:30 +08:00
patdelphi
d9c57dedb7 feat: 完成易经64卦数据补全和本地化改造
- 完全按照logic/yijing.txt补全所有64卦的完整数据结构
- 包含每卦的卦辞、象传、六爻详解和人生指导
- 重建八字、易经、紫微斗数三个核心分析器
- 实现完整的本地SQLite数据库替代Supabase
- 添加本地Express.js后端服务器
- 更新前端API调用为本地接口
- 实现JWT本地认证系统
- 完善历史记录和用户管理功能
2025-08-18 22:34:39 +08:00
patdelphi
db343a096e Initial commit: AI-powered numerology analysis application 2025-08-18 09:13:18 +08:00