📋 Project Overview & Cultural Problem Statement
Challenge: Modern Chinese communities worldwide need access to authentic traditional calendar wisdom for important life decisions, but most digital solutions lack cultural authenticity, personalization, or intuitive interaction methods.
Revolutionary Solution: Chinese Traditional Calendar with AI Consultant (黄道吉日 APP) transforms ancient Chinese lunar calendar wisdom into an interactive, conversational AI experience. Users can now naturally ask questions and receive personalized traditional guidance through modern chat interface.
🤖 Revolutionary Conversational AI Features
- AI Cultural Consultant: Chat naturally with a knowledgeable AI that understands traditional Chinese calendar wisdom
- Personalized Recommendations: Ask "我要结婚,推荐个好日子" and get tailored auspicious date suggestions
- Cultural Education: Learn about Five Elements theory, zodiac compatibility, and traditional customs through conversation
- Intent Recognition: AI automatically understands your needs and provides relevant calendar information
- Real-time Interaction: Modern chat interface with typing indicators and conversation history
Key Cultural & Technical Benefits
- Authentic Traditional Wisdom: Based on genuine Chinese lunar calendar algorithms and Five Elements theory
- Conversational Interface: Natural language interaction replacing complex navigation
- Progressive Web App: Installable, offline-capable mobile experience with AI chat
- Cultural Preservation: Digitizes and preserves traditional Chinese calendar knowledge through interactive AI
- Global Accessibility: Brings conversational traditional wisdom to Chinese diaspora worldwide
传统文化特色 (Cultural Features)
- 黄道吉日查询:基于传统黄历的择日推荐系统
- 农历信息:完整的农历日期、节气、生肖信息
- 五行理论:结合天干地支的专业择日算法
- 多用途推荐:婚嫁、搬家、开业、出行等场景
🛠️ Technical Architecture & Modern Implementation
Backend Architecture
Python 3.8+
FastAPI
SQLAlchemy ORM
Pydantic
SQLite Database
Frontend & PWA Technology
HTML5
CSS3 Grid/Flexbox
Vanilla JavaScript
PWA Manifest
Service Workers
Cultural & Data Processing
Lunar Calendar Algorithms
Traditional Date Calculation
Cultural Data Seeding
Chinese Localization
System Architecture & Data Flow
Cultural Algorithm Engine:
- Traditional lunar calendar calculation with authentic Chinese algorithms
- Five Elements analysis engine for auspicious date determination
- SQLite database with pre-seeded traditional calendar data
- RESTful API serving cultural recommendations and calendar data
Progressive Web App Features:
- Offline-first architecture with service worker caching
- Installable mobile app experience on iOS/Android
- Responsive design optimized for mobile cultural consultation
- Fast loading with cultural data pre-caching
📖 Development Setup & Cultural Data Installation
Prerequisites
- Python 3.8+ with pip package manager
- Cultural Libraries: lunar-python for Chinese calendar calculations
- Database Setup: SQLite with traditional calendar data seeding
- Modern Browser: PWA-compatible browser for testing
Quick Start Installation
# Clone the repository
git clone https://github.com/lyven81/ai-project.git
cd ai-project/projects/chinese-calender
# Install dependencies including cultural libraries
pip install -r requirements.txt
# Initialize database with traditional calendar data
python init_db.py
# Start the cultural AI service
python -m uvicorn app:app --host 0.0.0.0 --port 8080
# Access the PWA
# Frontend: http://localhost:8080
# API Docs: http://localhost:8080/docs
Cultural Data Configuration
# Environment Variables
PORT=8080
DATABASE_URL=sqlite:///./huangdao_calendar.db
# Traditional Data Extension
# Generate extended calendar data for more days
python -c "
from calendar_data import generate_calendar_data
from datetime import date
data = generate_calendar_data(date.today(), 365)
# Seed database with full year of traditional data
"
Cultural Algorithm Testing
- Traditional Accuracy: Verify lunar date calculations against authentic sources
- Cultural Consistency: Test auspicious date recommendations for consistency
- API Validation: Comprehensive testing of cultural recommendation endpoints
- PWA Functionality: Test offline capabilities and installability
🚀 Deployment & Cultural Localization
Docker Deployment with Cultural Data
# Build with traditional calendar data
docker build -t chinese-calendar .
# Run with cultural persistence
docker run -d -p 8080:8080 \
-v ./data:/app/data \
chinese-calendar
Google Cloud Run Deployment
# Deploy with Asian region for cultural relevance
gcloud run deploy chinese-calendar \
--image gcr.io/PROJECT-ID/chinese-calendar \
--platform managed \
--region asia-southeast1 \
--allow-unauthenticated \
--set-env-vars LANG=zh_CN.UTF-8
Cultural Optimization Features
- Chinese Font Loading: Optimized font delivery for Traditional/Simplified Chinese
- Cultural Caching: Pre-cache traditional calendar data for offline access
- Timezone Awareness: Accurate lunar calculations for different global Chinese communities
- Cultural Accessibility: Screen reader support for Chinese cultural terms