komomood - Couple Mood Tracking Heatmap
Published:
An elegant couple mood tracking website with self-hosted backend and SQLite, displaying daily mood records in GitHub contribution graph style.
🌸 Features
- Elegant Pink Theme: Gradient pink design, warm and romantic
- GitHub-Style Heatmap: Uses Cal-Heatmap to display the last year + 14 days calendar heatmap
- Responsive Design: Perfect for mobile and desktop
- Local Backend API: Frontend reads/writes
/komomood/api/entries, supports overwriting duplicate dates
📊 Data & Backend
Production data is stored in backend/mood_entries.db (SQLite), table mood_entries. Also provides local JSON as development fallback:
[
{
"date": "2025-01-15",
"kokoMood": 4,
"momoMood": 5,
"komoScore": 4,
"note": "Watched a movie together, very happy day"
}
]
Field Descriptions
date: Date in YYYY-MM-DD formatkokoMood: Koko’s mood rating (1-5)momoMood: Momo’s mood rating (1-5)komoScore: Relationship score (1-5)note: Optional note text
🎨 Color Scheme
Heatmap uses 5-level color gradient (blue→pink):
- Level 0 (no data):
#E5E7EB(gray) - Level 1:
#3B82F6(blue) - Level 2:
#60A5FA(light blue) - Level 3:
#A78BFA(purple) - Level 4:
#F472B6(pink) - Level 5:
#EC4899(deep pink)
Color level is determined by komoScore, representing the day’s relationship quality.
🚀 Local Development
Due to browser CORS restrictions, use a local server:
# Using Python
python -m http.server 8000
# Or using Node.js
npx serve .
# Or using PHP
php -S localhost:8000
Then visit http://localhost:8000
Backend (optional):
cd backend
npm i
node server.js # or use pm2 for hosting
📱 Deployment (Current Production)
- Static assets: Nginx serves
/komomood/(deployed to/var/www/komomood/) - API proxy:
/komomood/api/→http://localhost:3002/api/ - Access:
https://us-south.20011112.xyz/komomood/
🔧 Maintenance Notes
- Production doesn’t rely on external CDN: Cal-Heatmap, Tailwind, etc. all use local builds/assets
- Database file is version controlled (special use case). Be cautious about potential size and privacy issues
- Heatmap extra +14 days: To adjust, modify frontend
numWeekscalculation
💕 About
This is a private mood recording tool designed for couples, recording and reviewing beautiful moments in a simple way.
Made with 💖 for Koko & Momo
