用五行哲学记录生活,与行星护卫对话心灵
Record your life with Five Elements philosophy, chat with planetary guardians
五行行星日记是一款结合中国传统五行哲学与现代 3D 可视化的日记应用。每颗行星代表五行之一(金、木、水、火、土),对应不同的情绪状态。在这里,你可以:
- 🌌 在 3D 太阳系中自由探索五颗行星
- 📝 在不同行星上记录对应的情绪日记
- 🤖 与行星护卫精灵 AI 对话,获得情感支持
- ⚖️ 通过五行平衡图表了解自己的情感分布
- 👥 添加好友,分享可见的日记动态
- 💬 点赞评论,建立情感连接
| 行星 | 五行 | 情绪状态 | 护卫精灵 | 性格特点 |
|---|---|---|---|---|
| 水星 | 水 | 闪念 | 辰星 | 灵动、敏捷、话少精准 |
| 金星 | 金 | 好恶 | 太白 | 优雅、清醒、有主见 |
| 火星 | 火 | 上头 | 荧惑 | 热血、直率、充满能量 |
| 木星 | 木 | 生长 | 岁星 | 沉稳、温和、有耐心 |
| 土星 | 土 | 沉淀 | 镇星 | 安静、包容、踏实 |
五行相生:水生木 → 木生火 → 火生土 → 土生金 → 金生水
五行相克:水克火 → 火克金 → 金克木 → 木克土 → 土克水
前端
- React 18 + TypeScript
- Three.js + React Three Fiber(3D 渲染)
- Vite(构建工具)
- Supabase Auth(用户认证)
后端
- FastAPI(Python 异步框架)
- PostgreSQL(数据库)
- DeepSeek API(AI 对话)
- PyJWT(JWT 认证)
# 1. 克隆项目
git clone <your-repo-url>
cd planet-diary-opensource
# 2. 配置环境变量
cp .env.example .env
# 编辑 .env 文件,填入你的配置
# 3. 启动服务
docker-compose up -d
# 4. 访问应用
open http://localhost前置要求
- Node.js 18+
- Python 3.11+
- PostgreSQL 15+
后端启动
cd backend
pip install -r requirements.txt
cp .env.example .env # 配置数据库和 API
python run.py前端启动
cd frontend
npm install
npm run dev复制 .env.example 为 .env,配置以下变量:
# 数据库
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
DB_NAME=planet_diary
# Supabase(用于用户认证)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your_anon_key
SUPABASE_JWT_SECRET=your_jwt_secret
# DeepSeek API(AI 对话)
DEEPSEEK_API_KEY=your_deepseek_key
# 前端环境变量
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_keycd frontend
npm install
vercel --prod配置环境变量后,使用 backend/Dockerfile 部署。
使用 docker-compose.yml 一键部署,包含数据库、后端、前端三个容器。
- 注册登录:使用邮箱注册账号
- 探索行星:点击太阳系中的行星进入
- 记录日记:在行星页面写下你的心情
- 选择情绪:使用 Emoji 标签标记当前情绪
- 与护卫对话:点击护卫精灵图片开始 AI 对话
- 查看平衡:在地球页面查看五行平衡图表
- 添加好友:通过邮箱添加好友,分享可见日记
欢迎提交 Issue 和 Pull Request!
MIT License
- 行星与太阳纹理来自 Solar System Scope,采用 CC BY 4.0 许可协议使用
- 字体:Ma Shan Zheng / Liu Jian Mao Cao(Google Fonts, SIL OFL)
- 字体材质图生成使用 pollinations.ai 公共图像生成服务
Planet Diary is a journaling app that combines traditional Chinese Five Elements philosophy with modern 3D visualization. Each planet represents one of the five elements (Metal, Wood, Water, Fire, Earth) and corresponds to different emotional states. Here you can:
- 🌌 Explore five planets in a 3D solar system
- 📝 Record mood journals on different planets
- 🤖 Chat with planetary guardian spirits for emotional support
- ⚖️ Understand your emotional distribution through Five Elements balance charts
- 👥 Add friends and share visible diary feeds
- 💬 Like and comment to build emotional connections
| Planet | Element | Emotional State | Guardian | Personality |
|---|---|---|---|---|
| Mercury | Water | Fleeting Thoughts | Chenxing | Agile, precise, few words |
| Venus | Metal | Likes & Dislikes | Taibai | Elegant, clear-headed, opinionated |
| Mars | Fire | Intense Emotions | Yinghuo | Passionate, direct, energetic |
| Jupiter | Wood | Growth | Suixing | Calm, gentle, patient |
| Saturn | Earth | Reflection | Zhenxing | Quiet,包容, grounded |
Generating Cycle: Water → Wood → Fire → Earth → Metal → Water
Overcoming Cycle: Water overcomes Fire → Fire overcomes Metal → Metal overcomes Wood → Wood overcomes Earth → Earth overcomes Water
Frontend
- React 18 + TypeScript
- Three.js + React Three Fiber (3D rendering)
- Vite (build tool)
- Supabase Auth (authentication)
Backend
- FastAPI (Python async framework)
- PostgreSQL (database)
- DeepSeek API (AI chat)
- PyJWT (JWT authentication)
# 1. Clone the project
git clone <your-repo-url>
cd planet-diary-opensource
# 2. Configure environment variables
cp .env.example .env
# Edit .env file with your configuration
# 3. Start services
docker-compose up -d
# 4. Access the app
open http://localhostPrerequisites
- Node.js 18+
- Python 3.11+
- PostgreSQL 15+
Start Backend
cd backend
pip install -r requirements.txt
cp .env.example .env # Configure database and APIs
python run.pyStart Frontend
cd frontend
npm install
npm run devVisit http://localhost:5173
Copy .env.example to .env and configure:
# Database
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=your_password
DB_NAME=planet_diary
# Supabase (for authentication)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your_anon_key
SUPABASE_JWT_SECRET=your_jwt_secret
# DeepSeek API (for AI chat)
DEEPSEEK_API_KEY=your_deepseek_key
# Frontend environment variables
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your_anon_keycd frontend
npm install
vercel --prodConfigure environment variables and deploy using backend/Dockerfile.
Use docker-compose.yml for one-click deployment with database, backend, and frontend containers.
- Sign Up/Login: Register with your email
- Explore Planets: Click on planets in the solar system
- Write Diaries: Record your mood on planet pages
- Select Emotions: Use emoji tags to mark current mood
- Chat with Guardians: Click guardian images for AI conversations
- View Balance: Check Five Elements balance chart on Earth page
- Add Friends: Add friends by email and share visible diaries
Issues and Pull Requests are welcome!
MIT License
Made with ❤️ by the community
Embrace your emotions, find your balance


